lib/spoon.rb in docker-spoon-0.2.0 vs lib/spoon.rb in docker-spoon-0.3.0

- old
+ new

@@ -1,9 +1,10 @@ require "spoon/version" require 'docker' require 'json' require 'uri' +require 'rainbow' module Spoon include Methadone::Main include Methadone::CLILogging include Methadone::SH @@ -139,10 +140,10 @@ puts "List of available spoon containers:" container_list = get_all_containers container_list.each do |container| name = container.info["Names"].first.to_s if name.start_with? "/#{options[:prefix]}" - running = is_running?(container) ? "Running" : "Stopped" + running = is_running?(container) ? Rainbow("Running").green : Rainbow("Stopped").red puts "#{remove_prefix(name)} [ #{running} ]".rjust(40) end end end