class Zypper::Upgraderepo::View::Table
Public Class Methods
alternative(num, repo, max_col, alt)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 93 def self.alternative(num, repo, max_col, alt) Messages.error("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | #{alt[:message].bold.yellow}") puts " #{' ' * 3} | #{' ' * 2} | #{' ' * max_col} | #{' ' * 3} | #{alt[:url]}" unless alt[:url].to_s.empty? end
available(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 76 def self.available(num, repo, max_col) if repo.unversioned? && repo.old_url Messages.ok("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | Unversioned repository") else Messages.ok("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} |") end end
header(max_col, upgrade = false)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 115 def self.header(max_col, upgrade = false) puts " St. | # | #{'Name'.ljust(max_col, ' ')} | En. | #{upgrade ? 'Details' : 'Hint' }" end
not_found(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 89 def self.not_found(num, repo, max_col) Messages.error("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} |") end
redirected(num, repo, max_col, redirected)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 84 def self.redirected(num, repo, max_col, redirected) Messages.warning("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | #{'Redirection'.bold.yellow} of #{repo.url} ") puts " #{' ' * 3} | #{' ' * 2} | #{ ' ' * max_col} | #{ ' ' * 3 } | #{'To:'.bold.yellow} #{redirected}" end
separator()
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 111 def self.separator puts '-' * 90 end
timeout(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 98 def self.timeout(num, repo, max_col) Messages.error("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | #{'Server Timeout'.bold.yellow}") end
untouched(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 107 def self.untouched(num, repo, max_col) Messages.warning("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | #{'Untouched:'.bold.yellow} #{repo.old_url}") end
upgraded(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 102 def self.upgraded(num, repo, max_col) #, old_data) Messages.ok("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | #{'From:'.bold.green} #{repo.old_url}") puts " #{' ' * 3} | #{' ' * 2} | #{' ' * max_col} | #{' ' * 3} | #{'To:'.bold.green} #{repo.url}" end