rake 10.0.3 → 10.0.4
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 +7 -0
- data/CHANGES +4 -0
- data/README.rdoc +2 -2
- data/Rakefile +1 -0
- data/doc/rakefile.rdoc +50 -4
- data/lib/rake/application.rb +15 -3
- data/lib/rake/backtrace.rb +1 -0
- data/lib/rake/file_utils.rb +2 -2
- data/lib/rake/file_utils_ext.rb +0 -3
- data/lib/rake/promise.rb +1 -1
- data/lib/rake/task.rb +28 -10
- data/lib/rake/trace_output.rb +4 -1
- data/lib/rake/version.rb +1 -1
- data/test/test_rake_application_options.rb +26 -14
- data/test/test_rake_directory_task.rb +1 -1
- data/test/test_rake_task.rb +32 -8
- data/test/test_rake_task_with_arguments.rb +4 -4
- data/test/test_rake_thread_pool.rb +9 -10
- data/test/test_trace_output.rb +7 -0
- metadata +9 -12
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bf7d33e05203253446a5a4015f7b1085e268eaaf
|
4
|
+
data.tar.gz: 488ec5fee795191c32c674c6838232ee8d824e56
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8498a095b32e5713ad22930c03d577e1601a2be95c2aa23333c4768ebb27059eecdeaa5c986b8218b32ee80f71401559c77b96e676053ea6a32b9b040bf2f0d3
|
7
|
+
data.tar.gz: 420607f28d7de1fc5cecf40da9d0daff39701a333277d3db884bc2537b3cce60582957921cd26d0485b6b6f79974475b340a4f1bd8b2a93ca0d48ea5dcceaa16
|
data/CHANGES
CHANGED
data/README.rdoc
CHANGED
@@ -174,8 +174,8 @@ jim dot weirich at gmail.com.
|
|
174
174
|
= Other stuff
|
175
175
|
|
176
176
|
Author:: Jim Weirich <jim.weirich@gmail.com>
|
177
|
-
Requires:: Ruby 1.8.
|
178
|
-
License:: Copyright 2003-
|
177
|
+
Requires:: Ruby 1.8.7 or later
|
178
|
+
License:: Copyright 2003-2013 by Jim Weirich.
|
179
179
|
Released under an MIT-style license. See the MIT-LICENSE
|
180
180
|
file included in the distribution.
|
181
181
|
|
data/Rakefile
CHANGED
@@ -163,6 +163,7 @@ else
|
|
163
163
|
s.name = 'rake'
|
164
164
|
s.version = $package_version
|
165
165
|
s.summary = "Ruby based make-like utility."
|
166
|
+
s.license = "MIT"
|
166
167
|
s.description = <<-EOF.delete "\n"
|
167
168
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
168
169
|
specified in standard Ruby syntax.
|
data/doc/rakefile.rdoc
CHANGED
@@ -79,7 +79,7 @@ method). In addition, file tasks are usually named with a string
|
|
79
79
|
rather than a symbol.
|
80
80
|
|
81
81
|
The following file task creates a executable program (named +prog+)
|
82
|
-
given two object files
|
82
|
+
given two object files named <tt>a.o</tt> and <tt>b.o</tt>. The tasks
|
83
83
|
for creating <tt>a.o</tt> and <tt>b.o</tt> are not shown.
|
84
84
|
|
85
85
|
file "prog" => ["a.o", "b.o"] do |t|
|
@@ -193,12 +193,25 @@ example, if the "release" task expected a parameter named
|
|
193
193
|
|
194
194
|
or
|
195
195
|
|
196
|
-
RELEASE_VERSION rake release
|
196
|
+
RELEASE_VERSION=0.8.2 rake release
|
197
|
+
|
198
|
+
or, alternatively
|
199
|
+
|
200
|
+
rake release RELEASE_VERSION=0.8.2
|
197
201
|
|
198
202
|
will work. Environment variable names must either match the task
|
199
203
|
parameter exactly, or match an all-uppercase version of the task
|
200
204
|
parameter.
|
201
205
|
|
206
|
+
<b>NOTE:</b> A variable declared within a rake command will
|
207
|
+
not persist in the environment:
|
208
|
+
|
209
|
+
$ export VALUE=old
|
210
|
+
$ rake print_value VALUE=new
|
211
|
+
new
|
212
|
+
$ rake print_value
|
213
|
+
old
|
214
|
+
|
202
215
|
=== Tasks that Expect Parameters
|
203
216
|
|
204
217
|
Parameters are only given to tasks that are setup to expect them. In
|
@@ -291,7 +304,7 @@ Running this example:
|
|
291
304
|
|
292
305
|
The ability to programmatically manipulate tasks gives rake very
|
293
306
|
powerful meta-programming capabilities w.r.t. task execution, but
|
294
|
-
should be used with
|
307
|
+
should be used with caution.
|
295
308
|
|
296
309
|
== Rules
|
297
310
|
|
@@ -337,7 +350,7 @@ required on *rule* when the first argument is a regular expression.
|
|
337
350
|
|
338
351
|
The following rule might be used for Java files ...
|
339
352
|
|
340
|
-
rule '.
|
353
|
+
rule '.class' => [
|
341
354
|
proc { |tn| tn.sub(/\.class$/, '.java').sub(/^classes\//, 'src/') }
|
342
355
|
] do |t|
|
343
356
|
java_compile(t.source, t.name)
|
@@ -550,6 +563,39 @@ This is the proper way to specify the task ...
|
|
550
563
|
# Actions go here
|
551
564
|
end
|
552
565
|
|
566
|
+
== Rakefile Path
|
567
|
+
|
568
|
+
When issuing the <tt>rake</tt> command in a terminal, Rake will look
|
569
|
+
for a Rakefile in the current directory. If a Rakefile is not found,
|
570
|
+
it will search parent directories until one is found.
|
571
|
+
|
572
|
+
For example, if a Rakefile resides in the <tt>project/</tt> directory,
|
573
|
+
moving deeper into the project's directory tree will not have an adverse
|
574
|
+
effect on rake tasks:
|
575
|
+
|
576
|
+
$ pwd
|
577
|
+
/home/user/project
|
578
|
+
|
579
|
+
$ cd lib/foo/bar
|
580
|
+
$ pwd
|
581
|
+
/home/user/project/lib/foo/bar
|
582
|
+
|
583
|
+
$ rake run_pwd
|
584
|
+
/home/user/project
|
585
|
+
|
586
|
+
As far as rake is concerned, all tasks are run from the directory in
|
587
|
+
which the Rakefile resides.
|
588
|
+
|
589
|
+
=== Multiple Rake Files
|
590
|
+
|
591
|
+
Not all tasks need to be included in a single Rakefile. Additional
|
592
|
+
rake files (with the file extension "<tt>.rake</tt>") may be placed in
|
593
|
+
<tt>rakelib</tt> directory located at the top level of a project (i.e.
|
594
|
+
the same directory that contains the main <tt>Rakefile</tt>).
|
595
|
+
|
596
|
+
Also, rails projects may include additional rake files in the
|
597
|
+
<tt>lib/tasks</tt> directory.
|
598
|
+
|
553
599
|
----
|
554
600
|
|
555
601
|
== See
|
data/lib/rake/application.rb
CHANGED
@@ -167,10 +167,16 @@ module Rake
|
|
167
167
|
rescue Exception => ex
|
168
168
|
# Exit with error message
|
169
169
|
display_error_message(ex)
|
170
|
-
|
170
|
+
exit_because_of_exception(ex)
|
171
171
|
end
|
172
172
|
end
|
173
173
|
|
174
|
+
# Exit the program because of an unhandle exception.
|
175
|
+
# (may be overridden by subclasses)
|
176
|
+
def exit_because_of_exception(ex)
|
177
|
+
exit(false)
|
178
|
+
end
|
179
|
+
|
174
180
|
# Display the error message that caused the exception.
|
175
181
|
def display_error_message(ex)
|
176
182
|
trace "#{name} aborted!"
|
@@ -625,13 +631,19 @@ module Rake
|
|
625
631
|
def collect_tasks
|
626
632
|
@top_level_tasks = []
|
627
633
|
ARGV.each do |arg|
|
628
|
-
if arg =~ /^(\w+)=(.*)$/
|
634
|
+
if arg =~ /^(\w+)=(.*)$/m
|
629
635
|
ENV[$1] = $2
|
630
636
|
else
|
631
637
|
@top_level_tasks << arg unless arg =~ /^-/
|
632
638
|
end
|
633
639
|
end
|
634
|
-
@top_level_tasks.push(
|
640
|
+
@top_level_tasks.push(default_task_name) if @top_level_tasks.empty?
|
641
|
+
end
|
642
|
+
|
643
|
+
# Default task name ("default").
|
644
|
+
# (May be overridden by subclasses)
|
645
|
+
def default_task_name
|
646
|
+
"default"
|
635
647
|
end
|
636
648
|
|
637
649
|
# Add a file to the list of files to be imported.
|
data/lib/rake/backtrace.rb
CHANGED
@@ -5,6 +5,7 @@ module Rake
|
|
5
5
|
keys.grep(/(prefix|libdir)/)).uniq + [
|
6
6
|
File.join(File.dirname(__FILE__), ".."),
|
7
7
|
].map { |f| Regexp.quote(File.expand_path(f)) }
|
8
|
+
SUPPRESSED_PATHS.map! { |s| s.gsub("\\", "/") }
|
8
9
|
SUPPRESSED_PATHS.reject! { |s| s.nil? || s =~ /^ *$/ }
|
9
10
|
|
10
11
|
SUPPRESS_PATTERN = %r!(\A#{SUPPRESSED_PATHS.join('|')}|bin/rake:\d+)!i
|
data/lib/rake/file_utils.rb
CHANGED
@@ -41,7 +41,7 @@ module FileUtils
|
|
41
41
|
unless options[:noop]
|
42
42
|
res = rake_system(*cmd)
|
43
43
|
status = $?
|
44
|
-
status = PseudoStatus.new(1) if !res && status.nil?
|
44
|
+
status = Rake::PseudoStatus.new(1) if !res && status.nil?
|
45
45
|
shell_runner.call(res, status)
|
46
46
|
end
|
47
47
|
end
|
@@ -58,7 +58,7 @@ module FileUtils
|
|
58
58
|
def set_verbose_option(options) # :nodoc:
|
59
59
|
unless options.key? :verbose
|
60
60
|
options[:verbose] =
|
61
|
-
Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT ||
|
61
|
+
(Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT) ||
|
62
62
|
Rake::FileUtilsExt.verbose_flag
|
63
63
|
end
|
64
64
|
end
|
data/lib/rake/file_utils_ext.rb
CHANGED
data/lib/rake/promise.rb
CHANGED
data/lib/rake/task.rb
CHANGED
@@ -61,6 +61,24 @@ module Rake
|
|
61
61
|
end
|
62
62
|
private :lookup_prerequisite
|
63
63
|
|
64
|
+
# List of all unique prerequisite tasks including prerequisite tasks'
|
65
|
+
# prerequisites.
|
66
|
+
# Includes self when cyclic dependencies are found.
|
67
|
+
def all_prerequisite_tasks
|
68
|
+
seen = {}
|
69
|
+
collect_prerequisites(seen)
|
70
|
+
seen.values
|
71
|
+
end
|
72
|
+
|
73
|
+
def collect_prerequisites(seen)
|
74
|
+
prerequisite_tasks.each do |pre|
|
75
|
+
next if seen[pre.name]
|
76
|
+
seen[pre.name] = pre
|
77
|
+
pre.collect_prerequisites(seen)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
protected :collect_prerequisites
|
81
|
+
|
64
82
|
# First source from a rule (nil if no sources)
|
65
83
|
def source
|
66
84
|
@sources.first if defined?(@sources)
|
@@ -69,17 +87,17 @@ module Rake
|
|
69
87
|
# Create a task named +task_name+ with no actions or prerequisites. Use
|
70
88
|
# +enhance+ to add actions and prerequisites.
|
71
89
|
def initialize(task_name, app)
|
72
|
-
@name
|
73
|
-
@prerequisites
|
74
|
-
@actions
|
90
|
+
@name = task_name.to_s
|
91
|
+
@prerequisites = []
|
92
|
+
@actions = []
|
75
93
|
@already_invoked = false
|
76
|
-
@full_comment
|
77
|
-
@comment
|
78
|
-
@lock
|
79
|
-
@application
|
80
|
-
@scope
|
81
|
-
@arg_names
|
82
|
-
@locations
|
94
|
+
@full_comment = nil
|
95
|
+
@comment = nil
|
96
|
+
@lock = Monitor.new
|
97
|
+
@application = app
|
98
|
+
@scope = app.current_scope
|
99
|
+
@arg_names = nil
|
100
|
+
@locations = []
|
83
101
|
end
|
84
102
|
|
85
103
|
# Enhance a task with prerequisites or actions. Returns self.
|
data/lib/rake/trace_output.rb
CHANGED
data/lib/rake/version.rb
CHANGED
@@ -185,9 +185,10 @@ class TestRakeApplicationOptions < Rake::TestCase
|
|
185
185
|
end
|
186
186
|
|
187
187
|
def test_quiet
|
188
|
+
Rake::FileUtilsExt.verbose_flag = true
|
188
189
|
flags('--quiet', '-q') do |opts|
|
189
|
-
assert ! Rake::FileUtilsExt.verbose_flag
|
190
|
-
assert ! opts.silent
|
190
|
+
assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag shoud be false"
|
191
|
+
assert ! opts.silent, "should not be silent"
|
191
192
|
end
|
192
193
|
end
|
193
194
|
|
@@ -198,9 +199,10 @@ class TestRakeApplicationOptions < Rake::TestCase
|
|
198
199
|
end
|
199
200
|
|
200
201
|
def test_silent
|
202
|
+
Rake::FileUtilsExt.verbose_flag = true
|
201
203
|
flags('--silent', '-s') do |opts|
|
202
|
-
assert ! Rake::FileUtilsExt.verbose_flag
|
203
|
-
assert opts.silent
|
204
|
+
assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag should be false"
|
205
|
+
assert opts.silent, "should be silent"
|
204
206
|
end
|
205
207
|
end
|
206
208
|
|
@@ -352,18 +354,16 @@ class TestRakeApplicationOptions < Rake::TestCase
|
|
352
354
|
end
|
353
355
|
|
354
356
|
def test_verbose
|
355
|
-
|
356
|
-
flags('--verbose', '-
|
357
|
-
assert Rake::FileUtilsExt.verbose_flag
|
358
|
-
assert ! opts.silent
|
357
|
+
capture_io do
|
358
|
+
flags('--verbose', '-v') do |opts|
|
359
|
+
assert Rake::FileUtilsExt.verbose_flag, "verbose should be true"
|
360
|
+
assert ! opts.silent, "opts should not be silent"
|
359
361
|
end
|
360
362
|
end
|
361
|
-
|
362
|
-
assert_equal "rake, version #{Rake::VERSION}\n", out
|
363
363
|
end
|
364
364
|
|
365
365
|
def test_version
|
366
|
-
out, = capture_io do
|
366
|
+
out, _ = capture_io do
|
367
367
|
flags '--version', '-V'
|
368
368
|
end
|
369
369
|
|
@@ -401,9 +401,21 @@ class TestRakeApplicationOptions < Rake::TestCase
|
|
401
401
|
|
402
402
|
def test_environment_definition
|
403
403
|
ENV.delete('TESTKEY')
|
404
|
-
command_line("
|
405
|
-
assert_equal [
|
406
|
-
|
404
|
+
command_line("TESTKEY=12")
|
405
|
+
assert_equal '12', ENV['TESTKEY']
|
406
|
+
end
|
407
|
+
|
408
|
+
def test_multiline_environment_definition
|
409
|
+
ENV.delete('TESTKEY')
|
410
|
+
command_line("TESTKEY=a\nb\n")
|
411
|
+
assert_equal "a\nb\n", ENV['TESTKEY']
|
412
|
+
end
|
413
|
+
|
414
|
+
def test_environment_and_tasks_together
|
415
|
+
ENV.delete('TESTKEY')
|
416
|
+
command_line("a", "b", "TESTKEY=12")
|
417
|
+
assert_equal ["a", "b"], @tasks.sort
|
418
|
+
assert_equal '12', ENV['TESTKEY']
|
407
419
|
end
|
408
420
|
|
409
421
|
def test_rake_explicit_task_library
|
data/test/test_rake_task.rb
CHANGED
@@ -32,7 +32,6 @@ class TestRakeTask < Rake::TestCase
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def test_inspect
|
35
|
-
# t = task(:foo, :needs => [:bar, :baz])
|
36
35
|
t = task(:foo => [:bar, :baz])
|
37
36
|
assert_equal "<Rake::Task foo => [bar, baz]>", t.inspect
|
38
37
|
end
|
@@ -40,8 +39,8 @@ class TestRakeTask < Rake::TestCase
|
|
40
39
|
def test_invoke
|
41
40
|
runlist = []
|
42
41
|
t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 }
|
43
|
-
|
44
|
-
|
42
|
+
task(:t2) { |t| runlist << t.name }
|
43
|
+
task(:t3) { |t| runlist << t.name }
|
45
44
|
assert_equal ["t2", "t3"], t1.prerequisites
|
46
45
|
t1.invoke
|
47
46
|
assert_equal ["t2", "t3", "t1"], runlist
|
@@ -88,8 +87,8 @@ class TestRakeTask < Rake::TestCase
|
|
88
87
|
def test_no_double_invoke
|
89
88
|
runlist = []
|
90
89
|
t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 }
|
91
|
-
|
92
|
-
|
90
|
+
task(:t2 => [:t3]) { |t| runlist << t.name }
|
91
|
+
task(:t3) { |t| runlist << t.name }
|
93
92
|
t1.invoke
|
94
93
|
assert_equal ["t3", "t2", "t1"], runlist
|
95
94
|
end
|
@@ -204,7 +203,7 @@ class TestRakeTask < Rake::TestCase
|
|
204
203
|
|
205
204
|
def test_prerequiste_tasks_fails_if_prerequisites_are_undefined
|
206
205
|
a = task :a => ["b", "c"]
|
207
|
-
|
206
|
+
task :b
|
208
207
|
assert_raises(RuntimeError) do
|
209
208
|
a.prerequisite_tasks
|
210
209
|
end
|
@@ -221,11 +220,36 @@ class TestRakeTask < Rake::TestCase
|
|
221
220
|
assert_equal [b, c], a.prerequisite_tasks
|
222
221
|
end
|
223
222
|
|
224
|
-
def
|
223
|
+
def test_all_prerequisite_tasks_includes_all_prerequisites
|
224
|
+
a = task :a => "b"
|
225
|
+
b = task :b => ["c", "d"]
|
226
|
+
c = task :c => "e"
|
227
|
+
d = task :d
|
228
|
+
e = task :e
|
229
|
+
|
230
|
+
assert_equal [b, c, d, e], a.all_prerequisite_tasks.sort_by { |t| t.name }
|
231
|
+
end
|
232
|
+
|
233
|
+
def test_all_prerequisite_tasks_does_not_include_duplicates
|
225
234
|
a = task :a => ["b", "c"]
|
226
|
-
b = task :b
|
235
|
+
b = task :b => "c"
|
227
236
|
c = task :c
|
228
237
|
|
238
|
+
assert_equal [b, c], a.all_prerequisite_tasks.sort_by { |t| t.name }
|
239
|
+
end
|
240
|
+
|
241
|
+
def test_all_prerequisite_tasks_includes_self_on_cyclic_dependencies
|
242
|
+
a = task :a => "b"
|
243
|
+
b = task :b => "a"
|
244
|
+
|
245
|
+
assert_equal [a, b], a.all_prerequisite_tasks.sort_by { |t| t.name }
|
246
|
+
end
|
247
|
+
|
248
|
+
def test_timestamp_returns_now_if_all_prereqs_have_no_times
|
249
|
+
a = task :a => ["b", "c"]
|
250
|
+
task :b
|
251
|
+
task :c
|
252
|
+
|
229
253
|
assert_in_delta Time.now, a.timestamp, 0.1, 'computer too slow?'
|
230
254
|
end
|
231
255
|
|
@@ -126,14 +126,14 @@ class TestRakeTaskWithArguments < Rake::TestCase
|
|
126
126
|
|
127
127
|
def test_named_args_are_passed_to_prereqs
|
128
128
|
value = nil
|
129
|
-
|
129
|
+
task(:pre, :rev) { |t, args| value = args.rev }
|
130
130
|
t = task(:t, [:name, :rev] => [:pre])
|
131
131
|
t.invoke("bill", "1.2")
|
132
132
|
assert_equal "1.2", value
|
133
133
|
end
|
134
134
|
|
135
135
|
def test_args_not_passed_if_no_prereq_names_on_task
|
136
|
-
|
136
|
+
task(:pre) { |t, args|
|
137
137
|
assert_equal({}, args.to_hash)
|
138
138
|
assert_equal "bill", args.name
|
139
139
|
}
|
@@ -142,7 +142,7 @@ class TestRakeTaskWithArguments < Rake::TestCase
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def test_args_not_passed_if_no_prereq_names_on_multitask
|
145
|
-
|
145
|
+
task(:pre) { |t, args|
|
146
146
|
assert_equal({}, args.to_hash)
|
147
147
|
assert_equal "bill", args.name
|
148
148
|
}
|
@@ -151,7 +151,7 @@ class TestRakeTaskWithArguments < Rake::TestCase
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def test_args_not_passed_if_no_arg_names
|
154
|
-
|
154
|
+
task(:pre, :rev) { |t, args|
|
155
155
|
assert_equal({}, args.to_hash)
|
156
156
|
}
|
157
157
|
t = task(:t => [:pre])
|
@@ -42,15 +42,13 @@ class TestRakeTestThreadPool < Rake::TestCase
|
|
42
42
|
assert_equal 2, threads.count
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
45
|
+
def test_pool_future_does_NOT_duplicate_arguments
|
46
46
|
pool = ThreadPool.new(2)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
pool.future(a,c){ |a_var,ignore| a_var.capitalize!; b.capitalize! }
|
47
|
+
obj = Object.new
|
48
|
+
captured = nil
|
49
|
+
pool.future(obj) { |var| captured = var }
|
51
50
|
pool.join
|
52
|
-
assert_equal
|
53
|
-
assert_equal 'b'.capitalize, b
|
51
|
+
assert_equal obj, captured
|
54
52
|
end
|
55
53
|
|
56
54
|
def test_pool_join_empties_queue
|
@@ -72,20 +70,21 @@ class TestRakeTestThreadPool < Rake::TestCase
|
|
72
70
|
assert_equal true, pool.__send__(:__queue__).empty?, "queue should be empty"
|
73
71
|
end
|
74
72
|
|
73
|
+
CustomError = Class.new(StandardError)
|
74
|
+
|
75
75
|
# test that throwing an exception way down in the blocks propagates
|
76
76
|
# to the top
|
77
77
|
def test_exceptions
|
78
78
|
pool = ThreadPool.new(10)
|
79
79
|
|
80
80
|
deep_exception_block = lambda do |count|
|
81
|
-
|
81
|
+
raise CustomError if ( count < 1 )
|
82
82
|
pool.future(count-1, &deep_exception_block).value
|
83
83
|
end
|
84
84
|
|
85
|
-
assert_raises(
|
85
|
+
assert_raises(CustomError) do
|
86
86
|
pool.future(2, &deep_exception_block).value
|
87
87
|
end
|
88
|
-
|
89
88
|
end
|
90
89
|
|
91
90
|
def test_pool_prevents_deadlock
|
data/test/test_trace_output.rb
CHANGED
@@ -30,6 +30,13 @@ class TestTraceOutput < Rake::TestCase
|
|
30
30
|
assert_equal 1, spy.calls
|
31
31
|
end
|
32
32
|
|
33
|
+
def test_trace_handles_nil_objects
|
34
|
+
spy = PrintSpy.new
|
35
|
+
trace_on(spy, "HI\n", nil, "LO")
|
36
|
+
assert_equal "HI\nLO\n", spy.result
|
37
|
+
assert_equal 1, spy.calls
|
38
|
+
end
|
39
|
+
|
33
40
|
def test_trace_issues_single_io_for_args_multiple_strings_and_alternate_sep
|
34
41
|
old_sep = $\
|
35
42
|
$\ = "\r"
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0.
|
5
|
-
prerelease:
|
4
|
+
version: 10.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jim Weirich
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-03-25 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: minitest
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -222,7 +219,9 @@ files:
|
|
222
219
|
- doc/release_notes/rake-10.0.2.rdoc
|
223
220
|
- doc/release_notes/rake-10.0.3.rdoc
|
224
221
|
homepage: http://rake.rubyforge.org
|
225
|
-
licenses:
|
222
|
+
licenses:
|
223
|
+
- MIT
|
224
|
+
metadata: {}
|
226
225
|
post_install_message:
|
227
226
|
rdoc_options:
|
228
227
|
- --line-numbers
|
@@ -234,21 +233,19 @@ rdoc_options:
|
|
234
233
|
require_paths:
|
235
234
|
- lib
|
236
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
237
|
-
none: false
|
238
236
|
requirements:
|
239
|
-
- -
|
237
|
+
- - '>='
|
240
238
|
- !ruby/object:Gem::Version
|
241
239
|
version: 1.8.6
|
242
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
|
-
none: false
|
244
241
|
requirements:
|
245
|
-
- -
|
242
|
+
- - '>='
|
246
243
|
- !ruby/object:Gem::Version
|
247
244
|
version: 1.3.2
|
248
245
|
requirements: []
|
249
246
|
rubyforge_project: rake
|
250
|
-
rubygems_version:
|
247
|
+
rubygems_version: 2.0.3
|
251
248
|
signing_key:
|
252
|
-
specification_version:
|
249
|
+
specification_version: 4
|
253
250
|
summary: Ruby based make-like utility.
|
254
251
|
test_files: []
|