rake 10.3.2 → 10.4.0
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/CONTRIBUTING.rdoc +3 -3
- data/History.rdoc +24 -0
- data/Manifest.txt +5 -1
- data/README.rdoc +5 -2
- data/Rakefile +2 -2
- data/doc/rake.1 +141 -0
- data/lib/rake.rb +2 -1
- data/lib/rake/application.rb +8 -2
- data/lib/rake/backtrace.rb +1 -1
- data/lib/rake/cloneable.rb +1 -1
- data/lib/rake/contrib/sshpublisher.rb +4 -4
- data/lib/rake/cpu_counter.rb +23 -7
- data/lib/rake/dsl_definition.rb +2 -1
- data/lib/rake/ext/module.rb +1 -0
- data/lib/rake/ext/pathname.rb +25 -0
- data/lib/rake/ext/string.rb +1 -1
- data/lib/rake/ext/time.rb +3 -2
- data/lib/rake/file_list.rb +18 -4
- data/lib/rake/file_task.rb +2 -2
- data/lib/rake/file_utils.rb +16 -4
- data/lib/rake/invocation_chain.rb +1 -1
- data/lib/rake/late_time.rb +17 -0
- data/lib/rake/packagetask.rb +3 -6
- data/lib/rake/task_manager.rb +2 -2
- data/test/helper.rb +5 -2
- data/test/support/rakefile_definitions.rb +1 -1
- data/test/support/ruby_runner.rb +6 -5
- data/test/test_rake_application.rb +14 -12
- data/test/test_rake_backtrace.rb +1 -1
- data/test/test_rake_clean.rb +7 -1
- data/test/test_rake_cpu_counter.rb +46 -28
- data/test/test_rake_definitions.rb +5 -0
- data/test/test_rake_directory_task.rb +13 -0
- data/test/test_rake_file_list.rb +28 -0
- data/test/test_rake_file_task.rb +19 -8
- data/test/test_rake_late_time.rb +18 -0
- data/test/test_rake_multi_task.rb +6 -0
- data/test/test_rake_pathname_extensions.rb +15 -0
- data/test/test_rake_task.rb +2 -1
- data/test/test_rake_task_argument_parsing.rb +10 -0
- data/test/test_rake_task_with_arguments.rb +1 -0
- data/test/test_rake_test_task.rb +1 -1
- data/test/test_rake_thread_pool.rb +4 -1
- metadata +17 -32
- checksums.yaml.gz.sig +0 -2
- data.tar.gz.sig +0 -0
- data/doc/rake.1.gz +0 -0
- metadata.gz.sig +0 -0
@@ -59,6 +59,11 @@ class TestRakeDefinitions < Rake::TestCase
|
|
59
59
|
assert_raises(RuntimeError) { Task[:x].invoke }
|
60
60
|
end
|
61
61
|
|
62
|
+
def test_falsey_dependencies
|
63
|
+
task :x => nil
|
64
|
+
assert_equal [], Task[:x].prerequisites
|
65
|
+
end
|
66
|
+
|
62
67
|
def test_implicit_file_dependencies
|
63
68
|
runs = []
|
64
69
|
create_existing_file
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require File.expand_path('../helper', __FILE__)
|
2
2
|
require 'fileutils'
|
3
|
+
require 'pathname'
|
3
4
|
|
4
5
|
class TestRakeDirectoryTask < Rake::TestCase
|
5
6
|
include Rake
|
@@ -60,4 +61,16 @@ class TestRakeDirectoryTask < Rake::TestCase
|
|
60
61
|
assert_equal ["t2", "a/b/c"], runlist
|
61
62
|
assert File.directory?("a/b/c")
|
62
63
|
end
|
64
|
+
|
65
|
+
def test_can_use_pathname
|
66
|
+
directory Pathname.new "a/b/c"
|
67
|
+
|
68
|
+
assert_equal FileCreationTask, Task["a/b/c"].class
|
69
|
+
|
70
|
+
verbose(false) {
|
71
|
+
Task['a/b/c'].invoke
|
72
|
+
}
|
73
|
+
|
74
|
+
assert File.directory?("a/b/c")
|
75
|
+
end
|
63
76
|
end
|
data/test/test_rake_file_list.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require File.expand_path('../helper', __FILE__)
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
class TestRakeFileList < Rake::TestCase
|
4
5
|
FileList = Rake::FileList
|
@@ -46,6 +47,12 @@ class TestRakeFileList < Rake::TestCase
|
|
46
47
|
fl.sort
|
47
48
|
end
|
48
49
|
|
50
|
+
def test_create_with_pathname
|
51
|
+
fl = FileList.new(Pathname.new("*.c"))
|
52
|
+
assert_equal ["abc.c", "x.c", "xyz.c"].sort,
|
53
|
+
fl.sort
|
54
|
+
end
|
55
|
+
|
49
56
|
def test_create_with_block
|
50
57
|
fl = FileList.new { |f| f.include("x") }
|
51
58
|
assert_equal ["x"], fl.resolve
|
@@ -74,12 +81,24 @@ class TestRakeFileList < Rake::TestCase
|
|
74
81
|
fl.sort
|
75
82
|
end
|
76
83
|
|
84
|
+
def test_include_with_pathname
|
85
|
+
fl = FileList.new.include(Pathname.new("*.c"))
|
86
|
+
assert_equal ["abc.c", "x.c", "xyz.c"].sort,
|
87
|
+
fl.sort
|
88
|
+
end
|
89
|
+
|
77
90
|
def test_append
|
78
91
|
fl = FileList.new
|
79
92
|
fl << "a.rb" << "b.rb"
|
80
93
|
assert_equal ['a.rb', 'b.rb'], fl
|
81
94
|
end
|
82
95
|
|
96
|
+
def test_append_pathname
|
97
|
+
fl = FileList.new
|
98
|
+
fl << Pathname.new("a.rb")
|
99
|
+
assert_equal ['a.rb'], fl
|
100
|
+
end
|
101
|
+
|
83
102
|
def test_add_many
|
84
103
|
fl = FileList.new
|
85
104
|
fl.include %w(a d c)
|
@@ -163,6 +182,15 @@ class TestRakeFileList < Rake::TestCase
|
|
163
182
|
assert_equal [], fl
|
164
183
|
end
|
165
184
|
|
185
|
+
def test_exclude_pathname
|
186
|
+
fl = FileList['x.c', 'abc.c', 'other']
|
187
|
+
fl.each { |fn| touch fn, :verbose => false }
|
188
|
+
|
189
|
+
fl.exclude(Pathname.new('*.c'))
|
190
|
+
|
191
|
+
assert_equal ['other'], fl
|
192
|
+
end
|
193
|
+
|
166
194
|
def test_excluding_via_block
|
167
195
|
fl = FileList['a.c', 'b.c', 'xyz.c']
|
168
196
|
fl.exclude { |fn| fn.pathmap('%n') == 'xyz' }
|
data/test/test_rake_file_task.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require File.expand_path('../helper', __FILE__)
|
2
2
|
require 'fileutils'
|
3
|
+
require 'pathname'
|
3
4
|
|
4
5
|
class TestRakeFileTask < Rake::TestCase
|
5
6
|
include Rake
|
@@ -23,6 +24,7 @@ class TestRakeFileTask < Rake::TestCase
|
|
23
24
|
File.delete(ftask.name) rescue nil
|
24
25
|
|
25
26
|
assert ftask.needed?, "file should be needed"
|
27
|
+
assert_equal Rake::LATE, ftask.timestamp
|
26
28
|
|
27
29
|
open(ftask.name, "w") { |f| f.puts "HI" }
|
28
30
|
|
@@ -83,19 +85,14 @@ class TestRakeFileTask < Rake::TestCase
|
|
83
85
|
end
|
84
86
|
|
85
87
|
def test_existing_file_depends_on_non_existing_file
|
86
|
-
@ran = false
|
87
|
-
|
88
88
|
create_file(OLDFILE)
|
89
89
|
delete_file(NEWFILE)
|
90
|
-
file NEWFILE
|
91
|
-
|
92
|
-
end
|
93
|
-
|
94
|
-
file OLDFILE => NEWFILE
|
90
|
+
file NEWFILE do |t| @runs << t.name end
|
91
|
+
file OLDFILE => NEWFILE do |t| @runs << t.name end
|
95
92
|
|
96
93
|
Task[OLDFILE].invoke
|
97
94
|
|
98
|
-
|
95
|
+
assert_equal [NEWFILE, OLDFILE], @runs
|
99
96
|
end
|
100
97
|
|
101
98
|
def test_needed_eh_build_all
|
@@ -162,6 +159,20 @@ class TestRakeFileTask < Rake::TestCase
|
|
162
159
|
assert_equal ["preqA", "preqB"], t.sources
|
163
160
|
end
|
164
161
|
|
162
|
+
def test_task_can_be_pathname
|
163
|
+
name = "dummy"
|
164
|
+
file Pathname.new name
|
165
|
+
|
166
|
+
ftask = Task[name]
|
167
|
+
|
168
|
+
assert_equal name.to_s, ftask.name
|
169
|
+
end
|
170
|
+
|
171
|
+
def test_prerequisite_can_be_pathname
|
172
|
+
t = file :f => Pathname.new("preq")
|
173
|
+
assert_equal "preq", t.source
|
174
|
+
end
|
175
|
+
|
165
176
|
# I have currently disabled this test. I'm not convinced that
|
166
177
|
# deleting the file target on failure is always the proper thing to
|
167
178
|
# do. I'm willing to hear input on this topic.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
class TestRakeLateTime < Rake::TestCase
|
4
|
+
def test_late_time_comparisons
|
5
|
+
late = Rake::LATE
|
6
|
+
assert_equal late, late
|
7
|
+
assert late >= Time.now
|
8
|
+
assert late > Time.now
|
9
|
+
assert late != Time.now
|
10
|
+
assert Time.now < late
|
11
|
+
assert Time.now <= late
|
12
|
+
assert Time.now != late
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_to_s
|
16
|
+
assert_equal '<LATE TIME>', Rake::LATE.to_s
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
require 'rake/ext/pathname'
|
3
|
+
|
4
|
+
class TestRakePathnameExtensions < Rake::TestCase
|
5
|
+
def test_ext_works_on_pathnames
|
6
|
+
pathname = Pathname.new("abc.foo")
|
7
|
+
assert_equal Pathname.new("abc.bar"), pathname.ext("bar")
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_path_map_works_on_pathnames
|
11
|
+
pathname = Pathname.new("this/is/a/dir/abc.rb")
|
12
|
+
assert_equal Pathname.new("abc.rb"), pathname.pathmap("%f")
|
13
|
+
assert_equal Pathname.new("this/is/a/dir"), pathname.pathmap("%d")
|
14
|
+
end
|
15
|
+
end
|
data/test/test_rake_task.rb
CHANGED
@@ -13,6 +13,7 @@ class TestRakeTask < Rake::TestCase
|
|
13
13
|
|
14
14
|
def teardown
|
15
15
|
Rake::TaskManager.record_task_metadata = false
|
16
|
+
Rake.application.thread_pool.join
|
16
17
|
|
17
18
|
super
|
18
19
|
end
|
@@ -270,7 +271,7 @@ class TestRakeTask < Rake::TestCase
|
|
270
271
|
result = []
|
271
272
|
|
272
273
|
t_a = task(:a) do |t|
|
273
|
-
sleep 0.
|
274
|
+
sleep 0.2
|
274
275
|
mx.synchronize { result << t.name }
|
275
276
|
end
|
276
277
|
|
@@ -49,6 +49,16 @@ class TestRakeTaskArgumentParsing < Rake::TestCase
|
|
49
49
|
assert_equal ["one", "two", "three_a, three_b", "four"], args
|
50
50
|
end
|
51
51
|
|
52
|
+
def test_treat_blank_arg_as_empty_string
|
53
|
+
name, args = @app.parse_task_string("name[one,]")
|
54
|
+
assert_equal "name", name
|
55
|
+
assert_equal ["one", ""], args
|
56
|
+
|
57
|
+
name, args = @app.parse_task_string("name[one,,two]")
|
58
|
+
assert_equal "name", name
|
59
|
+
assert_equal ["one", "", "two"], args
|
60
|
+
end
|
61
|
+
|
52
62
|
def test_terminal_width_using_env
|
53
63
|
app = Rake::Application.new
|
54
64
|
app.terminal_columns = 1234
|
data/test/test_rake_test_task.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require File.expand_path('../helper', __FILE__)
|
2
2
|
require 'rake/thread_pool'
|
3
|
-
require 'test/unit/assertions'
|
4
3
|
|
5
4
|
class TestRakeTestThreadPool < Rake::TestCase
|
6
5
|
include Rake
|
@@ -33,6 +32,8 @@ class TestRakeTestThreadPool < Rake::TestCase
|
|
33
32
|
refute_equal threads[0], threads[1]
|
34
33
|
refute_equal Thread.current, threads[0]
|
35
34
|
refute_equal Thread.current, threads[1]
|
35
|
+
ensure
|
36
|
+
pool.join
|
36
37
|
end
|
37
38
|
|
38
39
|
def test_pool_creates_the_correct_number_of_threads
|
@@ -95,6 +96,8 @@ class TestRakeTestThreadPool < Rake::TestCase
|
|
95
96
|
assert_raises(CustomError) do
|
96
97
|
pool.future(2, &deep_exception_block).value
|
97
98
|
end
|
99
|
+
ensure
|
100
|
+
pool.join
|
98
101
|
end
|
99
102
|
|
100
103
|
def test_pool_prevents_deadlock
|
metadata
CHANGED
@@ -1,36 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
8
8
|
- Jim Weirich
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
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YCvrO+Nj8ei2X/
|
28
|
-
+R7biySvcvWhCsIuBawVW6RxZdxaEHVZrbTX9cqGTAfnWhOIpsGJ/vNOofu1jIrw
|
29
|
-
dAwolOAbVCvXy7lPI7oFtVzGu18RT7NW6Q4frd28V0Qs4shmW+ckdlneSzN1hVft
|
30
|
-
pfkQPF5Ezsi73pEpFN93Fy21NKCYQH1jCwWeKUF29MIMGd6kE3ZmHW/7fz5GwKIM
|
31
|
-
Ls5SgY48a0l7Hw==
|
32
|
-
-----END CERTIFICATE-----
|
33
|
-
date: 2014-05-16 00:00:00.000000000 Z
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
34
13
|
dependencies:
|
35
14
|
- !ruby/object:Gem::Dependency
|
36
15
|
name: minitest
|
@@ -38,14 +17,14 @@ dependencies:
|
|
38
17
|
requirements:
|
39
18
|
- - "~>"
|
40
19
|
- !ruby/object:Gem::Version
|
41
|
-
version: '5.
|
20
|
+
version: '5.4'
|
42
21
|
type: :development
|
43
22
|
prerelease: false
|
44
23
|
version_requirements: !ruby/object:Gem::Requirement
|
45
24
|
requirements:
|
46
25
|
- - "~>"
|
47
26
|
- !ruby/object:Gem::Version
|
48
|
-
version: '5.
|
27
|
+
version: '5.4'
|
49
28
|
- !ruby/object:Gem::Dependency
|
50
29
|
name: rdoc
|
51
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,14 +45,14 @@ dependencies:
|
|
66
45
|
requirements:
|
67
46
|
- - "~>"
|
68
47
|
- !ruby/object:Gem::Version
|
69
|
-
version: '3.
|
48
|
+
version: '3.13'
|
70
49
|
type: :development
|
71
50
|
prerelease: false
|
72
51
|
version_requirements: !ruby/object:Gem::Requirement
|
73
52
|
requirements:
|
74
53
|
- - "~>"
|
75
54
|
- !ruby/object:Gem::Version
|
76
|
-
version: '3.
|
55
|
+
version: '3.13'
|
77
56
|
description: |-
|
78
57
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
79
58
|
specified in standard Ruby syntax.
|
@@ -165,7 +144,7 @@ files:
|
|
165
144
|
- doc/glossary.rdoc
|
166
145
|
- doc/jamis.rb
|
167
146
|
- doc/proto_rake.rdoc
|
168
|
-
- doc/rake.1
|
147
|
+
- doc/rake.1
|
169
148
|
- doc/rakefile.rdoc
|
170
149
|
- doc/rational.rdoc
|
171
150
|
- doc/release_notes/rake-0.4.14.rdoc
|
@@ -217,6 +196,7 @@ files:
|
|
217
196
|
- lib/rake/early_time.rb
|
218
197
|
- lib/rake/ext/core.rb
|
219
198
|
- lib/rake/ext/module.rb
|
199
|
+
- lib/rake/ext/pathname.rb
|
220
200
|
- lib/rake/ext/string.rb
|
221
201
|
- lib/rake/ext/time.rb
|
222
202
|
- lib/rake/file_creation_task.rb
|
@@ -227,6 +207,7 @@ files:
|
|
227
207
|
- lib/rake/gempackagetask.rb
|
228
208
|
- lib/rake/invocation_chain.rb
|
229
209
|
- lib/rake/invocation_exception_mixin.rb
|
210
|
+
- lib/rake/late_time.rb
|
230
211
|
- lib/rake/linked_list.rb
|
231
212
|
- lib/rake/loaders/makefile.rb
|
232
213
|
- lib/rake/multi_task.rb
|
@@ -281,6 +262,7 @@ files:
|
|
281
262
|
- test/test_rake_ftp_file.rb
|
282
263
|
- test/test_rake_functional.rb
|
283
264
|
- test/test_rake_invocation_chain.rb
|
265
|
+
- test/test_rake_late_time.rb
|
284
266
|
- test/test_rake_linked_list.rb
|
285
267
|
- test/test_rake_makefile_loader.rb
|
286
268
|
- test/test_rake_multi_task.rb
|
@@ -289,6 +271,7 @@ files:
|
|
289
271
|
- test/test_rake_path_map.rb
|
290
272
|
- test/test_rake_path_map_explode.rb
|
291
273
|
- test/test_rake_path_map_partial.rb
|
274
|
+
- test/test_rake_pathname_extensions.rb
|
292
275
|
- test/test_rake_pseudo_status.rb
|
293
276
|
- test/test_rake_rake_test_loader.rb
|
294
277
|
- test/test_rake_reduce_compat.rb
|
@@ -308,7 +291,7 @@ files:
|
|
308
291
|
- test/test_rake_win32.rb
|
309
292
|
- test/test_thread_history_display.rb
|
310
293
|
- test/test_trace_output.rb
|
311
|
-
homepage: https://github.com/
|
294
|
+
homepage: https://github.com/ruby/rake
|
312
295
|
licenses:
|
313
296
|
- MIT
|
314
297
|
metadata: {}
|
@@ -329,8 +312,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
329
312
|
- !ruby/object:Gem::Version
|
330
313
|
version: 1.3.2
|
331
314
|
requirements: []
|
332
|
-
rubyforge_project:
|
333
|
-
rubygems_version: 2.
|
315
|
+
rubyforge_project:
|
316
|
+
rubygems_version: 2.4.2
|
334
317
|
signing_key:
|
335
318
|
specification_version: 4
|
336
319
|
summary: Rake is a Make-like program implemented in Ruby
|
@@ -355,6 +338,7 @@ test_files:
|
|
355
338
|
- test/test_rake_ftp_file.rb
|
356
339
|
- test/test_rake_functional.rb
|
357
340
|
- test/test_rake_invocation_chain.rb
|
341
|
+
- test/test_rake_late_time.rb
|
358
342
|
- test/test_rake_linked_list.rb
|
359
343
|
- test/test_rake_makefile_loader.rb
|
360
344
|
- test/test_rake_multi_task.rb
|
@@ -363,6 +347,7 @@ test_files:
|
|
363
347
|
- test/test_rake_path_map.rb
|
364
348
|
- test/test_rake_path_map_explode.rb
|
365
349
|
- test/test_rake_path_map_partial.rb
|
350
|
+
- test/test_rake_pathname_extensions.rb
|
366
351
|
- test/test_rake_pseudo_status.rb
|
367
352
|
- test/test_rake_rake_test_loader.rb
|
368
353
|
- test/test_rake_reduce_compat.rb
|
checksums.yaml.gz.sig
DELETED
data.tar.gz.sig
DELETED
Binary file
|
data/doc/rake.1.gz
DELETED
Binary file
|
metadata.gz.sig
DELETED
Binary file
|