summaryrefslogtreecommitdiff
path: root/lib/rake/application.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 19:16:46 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 19:16:46 +0000
commitd1d4490a57413ff5cb7e8bd0274bb34c7da68d29 (patch)
tree70596346a7f5f13d846cda7353fb8474baf4ad7e /lib/rake/application.rb
parent40bae2f67c1160e1e59018c1003d014c60d1ee47 (diff)
* 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
Diffstat (limited to 'lib/rake/application.rb')
-rw-r--r--lib/rake/application.rb12
1 files changed, 7 insertions, 5 deletions
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