31
32
33
34
35
36
37
38
|
# File 'lib/git_explorer.rb', line 31
def explore(root_dir="./")
run("find #{root_dir} -type f -name .gitignore", config={:capture=>true, :verbose=>false})
.split("\n")
.map{|file| file.gsub(/\.gitignore/,'')}
.map{|dir| run("basename `git -C #{dir} rev-parse --show-toplevel`; git -C #{dir} status", config={:capture=>true, :verbose=>false})}
.map{|status| status >> GitExplorer::}
.map{|status| say "project #{status.project_name} is #{status.status} on branch #{status.branch} -> #{status.files}"}
end
|