rake 10.4.1 → 10.4.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rake might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.rdoc +11 -2
- data/lib/rake.rb +1 -1
- data/lib/rake/application.rb +13 -6
- data/lib/rake/dsl_definition.rb +2 -0
- data/test/test_rake_application.rb +2 -2
- data/test/test_rake_application_options.rb +2 -2
- data/test/test_rake_test_task.rb +12 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45b8e70b002f64d653a6a1400190c4165526670b
|
4
|
+
data.tar.gz: 1f0916c16ca6c44e83d86d2112285a0d726e24a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1433e6f142ab2dc8fa9f765a7d683b8ff8dee7fa54c4a20245cb2a9a933fe537a57d41d10484d4e55f4c4ca267b5cf22c7c2162f1d1d05e35510211940e8f6e
|
7
|
+
data.tar.gz: f60648962e6247b98fd29d6a8cc51c97ab9408aca5ec22fdacbfec778bd6ab90a394c03b9fb1b56f50ae4f43dfa577338981ffa9e4719109eb09a1340c30f082
|
data/History.rdoc
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== 10.4.2 / 2014-12-02
|
2
|
+
|
3
|
+
Bug fixes:
|
4
|
+
|
5
|
+
* Rake no longer edits ARGV. This allows you to re-exec rake from a rake
|
6
|
+
task. Pull requset #9 by Matt Palmer.
|
7
|
+
* Documented how Rake::DSL#desc handles sentences in task descriptions.
|
8
|
+
Issue #7 by Raza Sayed.
|
9
|
+
* Fixed test error on 1.9.3 with legacy RubyGems. Issue #8 by Matt Palmer.
|
10
|
+
* Deleted duplicated History entry. Pull request #10 by Yuji Yamamoto.
|
11
|
+
|
1
12
|
=== 10.4.1 / 2014-12-01
|
2
13
|
|
3
14
|
Bug fixes:
|
@@ -17,8 +28,6 @@ Enhancements:
|
|
17
28
|
* Rake no longer edits ARGV. This allows you to re-exec rake from a rake
|
18
29
|
task. Issue #277 by Matt Palmer.
|
19
30
|
* Etc.nprocessors is used for counting the number of CPUs.
|
20
|
-
* Rake no longer edits ARGV. This allows you to re-exec rake from a rake
|
21
|
-
task. Issue #277 by Matt Palmer.
|
22
31
|
|
23
32
|
Bug fixes:
|
24
33
|
|
data/lib/rake.rb
CHANGED
data/lib/rake/application.rb
CHANGED
@@ -83,8 +83,8 @@ module Rake
|
|
83
83
|
def init(app_name='rake')
|
84
84
|
standard_exception_handling do
|
85
85
|
@name = app_name
|
86
|
-
handle_options
|
87
|
-
collect_command_line_tasks
|
86
|
+
args = handle_options
|
87
|
+
collect_command_line_tasks(args)
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
@@ -616,7 +616,9 @@ module Rake
|
|
616
616
|
end
|
617
617
|
private :select_trace_output
|
618
618
|
|
619
|
-
# Read and handle the command line options.
|
619
|
+
# Read and handle the command line options. Returns the command line
|
620
|
+
# arguments that we didn't understand, which should (in theory) be just
|
621
|
+
# task names and env vars.
|
620
622
|
def handle_options # :nodoc:
|
621
623
|
options.rakelib = ['rakelib']
|
622
624
|
options.trace_output = $stderr
|
@@ -633,7 +635,7 @@ module Rake
|
|
633
635
|
|
634
636
|
standard_rake_options.each { |args| opts.on(*args) }
|
635
637
|
opts.environment('RAKEOPT')
|
636
|
-
end.parse
|
638
|
+
end.parse(ARGV)
|
637
639
|
end
|
638
640
|
|
639
641
|
# Similar to the regular Ruby +require+ command, but will check
|
@@ -727,9 +729,14 @@ module Rake
|
|
727
729
|
# Collect the list of tasks on the command line. If no tasks are
|
728
730
|
# given, return a list containing only the default task.
|
729
731
|
# Environmental assignments are processed at this time as well.
|
730
|
-
|
732
|
+
#
|
733
|
+
# `args` is the list of arguments to peruse to get the list of tasks.
|
734
|
+
# It should be the command line that was given to rake, less any
|
735
|
+
# recognised command-line options, which OptionParser.parse will
|
736
|
+
# have taken care of already.
|
737
|
+
def collect_command_line_tasks(args) # :nodoc:
|
731
738
|
@top_level_tasks = []
|
732
|
-
|
739
|
+
args.each do |arg|
|
733
740
|
if arg =~ /^(\w+)=(.*)$/m
|
734
741
|
ENV[$1] = $2
|
735
742
|
else
|
data/lib/rake/dsl_definition.rb
CHANGED
@@ -159,6 +159,8 @@ module Rake
|
|
159
159
|
end
|
160
160
|
|
161
161
|
# Describes the next rake task. Duplicate descriptions are discarded.
|
162
|
+
# Descriptions are shown with <code>rake -T</code> (up to the first
|
163
|
+
# sentence) and <code>rake -D</code> (the entire description).
|
162
164
|
#
|
163
165
|
# Example:
|
164
166
|
# desc "Run the Unit Tests"
|
@@ -370,7 +370,7 @@ class TestRakeApplication < Rake::TestCase
|
|
370
370
|
# HACK no assertions
|
371
371
|
end
|
372
372
|
|
373
|
-
def
|
373
|
+
def test_handle_options_should_not_strip_options_from_argv
|
374
374
|
assert !@app.options.trace
|
375
375
|
|
376
376
|
valid_option = '--trace'
|
@@ -378,7 +378,7 @@ class TestRakeApplication < Rake::TestCase
|
|
378
378
|
|
379
379
|
@app.handle_options
|
380
380
|
|
381
|
-
assert
|
381
|
+
assert ARGV.include?(valid_option)
|
382
382
|
assert @app.options.trace
|
383
383
|
end
|
384
384
|
|
@@ -457,8 +457,8 @@ class TestRakeApplicationOptions < Rake::TestCase
|
|
457
457
|
throw :system_exit, :exit
|
458
458
|
end
|
459
459
|
@app.instance_eval do
|
460
|
-
handle_options
|
461
|
-
collect_command_line_tasks
|
460
|
+
args = handle_options
|
461
|
+
collect_command_line_tasks(args)
|
462
462
|
end
|
463
463
|
@tasks = @app.top_level_tasks
|
464
464
|
@app.options
|
data/test/test_rake_test_task.rb
CHANGED
@@ -97,17 +97,22 @@ class TestRakeTestTask < Rake::TestCase
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def test_run_code_rake_default_gem
|
100
|
+
skip 'this ruby does not have default gems' unless
|
101
|
+
Gem::Specification.method_defined? :default_specifications_dir
|
102
|
+
|
100
103
|
default_spec = Gem::Specification.new 'rake', 0
|
101
104
|
default_spec.loaded_from = File.join Gem::Specification.default_specifications_dir, 'rake-0.gemspec'
|
102
|
-
|
105
|
+
begin
|
106
|
+
rake, Gem.loaded_specs['rake'] = Gem.loaded_specs['rake'], default_spec
|
103
107
|
|
104
|
-
|
105
|
-
|
106
|
-
|
108
|
+
test_task = Rake::TestTask.new do |t|
|
109
|
+
t.loader = :rake
|
110
|
+
end
|
107
111
|
|
108
|
-
|
109
|
-
|
110
|
-
|
112
|
+
assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code)
|
113
|
+
ensure
|
114
|
+
Gem.loaded_specs['rake'] = rake
|
115
|
+
end
|
111
116
|
end
|
112
117
|
|
113
118
|
def test_run_code_testrb_ruby_1_8_2
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.4.
|
4
|
+
version: 10.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|