Module: Gitan

Defined in:
lib/gitan.rb,
lib/gitan.rb

Defined Under Namespace

Classes: Repo

Class Method Summary collapse

Class Method Details

.remote_heads(server, path) ⇒ Object

Return heads in remote host.



11
12
13
14
15
16
17
18
# File 'lib/gitan.rb', line 11

def self.remote_heads(server, path)
  results = {}
  YAML.load(`ssh #{server} gitan heads #{path}`).each do |repo_path, head|
    repo_name = File.basename(repo_path).sub(/\.git$/, "")
    results[repo_name] = head
  end
  return results
end