drake 0.8.7.0.2.4 → 0.9.0.0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/.gemtest +0 -0
  2. data/CHANGES +77 -9
  3. data/{CHANGES.drake → CHANGES-drake} +6 -2
  4. data/MIT-LICENSE +2 -0
  5. data/{README → README.rdoc} +30 -18
  6. data/Rakefile +144 -130
  7. data/Rakefile-drake +67 -0
  8. data/TODO +1 -1
  9. data/bin/drake +2 -0
  10. data/doc/command_line_usage.rdoc +25 -11
  11. data/doc/glossary.rdoc +2 -2
  12. data/doc/jamis.rb +2 -2
  13. data/doc/parallel.rdoc +37 -29
  14. data/doc/proto_rake.rdoc +22 -22
  15. data/doc/rake.1.gz +0 -0
  16. data/doc/rakefile.rdoc +56 -33
  17. data/doc/rational.rdoc +6 -6
  18. data/doc/release_notes/rake-0.4.15.rdoc +1 -1
  19. data/doc/release_notes/rake-0.5.0.rdoc +1 -1
  20. data/doc/release_notes/rake-0.7.0.rdoc +1 -1
  21. data/doc/release_notes/rake-0.7.2.rdoc +3 -3
  22. data/doc/release_notes/rake-0.7.3.rdoc +2 -2
  23. data/doc/release_notes/rake-0.8.0.rdoc +1 -1
  24. data/doc/release_notes/rake-0.8.2.rdoc +3 -3
  25. data/doc/release_notes/rake-0.8.3.rdoc +2 -2
  26. data/doc/release_notes/rake-0.8.4.rdoc +1 -1
  27. data/doc/release_notes/rake-0.8.5.rdoc +1 -1
  28. data/doc/release_notes/rake-0.8.6.rdoc +1 -1
  29. data/doc/release_notes/rake-0.8.7.rdoc +1 -1
  30. data/doc/release_notes/rake-0.9.0.rdoc +112 -0
  31. data/install.rb +14 -12
  32. data/lib/rake.rb +31 -2527
  33. data/lib/rake/alt_system.rb +7 -6
  34. data/lib/rake/application.rb +626 -0
  35. data/lib/rake/classic_namespace.rb +1 -0
  36. data/lib/rake/clean.rb +2 -4
  37. data/lib/rake/cloneable.rb +25 -0
  38. data/lib/rake/contrib/compositepublisher.rb +2 -5
  39. data/lib/rake/contrib/ftptools.rb +5 -8
  40. data/lib/rake/contrib/publisher.rb +2 -8
  41. data/lib/rake/contrib/rubyforgepublisher.rb +2 -4
  42. data/lib/rake/contrib/sshpublisher.rb +4 -6
  43. data/lib/rake/contrib/sys.rb +7 -25
  44. data/lib/rake/default_loader.rb +10 -0
  45. data/lib/rake/dsl.rb +2 -0
  46. data/lib/rake/dsl_definition.rb +143 -0
  47. data/lib/rake/early_time.rb +18 -0
  48. data/lib/rake/ext/core.rb +27 -0
  49. data/lib/rake/ext/module.rb +39 -0
  50. data/lib/rake/ext/string.rb +167 -0
  51. data/lib/rake/ext/time.rb +14 -0
  52. data/lib/rake/file_creation_task.rb +24 -0
  53. data/lib/rake/file_list.rb +403 -0
  54. data/lib/rake/file_task.rb +47 -0
  55. data/lib/rake/file_utils.rb +112 -0
  56. data/lib/rake/file_utils_ext.rb +142 -0
  57. data/lib/rake/gempackagetask.rb +6 -90
  58. data/lib/rake/invocation_chain.rb +51 -0
  59. data/lib/rake/invocation_exception_mixin.rb +16 -0
  60. data/lib/rake/loaders/makefile.rb +13 -15
  61. data/lib/rake/multi_task.rb +16 -0
  62. data/lib/rake/name_space.rb +25 -0
  63. data/lib/rake/packagetask.rb +13 -12
  64. data/lib/rake/parallel.rb +17 -28
  65. data/lib/rake/pathmap.rb +1 -0
  66. data/lib/rake/pseudo_status.rb +24 -0
  67. data/lib/rake/rake_module.rb +29 -0
  68. data/lib/rake/rake_test_loader.rb +10 -2
  69. data/lib/rake/rdoctask.rb +211 -190
  70. data/lib/rake/ruby182_test_unit_fix.rb +9 -7
  71. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  72. data/lib/rake/runtest.rb +4 -6
  73. data/lib/rake/task.rb +351 -0
  74. data/lib/rake/task_argument_error.rb +7 -0
  75. data/lib/rake/task_arguments.rb +74 -0
  76. data/lib/rake/task_manager.rb +307 -0
  77. data/lib/rake/tasklib.rb +1 -2
  78. data/lib/rake/testtask.rb +57 -27
  79. data/lib/rake/version.rb +13 -0
  80. data/lib/rake/win32.rb +4 -4
  81. data/test/contrib/test_sys.rb +8 -31
  82. data/test/data/access/Rakefile +33 -0
  83. data/test/data/comments/Rakefile +18 -0
  84. data/test/data/default/Rakefile +1 -1
  85. data/test/data/deprecated_import/Rakefile +1 -0
  86. data/test/data/dryrun/Rakefile +1 -1
  87. data/test/data/file_creation_task/Rakefile +1 -1
  88. data/test/data/namespace/Rakefile +9 -0
  89. data/test/data/rakelib/test1.rb +1 -0
  90. data/test/data/verbose/Rakefile +34 -0
  91. data/test/{filecreation.rb → file_creation.rb} +11 -7
  92. data/test/functional/functional_test.rb +25 -0
  93. data/test/{session_functional.rb → functional/session_based_tests.rb} +141 -23
  94. data/test/in_environment.rb +7 -5
  95. data/test/{test_application.rb → lib/application_test.rb} +331 -143
  96. data/test/{test_clean.rb → lib/clean_test.rb} +1 -0
  97. data/test/{test_definitions.rb → lib/definitions_test.rb} +4 -4
  98. data/test/lib/dsl_test.rb +52 -0
  99. data/test/{test_earlytime.rb → lib/earlytime_test.rb} +1 -2
  100. data/test/{test_extension.rb → lib/extension_test.rb} +2 -2
  101. data/test/{test_file_creation_task.rb → lib/file_creation_task_test.rb} +1 -1
  102. data/test/{test_file_task.rb → lib/file_task_test.rb} +9 -5
  103. data/test/{test_filelist.rb → lib/filelist_test.rb} +38 -24
  104. data/test/{test_fileutils.rb → lib/fileutils_test.rb} +27 -22
  105. data/test/{test_ftp.rb → lib/ftp_test.rb} +0 -0
  106. data/test/{test_invocation_chain.rb → lib/invocation_chain_test.rb} +0 -0
  107. data/test/{test_makefile_loader.rb → lib/makefile_loader_test.rb} +0 -0
  108. data/test/{test_multitask.rb → lib/multitask_test.rb} +3 -2
  109. data/test/{test_namespace.rb → lib/namespace_test.rb} +0 -0
  110. data/test/lib/package_task_test.rb +82 -0
  111. data/test/{test_parallel.rb → lib/parallel_test.rb} +5 -5
  112. data/test/{test_pathmap.rb → lib/pathmap_test.rb} +3 -2
  113. data/test/{test_pseudo_status.rb → lib/pseudo_status_test.rb} +0 -0
  114. data/test/{test_rake.rb → lib/rake_test.rb} +1 -1
  115. data/test/{test_rdoc_task.rb → lib/rdoc_task_test.rb} +19 -23
  116. data/test/{test_require.rb → lib/require_test.rb} +8 -2
  117. data/test/{test_rules.rb → lib/rules_test.rb} +4 -5
  118. data/test/{test_task_arguments.rb → lib/task_arguments_test.rb} +5 -5
  119. data/test/{test_task_manager.rb → lib/task_manager_test.rb} +15 -5
  120. data/test/{test_tasks.rb → lib/task_test.rb} +91 -28
  121. data/test/{test_tasklib.rb → lib/tasklib_test.rb} +0 -0
  122. data/test/{test_test_task.rb → lib/test_task_test.rb} +3 -3
  123. data/test/lib/testtask_test.rb +49 -0
  124. data/test/{test_top_level_functions.rb → lib/top_level_functions_test.rb} +5 -3
  125. data/test/{test_win32.rb → lib/win32_test.rb} +19 -0
  126. data/test/rake_test_setup.rb +6 -10
  127. data/test/ruby_version_test.rb +3 -0
  128. data/test/test_helper.rb +19 -0
  129. metadata +108 -66
  130. data/Rakefile.drake +0 -73
  131. data/test/functional.rb +0 -15
  132. data/test/test_package_task.rb +0 -118
