drake 0.8.7.0.2.3 → 0.8.7.0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.drake +4 -0
- data/Rakefile.drake +4 -4
- data/lib/rake.rb +1 -1
- data/lib/rake/parallel.rb +1 -8
- data/test/test_file_task.rb +166 -1
- metadata +41 -21
data/CHANGES.drake
CHANGED
data/Rakefile.drake
CHANGED
@@ -13,9 +13,9 @@ task :drake_prerelease => [:clobber, :gemspec] do
|
|
13
13
|
unless `git status` =~ %r!nothing to commit \(working directory clean\)!
|
14
14
|
raise "Directory not clean"
|
15
15
|
end
|
16
|
-
unless `git pull` =~ %r!Already up-to-date!
|
17
|
-
|
18
|
-
end
|
16
|
+
#unless `git pull` =~ %r!Already up-to-date!
|
17
|
+
# raise "New stuff from remote repository"
|
18
|
+
#end
|
19
19
|
%w[github.com rubyforge.org].each { |server|
|
20
20
|
cmd = "ping " + (
|
21
21
|
if Config::CONFIG["host"] =~ %r!darwin!
|
@@ -59,7 +59,7 @@ task :drake_finish_release do
|
|
59
59
|
}
|
60
60
|
|
61
61
|
git("tag", "drake-" + SPEC.version.to_s)
|
62
|
-
git(*%w(push --tags origin
|
62
|
+
git(*%w(push --tags origin))
|
63
63
|
end
|
64
64
|
|
65
65
|
task :drake_release =>
|
data/lib/rake.rb
CHANGED
data/lib/rake/parallel.rb
CHANGED
@@ -110,15 +110,8 @@ module Rake
|
|
110
110
|
def invoke_with_call_chain_collector(task_args, new_chain, previous_chain)
|
111
111
|
prereqs = invoke_prerequisites_collector(task_args, new_chain)
|
112
112
|
parallel = application.parallel
|
113
|
-
if needed? or parallel.tasks[
|
113
|
+
if needed? or prereqs.any? { |p| parallel.tasks[p] }
|
114
114
|
parallel.tasks[self] = [task_args, prereqs]
|
115
|
-
unless previous_chain == InvocationChain::EMPTY
|
116
|
-
#
|
117
|
-
# Touch the parent to propagate 'needed?' upwards. This
|
118
|
-
# works because the recursion is depth-first.
|
119
|
-
#
|
120
|
-
parallel.tasks[previous_chain.value] = true
|
121
|
-
end
|
122
115
|
end
|
123
116
|
end
|
124
117
|
|
data/test/test_file_task.rb
CHANGED
@@ -17,7 +17,12 @@ class TestFileTask < Test::Unit::TestCase
|
|
17
17
|
def setup
|
18
18
|
Task.clear
|
19
19
|
@runs = SerializedArray.new
|
20
|
-
FileUtils.
|
20
|
+
FileUtils.rm_rf "testdata", :verbose => false
|
21
|
+
FileUtils.mkdir_p "testdata", :verbose => false
|
22
|
+
end
|
23
|
+
|
24
|
+
def teardown
|
25
|
+
FileUtils.rm_rf "testdata", :verbose => false
|
21
26
|
end
|
22
27
|
|
23
28
|
def test_create_dispersed_timed_files
|
@@ -119,6 +124,166 @@ class TestFileTask < Test::Unit::TestCase
|
|
119
124
|
assert_equal([ANCIENT_FILE, OLDFILE, MIDDLE_AGED_FILE], @runs)
|
120
125
|
end
|
121
126
|
|
127
|
+
def test_old_file_in_between_with_missing_leaf
|
128
|
+
create_dispersed_timed_files(MIDDLE_AGED_FILE, OLDFILE)
|
129
|
+
sleep 1
|
130
|
+
|
131
|
+
file MIDDLE_AGED_FILE => OLDFILE do |t|
|
132
|
+
@runs << t.name
|
133
|
+
touch MIDDLE_AGED_FILE, :verbose => false
|
134
|
+
end
|
135
|
+
file OLDFILE => NEWFILE do |t|
|
136
|
+
@runs << t.name
|
137
|
+
touch OLDFILE, :verbose => false
|
138
|
+
end
|
139
|
+
file NEWFILE do |t|
|
140
|
+
@runs << t.name
|
141
|
+
touch NEWFILE, :verbose => false
|
142
|
+
end
|
143
|
+
|
144
|
+
Task[MIDDLE_AGED_FILE].invoke
|
145
|
+
assert_equal([NEWFILE, OLDFILE, MIDDLE_AGED_FILE], @runs)
|
146
|
+
end
|
147
|
+
|
148
|
+
def test_two_old_files_in_between_with_missing_leaf
|
149
|
+
create_dispersed_timed_files(MIDDLE_AGED_FILE, OLDFILE, ANCIENT_FILE)
|
150
|
+
sleep 1
|
151
|
+
|
152
|
+
file MIDDLE_AGED_FILE => OLDFILE do |t|
|
153
|
+
@runs << t.name
|
154
|
+
touch MIDDLE_AGED_FILE, :verbose => false
|
155
|
+
end
|
156
|
+
file OLDFILE => ANCIENT_FILE do |t|
|
157
|
+
@runs << t.name
|
158
|
+
touch OLDFILE, :verbose => false
|
159
|
+
end
|
160
|
+
file ANCIENT_FILE => NEWFILE do |t|
|
161
|
+
@runs << t.name
|
162
|
+
touch ANCIENT_FILE, :verbose => false
|
163
|
+
end
|
164
|
+
file NEWFILE do |t|
|
165
|
+
@runs << t.name
|
166
|
+
touch NEWFILE, :verbose => false
|
167
|
+
end
|
168
|
+
|
169
|
+
Task[MIDDLE_AGED_FILE].invoke
|
170
|
+
assert_equal([NEWFILE, ANCIENT_FILE, OLDFILE, MIDDLE_AGED_FILE], @runs)
|
171
|
+
end
|
172
|
+
|
173
|
+
def test_diamond_graph_with_missing_leaf
|
174
|
+
a, b, c, d = %w[a b c d].map { |n| "testdata/#{n}" }
|
175
|
+
create_timed_files(a, b, c)
|
176
|
+
sleep 1
|
177
|
+
|
178
|
+
file a => [b, c] do
|
179
|
+
@runs << a
|
180
|
+
touch a
|
181
|
+
end
|
182
|
+
file b => d do
|
183
|
+
@runs << b
|
184
|
+
touch b
|
185
|
+
end
|
186
|
+
file c => d do
|
187
|
+
@runs << c
|
188
|
+
touch c
|
189
|
+
end
|
190
|
+
file d do
|
191
|
+
@runs << d
|
192
|
+
touch d
|
193
|
+
end
|
194
|
+
|
195
|
+
Task[a].invoke
|
196
|
+
assert_equal [a, b, c, d], @runs.sort
|
197
|
+
end
|
198
|
+
|
199
|
+
def test_diamond_graph_with_new_leaf
|
200
|
+
a, b, c, d = %w[a b c d].map { |n| "testdata/#{n}" }
|
201
|
+
create_timed_files(a, b, c)
|
202
|
+
sleep 1
|
203
|
+
touch d
|
204
|
+
|
205
|
+
file a => [b, c] do
|
206
|
+
@runs << a
|
207
|
+
touch a
|
208
|
+
end
|
209
|
+
file b => d do
|
210
|
+
@runs << b
|
211
|
+
touch b
|
212
|
+
end
|
213
|
+
file c => d do
|
214
|
+
@runs << c
|
215
|
+
touch c
|
216
|
+
end
|
217
|
+
file d do
|
218
|
+
@runs << d
|
219
|
+
touch d
|
220
|
+
end
|
221
|
+
|
222
|
+
Task[a].invoke
|
223
|
+
assert_equal [a, b, c], @runs.sort
|
224
|
+
end
|
225
|
+
|
226
|
+
def test_kite_graph_with_missing_leaf
|
227
|
+
a, b, c, d, e = %w[a b c d e].map { |n| "testdata/#{n}" }
|
228
|
+
create_timed_files(a, b, c, d)
|
229
|
+
sleep 1
|
230
|
+
|
231
|
+
file a => [b, c] do
|
232
|
+
@runs << a
|
233
|
+
touch a
|
234
|
+
end
|
235
|
+
file b => d do
|
236
|
+
@runs << b
|
237
|
+
touch b
|
238
|
+
end
|
239
|
+
file c => d do
|
240
|
+
@runs << c
|
241
|
+
touch c
|
242
|
+
end
|
243
|
+
file d => e do
|
244
|
+
@runs << d
|
245
|
+
touch d
|
246
|
+
end
|
247
|
+
file e do
|
248
|
+
@runs << e
|
249
|
+
touch e
|
250
|
+
end
|
251
|
+
|
252
|
+
Task[a].invoke
|
253
|
+
assert_equal [a, b, c, d, e], @runs.sort
|
254
|
+
end
|
255
|
+
|
256
|
+
def test_kite_graph_with_new_leaf
|
257
|
+
a, b, c, d, e = %w[a b c d e].map { |n| "testdata/#{n}" }
|
258
|
+
create_timed_files(a, b, c, d)
|
259
|
+
sleep 1
|
260
|
+
touch e
|
261
|
+
|
262
|
+
file a => [b, c] do
|
263
|
+
@runs << a
|
264
|
+
touch a
|
265
|
+
end
|
266
|
+
file b => d do
|
267
|
+
@runs << b
|
268
|
+
touch b
|
269
|
+
end
|
270
|
+
file c => d do
|
271
|
+
@runs << c
|
272
|
+
touch c
|
273
|
+
end
|
274
|
+
file d => e do
|
275
|
+
@runs << d
|
276
|
+
touch d
|
277
|
+
end
|
278
|
+
file e do
|
279
|
+
@runs << e
|
280
|
+
touch e
|
281
|
+
end
|
282
|
+
|
283
|
+
Task[a].invoke
|
284
|
+
assert_equal [a, b, c, d], @runs.sort
|
285
|
+
end
|
286
|
+
|
122
287
|
# I have currently disabled this test. I'm not convinced that
|
123
288
|
# deleting the file target on failure is always the proper thing to
|
124
289
|
# do. I'm willing to hear input on this topic.
|
metadata
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 207
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 8
|
9
|
+
- 7
|
10
|
+
- 0
|
11
|
+
- 2
|
12
|
+
- 4
|
13
|
+
version: 0.8.7.0.2.4
|
5
14
|
platform: ruby
|
6
15
|
authors:
|
7
16
|
- James M. Lawrence
|
@@ -9,20 +18,26 @@ autorequire:
|
|
9
18
|
bindir: bin
|
10
19
|
cert_chain: []
|
11
20
|
|
12
|
-
date:
|
21
|
+
date: 2010-06-07 00:00:00 -04:00
|
13
22
|
default_executable: drake
|
14
23
|
dependencies:
|
15
24
|
- !ruby/object:Gem::Dependency
|
16
25
|
name: comp_tree
|
17
|
-
|
18
|
-
|
19
|
-
|
26
|
+
prerelease: false
|
27
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
20
29
|
requirements:
|
21
30
|
- - ">="
|
22
31
|
- !ruby/object:Gem::Version
|
32
|
+
hash: 5
|
33
|
+
segments:
|
34
|
+
- 0
|
35
|
+
- 7
|
36
|
+
- 3
|
23
37
|
version: 0.7.3
|
24
|
-
|
25
|
-
|
38
|
+
type: :runtime
|
39
|
+
version_requirements: *id001
|
40
|
+
description: " Rake is a Make-like program implemented in Ruby. Tasks\n and dependencies are specified in standard Ruby syntax. \n"
|
26
41
|
email: quixoticsycophant@gmail.com
|
27
42
|
executables:
|
28
43
|
- drake
|
@@ -61,9 +76,9 @@ files:
|
|
61
76
|
- CHANGES
|
62
77
|
- CHANGES.drake
|
63
78
|
- MIT-LICENSE
|
79
|
+
- README
|
64
80
|
- Rakefile
|
65
81
|
- Rakefile.drake
|
66
|
-
- README
|
67
82
|
- TODO
|
68
83
|
- bin/drake
|
69
84
|
- lib/rake/alt_system.rb
|
@@ -108,10 +123,10 @@ files:
|
|
108
123
|
- test/test_definitions.rb
|
109
124
|
- test/test_earlytime.rb
|
110
125
|
- test/test_extension.rb
|
111
|
-
- test/test_filelist.rb
|
112
|
-
- test/test_fileutils.rb
|
113
126
|
- test/test_file_creation_task.rb
|
114
127
|
- test/test_file_task.rb
|
128
|
+
- test/test_filelist.rb
|
129
|
+
- test/test_fileutils.rb
|
115
130
|
- test/test_ftp.rb
|
116
131
|
- test/test_invocation_chain.rb
|
117
132
|
- test/test_makefile_loader.rb
|
@@ -125,10 +140,10 @@ files:
|
|
125
140
|
- test/test_rdoc_task.rb
|
126
141
|
- test/test_require.rb
|
127
142
|
- test/test_rules.rb
|
128
|
-
- test/test_tasklib.rb
|
129
|
-
- test/test_tasks.rb
|
130
143
|
- test/test_task_arguments.rb
|
131
144
|
- test/test_task_manager.rb
|
145
|
+
- test/test_tasklib.rb
|
146
|
+
- test/test_tasks.rb
|
132
147
|
- test/test_test_task.rb
|
133
148
|
- test/test_top_level_functions.rb
|
134
149
|
- test/test_win32.rb
|
@@ -143,14 +158,12 @@ files:
|
|
143
158
|
- test/data/namespace/Rakefile
|
144
159
|
- test/data/statusreturn/Rakefile
|
145
160
|
- test/data/unittest/Rakefile
|
146
|
-
- test/data/unittest/subdir
|
147
161
|
- doc/command_line_usage.rdoc
|
148
|
-
- doc/example
|
162
|
+
- doc/example/Rakefile1
|
163
|
+
- doc/example/Rakefile2
|
149
164
|
- doc/example/a.c
|
150
165
|
- doc/example/b.c
|
151
166
|
- doc/example/main.c
|
152
|
-
- doc/example/Rakefile1
|
153
|
-
- doc/example/Rakefile2
|
154
167
|
- doc/glossary.rdoc
|
155
168
|
- doc/jamis.rb
|
156
169
|
- doc/parallel.rdoc
|
@@ -158,7 +171,6 @@ files:
|
|
158
171
|
- doc/rake.1.gz
|
159
172
|
- doc/rakefile.rdoc
|
160
173
|
- doc/rational.rdoc
|
161
|
-
- doc/release_notes
|
162
174
|
- doc/release_notes/rake-0.4.14.rdoc
|
163
175
|
- doc/release_notes/rake-0.4.15.rdoc
|
164
176
|
- doc/release_notes/rake-0.5.0.rdoc
|
@@ -178,6 +190,8 @@ files:
|
|
178
190
|
- doc/release_notes/rake-0.8.7.rdoc
|
179
191
|
has_rdoc: true
|
180
192
|
homepage: http://drake.rubyforge.org
|
193
|
+
licenses: []
|
194
|
+
|
181
195
|
post_install_message:
|
182
196
|
rdoc_options:
|
183
197
|
- --line-numbers
|
@@ -188,23 +202,29 @@ rdoc_options:
|
|
188
202
|
require_paths:
|
189
203
|
- lib
|
190
204
|
required_ruby_version: !ruby/object:Gem::Requirement
|
205
|
+
none: false
|
191
206
|
requirements:
|
192
207
|
- - ">="
|
193
208
|
- !ruby/object:Gem::Version
|
209
|
+
hash: 3
|
210
|
+
segments:
|
211
|
+
- 0
|
194
212
|
version: "0"
|
195
|
-
version:
|
196
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
|
+
none: false
|
197
215
|
requirements:
|
198
216
|
- - ">="
|
199
217
|
- !ruby/object:Gem::Version
|
218
|
+
hash: 3
|
219
|
+
segments:
|
220
|
+
- 0
|
200
221
|
version: "0"
|
201
|
-
version:
|
202
222
|
requirements: []
|
203
223
|
|
204
224
|
rubyforge_project: drake
|
205
|
-
rubygems_version: 1.3.
|
225
|
+
rubygems_version: 1.3.7
|
206
226
|
signing_key:
|
207
|
-
specification_version:
|
227
|
+
specification_version: 3
|
208
228
|
summary: A branch of Rake supporting automatic parallelizing of tasks.
|
209
229
|
test_files: []
|
210
230
|
|