Class: Avm::Git::SubrepoChecks
Instance Attribute Summary collapse
-
#check_remote ⇒ Object
Returns the value of attribute check_remote.
-
#fix_parent ⇒ Object
Returns the value of attribute fix_parent.
Instance Method Summary collapse
- #add_all_subrepos ⇒ Object
- #add_subrepos(*subpath_list) ⇒ Object
- #check_options ⇒ Object
- #show_result ⇒ Object
Instance Attribute Details
#check_remote ⇒ Object
Returns the value of attribute check_remote.
11 12 13 |
# File 'lib/avm/git/subrepo_checks.rb', line 11 def check_remote @check_remote end |
#fix_parent ⇒ Object
Returns the value of attribute fix_parent.
11 12 13 |
# File 'lib/avm/git/subrepo_checks.rb', line 11 def fix_parent @fix_parent end |
Instance Method Details
#add_all_subrepos ⇒ Object
14 15 16 17 18 19 |
# File 'lib/avm/git/subrepo_checks.rb', line 14 def add_all_subrepos add_subrepos( *repository.command('subrepo', '-q', 'status').execute!.split("\n").map(&:strip) .select(&:present?) ) end |
#add_subrepos(*subpath_list) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/avm/git/subrepo_checks.rb', line 21 def add_subrepos(*subpath_list) subpath_list.each do |subpath| subpaths.add(subpath) end reset_cache self end |
#check_options ⇒ Object
29 30 31 |
# File 'lib/avm/git/subrepo_checks.rb', line 29 def { fix_parent: fix_parent, check_remote: check_remote } end |
#show_result ⇒ Object
33 34 35 36 |
# File 'lib/avm/git/subrepo_checks.rb', line 33 def show_result checks.each(&:show_result) infov 'Result', result.label end |