Class: Gitdocs::Configuration::Share

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/gitdocs/configuration.rb

Instance Method Summary collapse

Instance Method Details

#available_branchesObject



29
30
31
32
33
34
# File 'lib/gitdocs/configuration.rb', line 29

def available_branches
  repo = Grit::Repo.new(path)
  repo.heads.map{|r| r.name}
rescue
  nil
end

#available_remotesObject



22
23
24
25
26
27
# File 'lib/gitdocs/configuration.rb', line 22

def available_remotes
  repo = Grit::Repo.new(path)
  repo.remotes.map{|r| r.name}
rescue
  nil
end