style: Improve readability (hide root directory in list)
This commit is contained in:
parent
3eb0d70f1a
commit
603037ae0b
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ class ListRepos < Thor
|
||||||
Find.find(basedir) do |path|
|
Find.find(basedir) do |path|
|
||||||
next unless path =~ %r{.*/.git/config$}
|
next unless path =~ %r{.*/.git/config$}
|
||||||
|
|
||||||
project_root = File.dirname(File.dirname(path))
|
project_root = File.dirname(File.dirname(path)).gsub(%r{^#{basedir}/}, '')
|
||||||
lines = File.readlines(path)
|
lines = File.readlines(path)
|
||||||
projects << {
|
projects << {
|
||||||
path: project_root,
|
path: project_root,
|
||||||
|
@ -58,7 +58,7 @@ class ListRepos < Thor
|
||||||
## REDUCE
|
## REDUCE
|
||||||
projects_selected = projects.select do |vals|
|
projects_selected = projects.select do |vals|
|
||||||
res = true
|
res = true
|
||||||
selector.each do |k,v|
|
selector.each do |k, v|
|
||||||
res &&= (vals[k] == v)
|
res &&= (vals[k] == v)
|
||||||
end
|
end
|
||||||
res
|
res
|
||||||
|
|
Loading…
Reference in a new issue