Module: Git::Webby::GitHelpers

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#content_type_for_git(name, *suffixes) ⇒ Object



187
188
189
# File 'lib/git/webby.rb', line 187

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

#gitObject



178
179
180
# File 'lib/git/webby.rb', line 178

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

#repositoryObject



182
183
184
185
# File 'lib/git/webby.rb', line 182

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