Class: Bananajour::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/bigbananajour/bananajour/repository.rb

Instance Method Summary collapse

Instance Method Details

#get_config(key) ⇒ Object

TODO: put this in Bananajour.



9
10
11
# File 'lib/bigbananajour/bananajour/repository.rb', line 9

def get_config(key)
  `cd #{path} && git config --get #{key}`
end

#set_config(key, value) ⇒ Object



12
13
14
15
16
# File 'lib/bigbananajour/bananajour/repository.rb', line 12

def set_config(key,value)
  $stderr.puts "setting '#{key}' to '#{value}'"
  `cd #{path} && git config --unset-all #{key}`
  `cd #{path} && git config --replace-all #{key} "#{value}"`
end

#uriObject



5
6
7
# File 'lib/bigbananajour/bananajour/repository.rb', line 5

def uri
  Bananajour.git_uri + path.expand_path.to_s.split("/")[-2..-1].join("/")
end