Module: Avm::Git::SubrepoCheck::ShowResult

Defined in:
lib/avm/git/subrepo_check/show_result.rb

Instance Method Summary collapse

Instance Method Details

#out_attr(key, value) ⇒ Object



27
28
29
# File 'lib/avm/git/subrepo_check/show_result.rb', line 27

def out_attr(key, value)
  out('|' + "#{key}=".white + value)
end

#run_fix_parentObject



18
19
20
21
22
23
24
25
# File 'lib/avm/git/subrepo_check/show_result.rb', line 18

def run_fix_parent
  return unless fix_parent?
  return unless parent_result.error?

  out('|Fixing...'.white)
  self.parent_hash = expected_parent_hash
  out_attr('new parent', parent_result.label)
end

#show_resultObject



10
11
12
13
14
15
16
# File 'lib/avm/git/subrepo_check/show_result.rb', line 10

def show_result
  out(subrepo.subpath.to_path.cyan)
  out_attr('parent', parent_result.label)
  run_fix_parent
  out_attr('remote', remote_result.label)
  out("\n")
end