@@ -3,8 +3,6 @@
3
3
  require 'test/unit'
4
4
  require 'fileutils'
5
5
  require 'rake'
6
- require 'test/filecreation'
7
- require 'test/capture_stdout'
8
6
  require 'test/rake_test_setup'
9
7
 
10
8
  ######################################################################
@@ -12,9 +10,16 @@ class TestTask < Test::Unit::TestCase
12
10
  include CaptureStdout
13
11
  include Rake
14
12
  include TestMethods
13
+ include Rake::DSL
15
14
 
16
15
  def setup
17
16
  Task.clear
17
+ Rake::TaskManager.record_task_metadata = true
18
+ end
19
+
20
+ def teardown
21
+ super
22
+ Rake::TaskManager.record_task_metadata = false
18
23
  end
19
24
 
20
25
  def test_create
@@ -27,15 +32,18 @@ class TestTask < Test::Unit::TestCase
27
32
  assert_equal t, arg
28
33
  assert_nil t.source
29
34
  assert_equal [], t.sources
35
+ assert_equal 1, t.locations.size
36
+ assert_match(/#{Regexp.quote(__FILE__)}/, t.locations.first)
30
37
  end
31
38
 
32
39
  def test_inspect
33
- t = task(:foo, :needs => [:bar, :baz])
40
+ # t = task(:foo, :needs => [:bar, :baz])
41
+ t = task(:foo => [:bar, :baz])
34
42
  assert_equal "<Rake::Task foo => [bar, baz]>", t.inspect
35
43
  end
36
44
 
37
45
  def test_invoke
38
- runlist = SerializedArray.new
46
+ runlist = ThreadSafeArray.new
39
47
  t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 }
