diff --git a/lib/apt/spy2.rb b/lib/apt/spy2.rb index 0981c46..25a4d8d 100755 --- a/lib/apt/spy2.rb +++ b/lib/apt/spy2.rb @@ -18,7 +18,7 @@ class AptSpy2 < Thor def fix working = filter(retrieve(options[:country], use_launchpad?(options)), false) print "The closest mirror is: " - puts "#{working[0]}".white_on_green + puts "#{working[0]}".bold.magenta if !options[:commit] puts "Run with --commit to adjust /etc/apt/sources.list".yellow else @@ -94,10 +94,10 @@ def filter(mirrors, output = true) mirrors.each do |mirror| data = {"mirror" => mirror } begin - mirror_status = open(mirror) + open(mirror) data["status"] = "up" working_mirrors << mirror - rescue OpenURI::HTTPError => the_error + rescue OpenURI::HTTPError data["status"] = "broken" rescue Errno::ECONNREFUSED data["status"] = "down" @@ -135,7 +135,7 @@ def update(mirror) end puts "Updated '#{apt_sources}' with #{mirror}".green - puts "Run `apt-get update` to update".red_on_yellow + puts "Run `apt-get update` to update".black_on_yellow end private @@ -150,4 +150,4 @@ def use_launchpad?(options) return true end -end +end \ No newline at end of file