lib/autobuild/reporting.rb in autobuild-1.3.3 vs lib/autobuild/reporting.rb in autobuild-1.4.0

- old
+ new

@@ -14,10 +14,26 @@ require 'autobuild/config' require 'autobuild/exceptions' module Autobuild def self.progress(msg) - puts " #{msg}" + if @last_msg + progress_value(100) + puts + end + @last_msg = nil + puts " #{msg}" + end + def self.progress_with_value(msg) + if @last_msg + progress_value(100) + puts + end + @last_msg = msg + print " #{msg}" + end + def self.progress_value(value) + print "\r #{@last_msg} (#{value}%)" end ## The reporting module provides the framework # to run commands in autobuild and report errors # to the user