40
48
  t2 = task(:t2) { |t| runlist << t.name }
41
49
  t3 = task(:t3) { |t| runlist << t.name }
@@ -52,7 +60,7 @@ class TestTask < Test::Unit::TestCase
52
60
  end
53
61
 
54
62
  def test_invoke_with_circular_dependencies
55
- runlist = SerializedArray.new
63
+ runlist = ThreadSafeArray.new
56
64
  t1 = task(:t1 => [:t2]) { |t| runlist << t.name; 3321 }
57
65
  t2 = task(:t2 => [:t1]) { |t| runlist << t.name }
58
66
  assert_equal ["t2"], t1.prerequisites
@@ -66,9 +74,9 @@ class TestTask < Test::Unit::TestCase
66
74
 
67
75
  def test_dry_run_prevents_actions
68
76
  Rake.application.options.dryrun = true
69
- runlist = SerializedArray.new
77
+ runlist = ThreadSafeArray.new
70
78
  t1 = task(:t1) { |t| runlist << t.name; 3321 }
71
- out = capture_stdout { t1.invoke }
79
+ out = capture_stderr { t1.invoke }
72
80
  assert_match(/execute .*t1/i, out)
73
81
  assert_match(/dry run/i, out)
74
82
  assert_no_match(/invoke/i, out)
@@ -80,7 +88,7 @@ class TestTask < Test::Unit::TestCase
80
88
  def test_tasks_can_be_traced
81
89
  Rake.application.options.trace = true
82
90
  t1 = task(:t1)
83
- out = capture_stdout {
91
+ out = capture_stderr {
84
92
  t1.invoke
85
93
  }
86
94
  assert_match(/invoke t1/i, out)
@@ -90,7 +98,7 @@ class TestTask < Test::Unit::TestCase
90
98
  end
91
99
 
92
100
  def test_no_double_invoke
93
- runlist = SerializedArray.new
101
+ runlist = ThreadSafeArray.new
94
102
  t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 }
95
103
  t2 = task(:t2 => [:t3]) { |t| runlist << t.name }
96
104
  t3 = task(:t3) { |t| runlist << t.name }
@@ -106,7 +114,7 @@ class TestTask < Test::Unit::TestCase
106
114
  end
107
115
 
108
116
  def test_can_double_invoke_with_reenable
109
- runlist = SerializedArray.new
117
+ runlist = ThreadSafeArray.new
110
118
  t1 = task(:t1) { |t| runlist << t.name }
111
119
  t1.invoke
112
120
  t1.reenable
@@ -148,7 +156,7 @@ class TestTask < Test::Unit::TestCase
148
156
  end
149
157
 
150
158
  def test_multi_invocations
151
- runs = SerializedArray.new
159
+ runs = ThreadSafeArray.new
152
160
  p = proc do |t| runs << t.name end
153
161
  task({:t1=>[:t2,:t3]}, &p)
154
162
  task({:t2=>[:t3]}, &p)
@@ -188,6 +196,56 @@ class TestTask < Test::Unit::TestCase
188
196
  assert_equal ["b", "c"], Task[:a].prerequisites
189
197
  end
190
198
 
