lib/autobuild/reporting.rb in autobuild-1.6.1 vs lib/autobuild/reporting.rb in autobuild-1.6.2.b1

- old
+ new

@@ -30,10 +30,21 @@ class << self attr_reader :progress_messages end @progress_messages = Array.new + # Displays an error message + def self.error(message) + Autoproj.message(" ERROR: #{message}", :red, :bold) + end + + # Displays a warning message + def self.warn(message) + Autoproj.message(" WARN: #{message}", :magenta) + end + + def self.progress_start(key, *args) if args.last.kind_of?(Hash) options = Kernel.validate_options args.pop, :done_message => nil else options = Hash.new @@ -74,10 +85,10 @@ progress_messages.delete_if do |msg_key, msg| if msg_key == key found = true end end - if found + if found && @last_progress_msg puts display_progress end found end