lib/autobuild/config.rb in autobuild-1.5.20 vs lib/autobuild/config.rb in autobuild-1.5.21.rc1

- old
+ new

@@ -1,8 +1,9 @@ require 'optparse' require 'rake' require 'singleton' +require 'highline' # Evaluates +script+ in autobuild context def Autobuild(&script) Autobuild.send(:module_eval, &script) end @@ -41,15 +42,25 @@ # Configure the programs used by different packages attr_reader :programs # The directory in which logs are saved. Defaults to PREFIX/log. attr_writer :logdir + # A HighLine object that allows to colorize the output + attr_reader :console + # True if we build and if the build is applied on all packages def full_build? do_build && !only_doc && packages.empty? end end - DEFAULT_OPTIONS = { :nice => 0, + + @console = HighLine.new + + def self.color(*args) + console.color(*args) + end + + DEFAULT_OPTIONS = { :nice => nil, :srcdir => Dir.pwd, :prefix => Dir.pwd, :logdir => nil, :verbose => false, :debug => false, :do_build => true, :do_forced_build => false, :do_rebuild => false, :do_update => true, :daemonize => false, :packages => [], :default_packages => [], :only_doc => false, :do_doc => true, :doc_errors => false, :doc_prefix => 'doc', :keep_oldlogs => false }