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



24
25
26
# File 'lib/avm/git/subrepo_check/show_result.rb', line 24

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

#run_fix_parentObject



15
16
17
18
19
20
21
22
# File 'lib/avm/git/subrepo_check/show_result.rb', line 15

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



7
8
9
10
11
12
13
# File 'lib/avm/git/subrepo_check/show_result.rb', line 7

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