Module: Avm::Git::Subrepo::Check::ShowResult

Defined in:
lib/avm/git/subrepo/check/show_result.rb

Instance Method Summary collapse

Instance Method Details

#out_attr(key, value) ⇒ Object



25
26
27
# File 'lib/avm/git/subrepo/check/show_result.rb', line 25

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

#run_fix_parent ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/avm/git/subrepo/check/show_result.rb', line 16

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_result ⇒ Object



8
9
10
11
12
13
14
# File 'lib/avm/git/subrepo/check/show_result.rb', line 8

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