199
+ def test_prerequiste_tasks_returns_tasks_not_strings
200
+ a = task :a => ["b", "c"]
201
+ b = task :b
202
+ c = task :c
203
+ assert_equal [b, c], a.prerequisite_tasks
204
+ end
205
+
206
+ def test_prerequiste_tasks_fails_if_prerequisites_are_undefined
207
+ a = task :a => ["b", "c"]
208
+ b = task :b
209
+ assert_exception(RuntimeError) do
210
+ a.prerequisite_tasks
211
+ end
212
+ end
213
+
214
+ def test_prerequiste_tasks_honors_namespaces
215
+ a = b = nil
216
+ namespace "X" do
217
+ a = task :a => ["b", "c"]
218
+ b = task :b
219
+ end
220
+ c = task :c
221
+
222
+ assert_equal [b, c], a.prerequisite_tasks
223
+ end
224
+
225
+ def test_timestamp_returns_now_if_all_prereqs_have_no_times
226
+ a = task :a => ["b", "c"]
227
+ b = task :b
228
+ c = task :c
229
+
230
+ faux_stamp = 100
231
+ flexmock(Time, :now => faux_stamp)
232
+
233
+ assert_equal faux_stamp, a.timestamp
234
+ end
235
+
236
+ def test_timestamp_returns_latest_prereq_timestamp
237
+ a = task :a => ["b", "c"]
238
+ b = task :b
239
+ c = task :c
240
+
241
+ faux_stamp = 100
242
+ flexmock(Time, :now => faux_stamp-10)
243
+ flexmock(b, :timestamp => faux_stamp - 1)
244
+ flexmock(c, :timestamp => faux_stamp)
245
+
246
+ assert_equal faux_stamp, a.timestamp
247
+ end
248
+
191
249
  def test_investigation_output
192
250
  t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 }
193
251
  task(:t2)
@@ -235,9 +293,17 @@ class TestTaskWithArguments < Test::Unit::TestCase
235
293
  include CaptureStdout
236
294
  include Rake
237
295
  include TestMethods
296
+ include Rake::DSL
238
297
 
239
298
  def setup
299
+ super
240
300
  Task.clear
301
+ Rake::TaskManager.record_task_metadata = true
302
+ end
303
+
304
+ def teardown
305
+ Rake::TaskManager.record_task_metadata = false
306
+ super
241
307
  end
242
308
 
243
309
  def test_no_args_given
@@ -257,23 +323,20 @@ class TestTaskWithArguments < Test::Unit::TestCase
257
323
  assert_equal ["pre"], t.prerequisites
258
324
  end
259
325
 
260
- def test_name_and_explicit_needs
261
- t = task(:t, :needs => [:pre])
262
- assert_equal "t", t.name
263
- assert_equal [], t.arg_names
264
- assert_equal ["pre"], t.prerequisites
265
- end
266
-
267
326
  def test_name_args_and_explicit_needs
268
- t = task(:t, :x, :y, :needs => [:pre])
269
- assert_equal "t", t.name
270
- assert_equal [:x, :y], t.arg_names
271
- assert_equal ["pre"], t.prerequisites
327
+ ignore_deprecations do
328
+ t = task(:t, :x, :y, :needs => [:pre])
329
+ assert_equal "t", t.name
330
+ assert_equal [:x, :y], t.arg_names
331
+ assert_equal ["pre"], t.prerequisites
332
+ end
272
333
  end
273
334
 
274
335
  def test_illegal_keys_in_task_name_hash
275
- assert_exception RuntimeError do
276
- t = task(:t, :x, :y => 1, :needs => [:pre])
336
+ ignore_deprecations do
337
+ assert_exception RuntimeError do
338
+ t = task(:t, :x, :y => 1, :needs => [:pre])
339
+ end
277
340
  end
278
341
  end
279
342
 
@@ -296,7 +359,7 @@ class TestTaskWithArguments < Test::Unit::TestCase
296
359
  end
297
360
 
298
361
  def test_actions_of_various_arity_are_ok_with_args
299
- notes = SerializedArray.new
362
+ notes = ThreadSafeArray.new
300
363
  t = task(:t, :x) do
301
364
  notes << :a
302
365
  end
@@ -364,7 +427,7 @@ class TestTaskWithArguments < Test::Unit::TestCase
364
427
  def test_named_args_are_passed_to_prereqs
365
428
  value = nil
366
429
  pre = task(:pre, :rev) { |t, args| value = args.rev }
367
- t = task(:t, :name, :rev, :needs => [:pre])
430
+ t = task(:t, [:name, :rev] => [:pre])
368
431
  t.invoke("bill", "1.2")
369
432
  assert_equal "1.2", value
370
433
  end
@@ -374,7 +437,7 @@ class TestTaskWithArguments < Test::Unit::TestCase
374
437
  assert_equal({}, args.to_hash)
375
438
  assert_equal "bill", args.name
376
439
  }
377
- t = task(:t, :name, :rev, :needs => [:pre])
440
+ t = task(:t, [:name, :rev] => [:pre])
378
441
  t.invoke("bill", "1.2")
