Class: GitServer::Repository

Inherits:
Rack::Directory
  • Object
show all
Defined in:
lib/git_server/lib/git_server_app.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRepository

Returns a new instance of Repository.



31
32
33
# File 'lib/git_server/lib/git_server_app.rb', line 31

def initialize
  super(self.class.path)
end

Class Method Details

.pathObject



19
20
21
# File 'lib/git_server/lib/git_server_app.rb', line 19

def self.path
  GitRepo.repo.path
end

.urlObject



23
24
25
26
27
28
29
# File 'lib/git_server/lib/git_server_app.rb', line 23

def self.url
  if ENV['BARE']
    "/#{File.basename File.expand_path(GitRepo.repo.path)}"
  else
    "/#{File.basename GitRepo.dir.path}.git"
  end
end