lib/opsicle/output.rb in opsicle-0.12.0 vs lib/opsicle/output.rb in opsicle-0.13.0

- old
+ new

@@ -13,17 +13,24 @@ :error => [:bold, :red], :warning => [:bold, :yellow], :verbose => [:bold, :magenta], :debug => [:bold, :cyan], :success => [:bold, :green], + :addition => [:bold, :green], + :removal => [:bold, :red], + :modification => [:bold, :yellow], ) end def self.say(msg, log_style=:normal) + terminal.say format(msg, log_style) + end + + def self.format(msg, log_style=:normal) if $color - terminal.say "<%= color('#{msg}', '#{log_style}') %>" + terminal.color(msg.to_s, log_style) else - terminal.say msg + msg end end def self.say_verbose(msg) terminal.say "<%= color('#{msg}', 'verbose') %>" if $verbose