379
442
  end
380
443
 
@@ -382,7 +445,7 @@ class TestTaskWithArguments < Test::Unit::TestCase
382
445
  pre = task(:pre, :rev) { |t, args|
383
446
  assert_equal({}, args.to_hash)
384
447
  }
385
- t = task(:t, :needs => [:pre])
448
+ t = task(:t => [:pre])
386
449
  t.invoke("bill", "1.2")
387
450
  end
388
451
  end
File without changes
@@ -6,7 +6,7 @@ require 'rake/testtask'
6
6
  class TestTestTask < Test::Unit::TestCase
7
7
  include Rake
8
8
  include TestMethods
9
-
9
+
10
10
  def setup
11
11
  Task.clear
12
12
  ENV.delete('TEST')
@@ -48,7 +48,7 @@ class TestTestTask < Test::Unit::TestCase
48
48
  tt = Rake::TestTask.new do |t|
49
49
  t.pattern = '*.rb'
50
50
  end
51
- assert_equal ['install.rb'], tt.file_list.to_a
51
+ assert_equal ['*.rb'], tt.file_list.to_a
52
52
  end
53
53
 
54
54
  def test_env_test
@@ -71,7 +71,7 @@ class TestTestTask < Test::Unit::TestCase
71
71
  t.test_files = FileList['a.rb', 'b.rb']
72
72
  t.pattern = '*.rb'
73
73
  end
74
- assert_equal ['a.rb', 'b.rb', 'install.rb'], tt.file_list.to_a
74
+ assert_equal ['a.rb', 'b.rb', '*.rb'], tt.file_list.to_a
75
75
  end
76
76
 
77
77
  end
