diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-25 07:03:36 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-25 07:03:36 +0000 |
commit | 3908d5d3303dbd3f20f106aa71b5c094b67ac577 (patch) | |
tree | c607909aa5a9b12e6c134cf6268b56db02881fc0 /lib/rake/application.rb | |
parent | f20f84d60a467c1bc8a0ca81fe2788fa4c8079f8 (diff) | |
download | ruby-3908d5d3303dbd3f20f106aa71b5c094b67ac577.tar.gz |
* lib/rake: Update to rake 10.4.0
* test/rake: ditto.
* NEWS: ditto.
* test/lib/minitest/unit.rb: Add compatibility shim for minitest 5.
This only provides minitest 5 unit test naming compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake/application.rb')
-rw-r--r-- | lib/rake/application.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 795b4685d4..96f907b077 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -20,6 +20,9 @@ module Rake include TaskManager include TraceOutput + # The command-line arguments rake is using (defaults to ARGV) + attr_reader :argv # :nodoc: + # The name of the application (typically 'rake') attr_reader :name @@ -45,6 +48,7 @@ module Rake # Initialize a Rake::Application object. def initialize super + @argv = ARGV.dup @name = 'rake' @rakefiles = DEFAULT_RAKEFILES.dup @rakefile = nil @@ -73,6 +77,8 @@ module Rake # call +top_level+ to run your top level tasks. def run standard_exception_handling do + @argv = argv + init load_rakefile top_level @@ -633,7 +639,7 @@ module Rake standard_rake_options.each { |args| opts.on(*args) } opts.environment('RAKEOPT') - end.parse! + end.parse! @argv end # Similar to the regular Ruby +require+ command, but will check @@ -729,7 +735,7 @@ module Rake # Environmental assignments are processed at this time as well. def collect_command_line_tasks # :nodoc: @top_level_tasks = [] - ARGV.each do |arg| + @argv.each do |arg| if arg =~ /^(\w+)=(.*)$/m ENV[$1] = $2 else |