lib/csd/user_interface/cli.rb in csd-0.1.8 vs lib/csd/user_interface/cli.rb in csd-0.1.9

- old
+ new

@@ -4,38 +4,33 @@ module CSD module UserInterface class CLI < Base include Gem::UserInteraction - + def separator - say + $stdout.puts end def indicate_activity $stdout.putc '.' $stdout.flush end - + def debug(message) - say "DEBUG: #{message}".magenta if Options.debug and !Options.silent + $stdout.puts "DEBUG: #{message}".magenta if Options.debug end - + def info(message) - say message if !Options.silent + $stdout.puts message end - + def warn(message) - say 'NOTE: '.red + message.red if !Options.silent + $stdout.puts 'NOTE: '.red + message.red end - + def error(message) - say('ERROR: '.red.blink + message.red) if !Options.silent - end - - def die(message) - say('ERROR: '.red.blink + message.red) if !Options.silent - raise Error::UI::Die + $stderr.puts('ERROR: '.red.blink + message.red) end end end end \ No newline at end of file