From d1d4490a57413ff5cb7e8bd0274bb34c7da68d29 Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 29 Nov 2012 19:16:46 +0000 Subject: * lib/rake/*: Updated to rake 0.9.5 * test/rake/*: ditto. * NEWS: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rake/application.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/rake/application.rb') diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 54796312d8..734e20ac31 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -5,6 +5,7 @@ require 'rake/task_manager' require 'rake/file_list' require 'rake/thread_pool' require 'rake/thread_history_display' +require 'rake/trace_output' require 'rake/win32' module Rake @@ -17,6 +18,7 @@ module Rake # class Application include TaskManager + include TraceOutput # The name of the application (typically 'rake') attr_reader :name @@ -176,7 +178,7 @@ module Rake if options.backtrace trace ex.backtrace.join("\n") else - trace Backtrace.collapse(ex.backtrace) + trace Backtrace.collapse(ex.backtrace).join("\n") end trace "Tasks: #{ex.chain}" if has_chain?(ex) trace "(See full trace by running task with --trace)" unless options.backtrace @@ -314,9 +316,9 @@ module Rake end end - def trace(*str) + def trace(*strings) options.trace_output ||= $stderr - options.trace_output.puts(*str) + trace_on(options.trace_output, *strings) end def sort_options(options) @@ -336,7 +338,7 @@ module Rake options.show_all_tasks = value } ], - ['--backtrace [OUT]', "Enable full backtrace. OUT can be stderr (default) or stdout.", + ['--backtrace=[OUT]', "Enable full backtrace. OUT can be stderr (default) or stdout.", lambda { |value| options.backtrace = true select_trace_output(options, 'backtrace', value) @@ -467,7 +469,7 @@ module Rake select_tasks_to_show(options, :tasks, value) } ], - ['--trace', '-t [OUT]', "Turn on invoke/execute tracing, enable full backtrace. OUT can be stderr (default) or stdout.", + ['--trace=[OUT]', '-t', "Turn on invoke/execute tracing, enable full backtrace. OUT can be stderr (default) or stdout.", lambda { |value| options.trace = true options.backtrace = true -- cgit v1.2.3