Class: Avm::Git::SubrepoChecks
- Inherits:
-
Object
- Object
- Avm::Git::SubrepoChecks
- Defined in:
- lib/avm/git/subrepo_checks.rb
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
15 16 17 18 19 20 |
# File 'lib/avm/git/subrepo_checks.rb', line 15 def add_all_subrepos add_subrepos( *repository.command('subrepo', '-q', 'status').execute!.split("\n").map(&:strip) .select(&:present?) ) end |
#add_subrepos(*subpath_list) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/avm/git/subrepo_checks.rb', line 22 def add_subrepos(*subpath_list) subpath_list.each do |subpath| subpaths.add(subpath) end reset_cache self end |
#check_options ⇒ Object
30 31 32 |
# File 'lib/avm/git/subrepo_checks.rb', line 30 def { fix_parent: fix_parent, check_remote: check_remote } end |
#show_result ⇒ Object
34 35 36 37 |
# File 'lib/avm/git/subrepo_checks.rb', line 34 def show_result checks.each(&:show_result) infov 'Result', result.label end |