Module: Spill::RepoFinder

Defined in:
lib/spill/repo_finder.rb

Class Method Summary collapse

Class Method Details

.find(root) ⇒ Object



3
4
5
6
7
# File 'lib/spill/repo_finder.rb', line 3

def self.find(root)
  root = File.expand_path(root)
  candidates = [ root ] + Dir.glob(File.join(root, "*")) + Dir.glob(File.join(root, "*", "*"))
  candidates.select { |dir| File.directory?(File.join(dir, ".git")) }.sort
end