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|
|
||||
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)
|
||||
projects << {
|
||||
path: project_root,
|
||||
|
@ -58,7 +58,7 @@ class ListRepos < Thor
|
|||
## REDUCE
|
||||
projects_selected = projects.select do |vals|
|
||||
res = true
|
||||
selector.each do |k,v|
|
||||
selector.each do |k, v|
|
||||
res &&= (vals[k] == v)
|
||||
end
|
||||
res
|
||||
|
|
Loading…
Reference in a new issue