@@ -0,0 +1,49 @@
1
+ require 'test/test_helper'
2
+ require 'rake/testtask'
3
+
4
+ class TestTaskTest < Test::Unit::TestCase
5
+ def test_direct_run_has_quoted_paths
6
+ test_task = Rake::TestTask.new(:tx) do |t|
7
+ t.loader = :direct
8
+ end
9
+ assert_match(/-e ".*"/, test_task.run_code)
10
+ end
11
+
12
+ def test_testrb_run_has_quoted_paths_on_ruby_182
13
+ test_task = Rake::TestTask.new(:tx) do |t|
14
+ t.loader = :testrb
15
+ end
16
+ flexmock(test_task).should_receive(:ruby_version).and_return('1.8.2')
17
+ assert_match(/^-S testrb +".*"$/, test_task.run_code)
18
+ end
19
+
20
+ def test_testrb_run_has_quoted_paths_on_ruby_186
21
+ test_task = Rake::TestTask.new(:tx) do |t|
22
+ t.loader = :testrb
23
+ end
24
+ flexmock(test_task).should_receive(:ruby_version).and_return('1.8.6')
25
+ assert_match(/^-S testrb +$/, test_task.run_code)
26
+ end
27
+
28
+ def test_rake_run_has_quoted_paths
29
+ test_task = Rake::TestTask.new(:tx) do |t|
30
+ t.loader = :rake
31
+ end
32
+ assert_match(/".*"/, test_task.run_code)
33
+ end
34
+
35
+ def test_nested_libs_will_be_flattened
36
+ test_task = Rake::TestTask.new(:tx) do |t|
37
+ t.libs << ["A", "B"]
38
+ end
39
+ sep = File::PATH_SEPARATOR
40
+ assert_match(/lib#{sep}A#{sep}B/, test_task.ruby_opts_string)
41
+ end
42
+
43
+ def test_empty_lib_path_implies_no_dash_I_option
44
+ test_task = Rake::TestTask.new(:tx) do |t|
45
+ t.libs = []
46
+ end
47
+ assert_no_match(/-I/, test_task.ruby_opts_string)
48
+ end
49
+ end
@@ -20,6 +20,8 @@ class TestTopLevelFunctions < Test::Unit::TestCase
20
20
  super
21
21
  @app = Rake.application
22
22
  Rake.application = flexmock("app")
23
+ Rake.application.should_receive(:deprecate).
24
+ and_return { |old, new, call| @app.deprecate(old, new, call) }
23
25
  end
24
26
 
25
27
  def teardown
@@ -49,15 +51,15 @@ class TestTopLevelFunctions < Test::Unit::TestCase
49
51
  end
50
52
 
51
53
  def test_when_not_writing
52
- RakeFileUtils.nowrite_flag = true
53
- out = capture_stdout do
54
+ Rake::FileUtilsExt.nowrite_flag = true
55
+ out = capture_stderr do
54
56
  when_writing("NOTWRITING") do
55
57
  puts "WRITING"
56
58
  end
57
59
  end
58
60
  assert_equal "DRYRUN: NOTWRITING\n", out
59
61
  ensure
60
- RakeFileUtils.nowrite_flag = false
62
+ Rake::FileUtilsExt.nowrite_flag = false
61
63
  end
62
64
 
63
65
  def test_missing_constants_task
@@ -9,6 +9,7 @@ require 'rake'
9
9
  class TestWin32 < Test::Unit::TestCase
10
10
  include InEnvironment
11
11
  include TestMethods
12
+ include CaptureStdout
12
13
 
13
14
  Win32 = Rake::Win32
14
15
 
@@ -69,4 +70,22 @@ class TestWin32 < Test::Unit::TestCase
69
70
  end
70
71
  end
71
72
 
73
+ def test_win32_backtrace_with_different_case
74
+ ex = nil
75
+ begin
76
+ raise 'test exception'
77
+ rescue => ex
78
+ end
79
+
80
+ ex.set_backtrace ['abc', 'rakefile']
81
+
82
+ rake = Rake::Application.new
83
+ rake.options.trace = true
84
+ rake.instance_variable_set(:@rakefile, 'Rakefile')
85
+
86
+ err = capture_stderr { rake.display_error_message(ex) }
87
+
88
+ assert_match(/rakefile/, err)
89
+ end
90
+
72
91
  end
@@ -9,22 +9,18 @@ end
9
9
 
10
10
  require 'thread'
11
11
  require 'flexmock/test_unit'
12
-
13
- if RUBY_VERSION >= "1.9.0"
14
- class Test::Unit::TestCase
15
- # def passed?
16
- # true
17
- # end
18
- end
19
- end
12
+ require 'test/file_creation'
13
+ require 'test/capture_stdout'
14
+ require 'test/test_helper'
20
15
 
21
16
  module TestMethods
22
- def assert_exception(ex, msg=nil, &block)
17
+ # Shim method for compatibility
18
+ def assert_exception(ex, msg="", &block)
23
19
  assert_raise(ex, msg, &block)
24
20
  end
25
21
  end
26
22
 
27
- class SerializedArray
23
+ class ThreadSafeArray
28
24
  def initialize
29
25
  @mutex = Mutex.new
30
26
  @array = Array.new
@@ -0,0 +1,3 @@
1
+ require 'test/unit'
2
+
3
+ puts "\nRUBY VERSION = #{RUBY_VERSION}"
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'rubygems'
3
+ rescue LoadError
4
+ end
5
+ require 'test/unit'
6
+ require 'flexmock/test_unit'
7
+
8
+ require 'rake'
9
+
10
+ class Test::Unit::TestCase
11
+ include Rake::DSL
12
+
13
+ def ignore_deprecations
14
+ Rake.application.options.ignore_deprecate = true
15
+ yield
16
+ ensure
17
+ Rake.application.options.ignore_deprecate = false
18
+ end
19
+ end
metadata CHANGED
@@ -1,16 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drake
3
3
  version: !ruby/object:Gem::Version
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
4
+ prerelease:
5
+ version: 0.9.0.0.3.0
14
6
  platform: ruby
15
7
  authors:
16
8
  - James M. Lawrence
@@ -18,8 +10,7 @@ autorequire:
18
10
  bindir: bin
19
11
  cert_chain: []
20
12
 
21
- date: 2010-06-07 00:00:00 -04:00
22
- default_executable: drake
13
+ date: 2011-05-21 00:00:00 Z
23
14
  dependencies:
24
15
  - !ruby/object:Gem::Dependency
25
16
  name: comp_tree
@@ -29,25 +20,43 @@ dependencies:
29
20
  requirements:
30
21
  - - ">="
31
22
  - !ruby/object:Gem::Version
32
- hash: 5
33
- segments:
34
- - 0
35
- - 7
36
- - 3
37
- version: 0.7.3
23
+ version: 1.1.3
38
24
  type: :runtime
39
25
  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
+ - !ruby/object:Gem::Dependency
27
+ name: session
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: "2.4"
35
+ type: :development
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: flexmock
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.8.11
46
+ type: :development
47
+ version_requirements: *id003
48
+ description: " Drake is an auto-parallelizing branch of Rake, a Make-like program\n implemented in Ruby. Tasks and dependencies are specified in standard\n Ruby syntax.\n"
41
49
  email: quixoticsycophant@gmail.com
42
50
  executables:
43
51
  - drake
44
52
  extensions: []
45
53
 
46
54
  extra_rdoc_files:
47
- - README
55
+ - README.rdoc
48
56
  - MIT-LICENSE
49
57
  - TODO
50
58
  - CHANGES
59
+ - CHANGES-drake
51
60
  - doc/command_line_usage.rdoc
52
61
  - doc/glossary.rdoc
53
62
  - doc/parallel.rdoc
@@ -71,35 +80,65 @@ extra_rdoc_files:
71
80
  - doc/release_notes/rake-0.8.5.rdoc
72
81
  - doc/release_notes/rake-0.8.6.rdoc
73
82
  - doc/release_notes/rake-0.8.7.rdoc
83
+ - doc/release_notes/rake-0.9.0.rdoc
74
84
  files:
85
+ - .gemtest
75
86
  - install.rb
76
87
  - CHANGES
77
- - CHANGES.drake
88
+ - CHANGES-drake
78
89
  - MIT-LICENSE
79
- - README
90
+ - README.rdoc
80
91
  - Rakefile
81
- - Rakefile.drake
92
+ - Rakefile-drake
82
93
  - TODO
83
94
  - bin/drake
84
95
  - lib/rake/alt_system.rb
96
+ - lib/rake/application.rb
85
97
  - lib/rake/classic_namespace.rb
86
98
  - lib/rake/clean.rb
99
+ - lib/rake/cloneable.rb
87
100
  - lib/rake/contrib/compositepublisher.rb
88
101
  - lib/rake/contrib/ftptools.rb
89
102
  - lib/rake/contrib/publisher.rb
90
103
  - lib/rake/contrib/rubyforgepublisher.rb
91
104
  - lib/rake/contrib/sshpublisher.rb
92
105
  - lib/rake/contrib/sys.rb
106
+ - lib/rake/default_loader.rb
107
+ - lib/rake/dsl.rb
108
+ - lib/rake/dsl_definition.rb
109
+ - lib/rake/early_time.rb
110
+ - lib/rake/ext/core.rb
111
+ - lib/rake/ext/module.rb
112
+ - lib/rake/ext/string.rb
113
+ - lib/rake/ext/time.rb
114
+ - lib/rake/file_creation_task.rb
115
+ - lib/rake/file_list.rb
116
+ - lib/rake/file_task.rb
117
+ - lib/rake/file_utils.rb
118
+ - lib/rake/file_utils_ext.rb
93
119
  - lib/rake/gempackagetask.rb
120
+ - lib/rake/invocation_chain.rb
121
+ - lib/rake/invocation_exception_mixin.rb
94
122
  - lib/rake/loaders/makefile.rb
123
+ - lib/rake/multi_task.rb
124
+ - lib/rake/name_space.rb
95
125
  - lib/rake/packagetask.rb
96
126
  - lib/rake/parallel.rb
127
+ - lib/rake/pathmap.rb
128
+ - lib/rake/pseudo_status.rb
129
+ - lib/rake/rake_module.rb
97
130
  - lib/rake/rake_test_loader.rb
98
131
  - lib/rake/rdoctask.rb
99
132
  - lib/rake/ruby182_test_unit_fix.rb
133
+ - lib/rake/rule_recursion_overflow_error.rb
100
134
  - lib/rake/runtest.rb
135
+ - lib/rake/task.rb
136
+ - lib/rake/task_argument_error.rb
137
+ - lib/rake/task_arguments.rb
138
+ - lib/rake/task_manager.rb
101
139
  - lib/rake/tasklib.rb
102
140
  - lib/rake/testtask.rb
141
+ - lib/rake/version.rb
103
142
  - lib/rake/win32.rb
104
143
  - lib/rake.rb
105
144
  - test/capture_stdout.rb
@@ -108,49 +147,56 @@ files:
108
147
  - test/contrib/test_sys.rb
109
148
  - test/data/rakelib/test1.rb
110
149
  - test/data/rbext/rakefile.rb
111
- - test/filecreation.rb
112
- - test/functional.rb
150
+ - test/file_creation.rb
151
+ - test/functional/functional_test.rb
152
+ - test/functional/session_based_tests.rb
113
153
  - test/in_environment.rb
154
+ - test/lib/application_test.rb
155
+ - test/lib/clean_test.rb
156
+ - test/lib/definitions_test.rb
157
+ - test/lib/dsl_test.rb
158
+ - test/lib/earlytime_test.rb
159
+ - test/lib/extension_test.rb
160
+ - test/lib/file_creation_task_test.rb
161
+ - test/lib/file_task_test.rb
162
+ - test/lib/filelist_test.rb
163
+ - test/lib/fileutils_test.rb
164
+ - test/lib/ftp_test.rb
165
+ - test/lib/invocation_chain_test.rb
166
+ - test/lib/makefile_loader_test.rb
167
+ - test/lib/multitask_test.rb
168
+ - test/lib/namespace_test.rb
169
+ - test/lib/package_task_test.rb
170
+ - test/lib/parallel_test.rb
171
+ - test/lib/pathmap_test.rb
172
+ - test/lib/pseudo_status_test.rb
173
+ - test/lib/rake_test.rb
174
+ - test/lib/rdoc_task_test.rb
175
+ - test/lib/require_test.rb
176
+ - test/lib/rules_test.rb
177
+ - test/lib/task_arguments_test.rb
178
+ - test/lib/task_manager_test.rb
179
+ - test/lib/task_test.rb
180
+ - test/lib/tasklib_test.rb
181
+ - test/lib/test_task_test.rb
182
+ - test/lib/testtask_test.rb
183
+ - test/lib/top_level_functions_test.rb
184
+ - test/lib/win32_test.rb
114
185
  - test/parallel_setup.rb
115
186
  - test/rake_test_setup.rb
116
187
  - test/reqfile.rb
117
188
  - test/reqfile2.rb
189
+ - test/ruby_version_test.rb
118
190
  - test/serial_setup.rb
119
- - test/session_functional.rb
120
191
  - test/shellcommand.rb
121
- - test/test_application.rb
122
- - test/test_clean.rb
123
- - test/test_definitions.rb
124
- - test/test_earlytime.rb
125
- - test/test_extension.rb
126
- - test/test_file_creation_task.rb
127
- - test/test_file_task.rb
128
- - test/test_filelist.rb
129
- - test/test_fileutils.rb
130
- - test/test_ftp.rb
131
- - test/test_invocation_chain.rb
132
- - test/test_makefile_loader.rb
133
- - test/test_multitask.rb
134
- - test/test_namespace.rb
135
- - test/test_package_task.rb
136
- - test/test_parallel.rb
137
- - test/test_pathmap.rb
138
- - test/test_pseudo_status.rb
139
- - test/test_rake.rb
140
- - test/test_rdoc_task.rb
141
- - test/test_require.rb
142
- - test/test_rules.rb
143
- - test/test_task_arguments.rb
144
- - test/test_task_manager.rb
145
- - test/test_tasklib.rb
146
- - test/test_tasks.rb
147
- - test/test_test_task.rb
148
- - test/test_top_level_functions.rb
149
- - test/test_win32.rb
192
+ - test/test_helper.rb
150
193
  - test/data/imports/deps.mf
151
194
  - test/data/sample.mf
195
+ - test/data/access/Rakefile
152
196
  - test/data/chains/Rakefile
197
+ - test/data/comments/Rakefile
153
198
  - test/data/default/Rakefile
199
+ - test/data/deprecated_import/Rakefile
154
200
  - test/data/dryrun/Rakefile
155
201
  - test/data/file_creation_task/Rakefile
156
202
  - test/data/imports/Rakefile
@@ -158,6 +204,7 @@ files:
158
204
  - test/data/namespace/Rakefile
159
205
  - test/data/statusreturn/Rakefile
160
206
  - test/data/unittest/Rakefile
207
+ - test/data/verbose/Rakefile
161
208
  - doc/command_line_usage.rdoc
162
209
  - doc/example/Rakefile1
163
210
  - doc/example/Rakefile2
@@ -188,15 +235,16 @@ files:
188
235
  - doc/release_notes/rake-0.8.5.rdoc
189
236
  - doc/release_notes/rake-0.8.6.rdoc
190
237
  - doc/release_notes/rake-0.8.7.rdoc
191
- has_rdoc: true
192
- homepage: http://drake.rubyforge.org
238
+ - doc/release_notes/rake-0.9.0.rdoc
239
+ homepage: http://quix.github.com/rake
193
240
  licenses: []
194
241
 
195
242
  post_install_message:
196
243
  rdoc_options:
197
244
  - --line-numbers
245
+ - --show-hash
198
246
  - --main
199
- - README
247
+ - README.rdoc
200
248
  - --title
201
249
  - "Drake: Distributed Rake"
202
250
  require_paths:
@@ -206,23 +254,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
254
  requirements:
207
255
  - - ">="
208
256
  - !ruby/object:Gem::Version
209
- hash: 3
210
- segments:
211
- - 0
212
257
  version: "0"
213
258
  required_rubygems_version: !ruby/object:Gem::Requirement
214
259
  none: false
215
260
  requirements:
216
261
  - - ">="
217
262
  - !ruby/object:Gem::Version
218
- hash: 3
219
- segments:
220
- - 0
221
- version: "0"
263
+ version: 1.3.2
222
264
  requirements: []
223
265
 
224
266
  rubyforge_project: drake
225
- rubygems_version: 1.3.7
267
+ rubygems_version: 1.8.3
226
268
  signing_key:
227
269
  specification_version: 3
228
270
  summary: A branch of Rake supporting automatic parallelizing of tasks.