Module: Git::Lighttp::GitHelpers

Included in:
HttpBackendHelpers
Defined in:
lib/git/lighttp.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#content_type_for_git(name, *suffixes) ⇒ Object



260
261
262
# File 'lib/git/lighttp.rb', line 260

def content_type_for_git(name, *suffixes)
  content_type("application/x-git-#{name}-#{suffixes.compact.join('-')}")
end

#gitObject



251
252
253
# File 'lib/git/lighttp.rb', line 251

def git
  @git ||= ProjectHandler.new(settings.project_root, settings.git_path)
end

#repositoryObject



255
256
257
258
# File 'lib/git/lighttp.rb', line 255

def repository
  git.repository ||= (params[:repository] || params[:captures].first)
  git
end