class Zypper::Upgraderepo::View::Report
Public Class Methods
alternative(num, repo, max_col, alt)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 25 def self.alternative(num, repo, max_col, alt) puts " #{num.to_s.rjust(2).bold.red} | Status: #{'Not Found'.bold.red}" puts " #{' ' * 2} | Hint: #{alt[:message].bold.yellow}" puts " #{' ' * 2} | #{'Suggested:'.bold.yellow} #{alt[:url]}" unless alt[:url].to_s.empty? self.info(repo) end
available(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 8 def self.available(num, repo, max_col) puts " #{num.to_s.rjust(2).bold.green} | Status: #{'Ok'.bold.green}" puts " #{' ' * 2} | Hint: Unversioned repository" if repo.unversioned? && repo.old_url self.info(repo) end
header(max_col, upgrade = false)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 51 def self.header(max_col, upgrade = false) puts " # | Report" end
not_found(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 20 def self.not_found(num, repo, max_col) puts " #{num.to_s.rjust(2).bold.red} | Status: #{'Not Found'.bold.red}" self.info(repo) end
redirected(num, repo, max_col, redirected)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 14 def self.redirected(num, repo, max_col, redirected) puts " #{num.to_s.rjust(2).bold.yellow} | Status: #{'Redirected'.bold.yellow}" puts " #{' ' * 2} | #{'To:'.bold.yellow} #{redirected}" self.info(repo) end
separator()
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 47 def self.separator puts '-' * 90 end
timeout(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 32 def self.timeout(num, repo, max_col) puts " #{num.to_s.rjust(2).bold.yellow} | Status: #{'Server Timeout'.bold.yellow}" self.info(repo) end
untouched(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 42 def self.untouched(num, repo, max_col) puts " #{num.to_s.rjust(2).bold.yellow} | #{'Untouched'.bold.yellow}" self.info(repo) end
upgraded(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 37 def self.upgraded(num, repo, max_col) puts " #{num.to_s.rjust(2).bold.green} | #{'Upgraded'.bold.green}" self.info(repo) end
Private Class Methods
info(repo)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 62 def self.info(repo) puts " #{ ' ' * 2 } | Name: #{repo.name} #{repo.upgraded?(:name) ? '(' + repo.old_name.yellow + ')' : '' }" puts " #{ ' ' * 2 } | Alias: #{repo.alias} #{repo.upgraded?(:alias) ? '(' + repo.old_alias.yellow + ')' : ''}" puts " #{ ' ' * 2 } | Url: #{repo.url}" puts " #{ ' ' * 2 } | (#{repo.old_url.yellow})" if repo.upgraded? puts " #{ ' ' * 2 } | Priority: #{repo.priority}" puts " #{ ' ' * 2 } | #{repo.enabled? ? 'Enabled: Yes' : 'Enabled: No'.yellow}" puts " #{ ' ' * 2 } | Filename: #{repo.filename}" end