rake 0.9.2 → 13.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.rdoc +43 -0
  3. data/Gemfile +10 -0
  4. data/History.rdoc +2386 -0
  5. data/MIT-LICENSE +1 -1
  6. data/README.rdoc +64 -109
  7. data/Rakefile +22 -386
  8. data/bin/bundle +105 -0
  9. data/bin/console +7 -0
  10. data/bin/rake +20 -23
  11. data/bin/rdoc +29 -0
  12. data/bin/rubocop +29 -0
  13. data/bin/setup +6 -0
  14. data/doc/command_line_usage.rdoc +65 -21
  15. data/doc/glossary.rdoc +40 -49
  16. data/doc/jamis.rb +1 -0
  17. data/doc/rake.1 +156 -0
  18. data/doc/rakefile.rdoc +127 -62
  19. data/exe/rake +27 -0
  20. data/lib/rake.rb +37 -31
  21. data/lib/rake/application.rb +507 -272
  22. data/lib/rake/backtrace.rb +24 -0
  23. data/lib/rake/clean.rb +55 -8
  24. data/lib/rake/cloneable.rb +11 -19
  25. data/lib/rake/cpu_counter.rb +107 -0
  26. data/lib/rake/default_loader.rb +5 -0
  27. data/lib/rake/dsl_definition.rb +74 -46
  28. data/lib/rake/early_time.rb +5 -1
  29. data/lib/rake/ext/core.rb +5 -6
  30. data/lib/rake/ext/string.rb +61 -52
  31. data/lib/rake/file_creation_task.rb +4 -3
  32. data/lib/rake/file_list.rb +81 -49
  33. data/lib/rake/file_task.rb +15 -8
  34. data/lib/rake/file_utils.rb +69 -47
  35. data/lib/rake/file_utils_ext.rb +18 -26
  36. data/lib/rake/invocation_chain.rb +25 -19
  37. data/lib/rake/invocation_exception_mixin.rb +1 -0
  38. data/lib/rake/late_time.rb +18 -0
  39. data/lib/rake/linked_list.rb +112 -0
  40. data/lib/rake/loaders/makefile.rb +23 -9
  41. data/lib/rake/multi_task.rb +4 -6
  42. data/lib/rake/name_space.rb +36 -23
  43. data/lib/rake/packagetask.rb +71 -34
  44. data/lib/rake/phony.rb +16 -0
  45. data/lib/rake/private_reader.rb +21 -0
  46. data/lib/rake/promise.rb +100 -0
  47. data/lib/rake/pseudo_status.rb +8 -2
  48. data/lib/rake/rake_module.rb +41 -3
  49. data/lib/rake/rake_test_loader.rb +21 -7
  50. data/lib/rake/rule_recursion_overflow_error.rb +2 -2
  51. data/lib/rake/scope.rb +43 -0
  52. data/lib/rake/task.rb +186 -79
  53. data/lib/rake/task_argument_error.rb +1 -0
  54. data/lib/rake/task_arguments.rb +50 -15
  55. data/lib/rake/task_manager.rb +89 -65
  56. data/lib/rake/tasklib.rb +2 -12
  57. data/lib/rake/testtask.rb +61 -63
  58. data/lib/rake/thread_history_display.rb +49 -0
  59. data/lib/rake/thread_pool.rb +163 -0
  60. data/lib/rake/trace_output.rb +23 -0
  61. data/lib/rake/version.rb +7 -7
  62. data/lib/rake/win32.rb +14 -18
  63. data/rake.gemspec +43 -0
  64. metadata +82 -221
  65. data/.gemtest +0 -0
  66. data/CHANGES +0 -509
  67. data/RRR +0 -9
  68. data/TODO +0 -20
  69. data/doc/rake.1.gz +0 -0
  70. data/doc/release_notes/rake-0.4.14.rdoc +0 -23
  71. data/doc/release_notes/rake-0.4.15.rdoc +0 -35
  72. data/doc/release_notes/rake-0.5.0.rdoc +0 -53
  73. data/doc/release_notes/rake-0.5.3.rdoc +0 -78
  74. data/doc/release_notes/rake-0.5.4.rdoc +0 -46
  75. data/doc/release_notes/rake-0.6.0.rdoc +0 -141
  76. data/doc/release_notes/rake-0.7.0.rdoc +0 -119
  77. data/doc/release_notes/rake-0.7.1.rdoc +0 -59
  78. data/doc/release_notes/rake-0.7.2.rdoc +0 -121
  79. data/doc/release_notes/rake-0.7.3.rdoc +0 -47
  80. data/doc/release_notes/rake-0.8.0.rdoc +0 -114
  81. data/doc/release_notes/rake-0.8.2.rdoc +0 -165
  82. data/doc/release_notes/rake-0.8.3.rdoc +0 -112
  83. data/doc/release_notes/rake-0.8.4.rdoc +0 -147
  84. data/doc/release_notes/rake-0.8.5.rdoc +0 -53
  85. data/doc/release_notes/rake-0.8.6.rdoc +0 -55
  86. data/doc/release_notes/rake-0.8.7.rdoc +0 -55
  87. data/doc/release_notes/rake-0.9.0.rdoc +0 -112
  88. data/doc/release_notes/rake-0.9.1.rdoc +0 -52
  89. data/doc/release_notes/rake-0.9.2.rdoc +0 -49
  90. data/install.rb +0 -90
  91. data/lib/rake/alt_system.rb +0 -109
  92. data/lib/rake/classic_namespace.rb +0 -9
  93. data/lib/rake/contrib/compositepublisher.rb +0 -21
  94. data/lib/rake/contrib/ftptools.rb +0 -150
  95. data/lib/rake/contrib/publisher.rb +0 -69
  96. data/lib/rake/contrib/rubyforgepublisher.rb +0 -16
  97. data/lib/rake/contrib/sshpublisher.rb +0 -45
  98. data/lib/rake/contrib/sys.rb +0 -191
  99. data/lib/rake/ext/module.rb +0 -39
  100. data/lib/rake/ext/time.rb +0 -14
  101. data/lib/rake/gempackagetask.rb +0 -13
  102. data/lib/rake/pathmap.rb +0 -1
  103. data/lib/rake/rdoctask.rb +0 -230
  104. data/lib/rake/ruby182_test_unit_fix.rb +0 -25
  105. data/lib/rake/runtest.rb +0 -21
  106. data/test/check_expansion.rb +0 -5
  107. data/test/check_no_expansion.rb +0 -5
  108. data/test/data/access/Rakefile +0 -35
  109. data/test/data/chains/Rakefile +0 -15
  110. data/test/data/comments/Rakefile +0 -18
  111. data/test/data/default/Rakefile +0 -17
  112. data/test/data/deprecated_import/Rakefile +0 -1
  113. data/test/data/dryrun/Rakefile +0 -22
  114. data/test/data/extra/Rakefile +0 -1
  115. data/test/data/file_creation_task/Rakefile +0 -31
  116. data/test/data/imports/Rakefile +0 -19
  117. data/test/data/imports/deps.mf +0 -1
  118. data/test/data/multidesc/Rakefile +0 -15
  119. data/test/data/namespace/Rakefile +0 -64
  120. data/test/data/rakelib/test1.rb +0 -4
  121. data/test/data/rbext/rakefile.rb +0 -3
  122. data/test/data/sample.mf +0 -14
  123. data/test/data/statusreturn/Rakefile +0 -6
  124. data/test/data/unittest/Rakefile +0 -1
  125. data/test/data/verbose/Rakefile +0 -34
  126. data/test/file_creation.rb +0 -34
  127. data/test/helper.rb +0 -44
  128. data/test/in_environment.rb +0 -35
  129. data/test/reqfile.rb +0 -3
  130. data/test/reqfile2.rb +0 -3
  131. data/test/shellcommand.rb +0 -3
  132. data/test/test_rake.rb +0 -38
  133. data/test/test_rake_application.rb +0 -364
  134. data/test/test_rake_application_options.rb +0 -382
  135. data/test/test_rake_clean.rb +0 -12
  136. data/test/test_rake_definitions.rb +0 -80
  137. data/test/test_rake_directory_task.rb +0 -55
  138. data/test/test_rake_dsl.rb +0 -73
  139. data/test/test_rake_early_time.rb +0 -31
  140. data/test/test_rake_extension.rb +0 -59
  141. data/test/test_rake_file_creation_task.rb +0 -62
  142. data/test/test_rake_file_list.rb +0 -633
  143. data/test/test_rake_file_list_path_map.rb +0 -8
  144. data/test/test_rake_file_task.rb +0 -104
  145. data/test/test_rake_file_utils.rb +0 -252
  146. data/test/test_rake_ftp_file.rb +0 -59
  147. data/test/test_rake_functional.rb +0 -468
  148. data/test/test_rake_invocation_chain.rb +0 -52
  149. data/test/test_rake_makefile_loader.rb +0 -23
  150. data/test/test_rake_multi_task.rb +0 -51
  151. data/test/test_rake_name_space.rb +0 -43
  152. data/test/test_rake_package_task.rb +0 -78
  153. data/test/test_rake_path_map.rb +0 -157
  154. data/test/test_rake_path_map_explode.rb +0 -31
  155. data/test/test_rake_path_map_partial.rb +0 -18
  156. data/test/test_rake_pseudo_status.rb +0 -20
  157. data/test/test_rake_rdoc_task.rb +0 -81
  158. data/test/test_rake_require.rb +0 -35
  159. data/test/test_rake_rules.rb +0 -346
  160. data/test/test_rake_task.rb +0 -271
  161. data/test/test_rake_task_argument_parsing.rb +0 -116
  162. data/test/test_rake_task_arguments.rb +0 -86
  163. data/test/test_rake_task_lib.rb +0 -9
  164. data/test/test_rake_task_manager.rb +0 -145
  165. data/test/test_rake_task_manager_argument_resolution.rb +0 -36
  166. data/test/test_rake_task_with_arguments.rb +0 -162
  167. data/test/test_rake_test_task.rb +0 -122
  168. data/test/test_rake_top_level_functions.rb +0 -76
  169. data/test/test_rake_win32.rb +0 -83
  170. data/test/test_sys.rb +0 -20
@@ -1,76 +0,0 @@
1
- require File.expand_path('../helper', __FILE__)
2
-
3
- class TestRakeTopLevelFunctions < Rake::TestCase
4
-
5
- def setup
6
- super
7
-
8
- @app = Rake.application
9
- Rake.application = flexmock("app")
10
- Rake.application.should_receive(:deprecate).
11
- and_return { |old, new, call| @app.deprecate(old, new, call) }
12
- end
13
-
14
- def teardown
15
- Rake.application = @app
16
-
17
- super
18
- end
19
-
20
- def test_namespace
21
- Rake.application.should_receive(:in_namespace).with("xyz", any).once
22
- namespace "xyz" do end
23
- end
24
-
25
- def test_import
26
- Rake.application.should_receive(:add_import).with("x").once.ordered
27
- Rake.application.should_receive(:add_import).with("y").once.ordered
28
- Rake.application.should_receive(:add_import).with("z").once.ordered
29
- import('x', 'y', 'z')
30
- end
31
-
32
- def test_when_writing
33
- out, = capture_io do
34
- when_writing("NOTWRITING") do
35
- puts "WRITING"
36
- end
37
- end
38
- assert_equal "WRITING\n", out
39
- end
40
-
41
- def test_when_not_writing
42
- Rake::FileUtilsExt.nowrite_flag = true
43
- _, err = capture_io do
44
- when_writing("NOTWRITING") do
45
- puts "WRITING"
46
- end
47
- end
48
- assert_equal "DRYRUN: NOTWRITING\n", err
49
- ensure
50
- Rake::FileUtilsExt.nowrite_flag = false
51
- end
52
-
53
- def test_missing_constants_task
54
- Rake.application.should_receive(:const_warning).with(:Task).once
55
- Object.const_missing(:Task)
56
- end
57
-
58
- def test_missing_constants_file_task
59
- Rake.application.should_receive(:const_warning).with(:FileTask).once
60
- Object.const_missing(:FileTask)
61
- end
62
-
63
- def test_missing_constants_file_creation_task
64
- Rake.application.should_receive(:const_warning).with(:FileCreationTask).once
65
- Object.const_missing(:FileCreationTask)
66
- end
67
-
68
- def test_missing_constants_rake_app
69
- Rake.application.should_receive(:const_warning).with(:RakeApp).once
70
- Object.const_missing(:RakeApp)
71
- end
72
-
73
- def test_missing_other_constant
74
- assert_raises(NameError) do Object.const_missing(:Xyz) end
75
- end
76
- end
@@ -1,83 +0,0 @@
1
- require File.expand_path('../helper', __FILE__)
2
-
3
- class TestRakeWin32 < Rake::TestCase
4
- include InEnvironment
5
-
6
- Win32 = Rake::Win32
7
-
8
- def test_win32_system_dir_uses_home_if_defined
9
- in_environment('RAKE_SYSTEM' => nil, 'HOME' => 'C:\\HP') do
10
- assert_equal "C:/HP/Rake", Win32.win32_system_dir
11
- end
12
- end
13
-
14
- def test_win32_system_dir_uses_homedrive_homepath_when_no_home_defined
15
- in_environment(
16
- 'RAKE_SYSTEM' => nil,
17
- 'HOME' => nil,
18
- 'HOMEDRIVE' => "C:",
19
- 'HOMEPATH' => "\\HP"
20
- ) do
21
- assert_equal "C:/HP/Rake", Win32.win32_system_dir
22
- end
23
- end
24
-
25
- def test_win32_system_dir_uses_appdata_when_no_home_or_home_combo
26
- in_environment(
27
- 'RAKE_SYSTEM' => nil,
28
- 'HOME' => nil,
29
- 'HOMEDRIVE' => nil,
30
- 'HOMEPATH' => nil,
31
- 'APPDATA' => "C:\\Documents and Settings\\HP\\Application Data"
32
- ) do
33
- assert_equal "C:/Documents and Settings/HP/Application Data/Rake", Win32.win32_system_dir
34
- end
35
- end
36
-
37
- def test_win32_system_dir_fallback_to_userprofile_otherwise
38
- in_environment(
39
- 'RAKE_SYSTEM' => nil,
40
- 'HOME' => nil,
41
- 'HOMEDRIVE' => nil,
42
- 'HOMEPATH' => nil,
43
- 'APPDATA' => nil,
44
- 'USERPROFILE' => "C:\\Documents and Settings\\HP"
45
- ) do
46
- assert_equal "C:/Documents and Settings/HP/Rake", Win32.win32_system_dir
47
- end
48
- end
49
-
50
- def test_win32_system_dir_nil_of_no_env_vars
51
- in_environment(
52
- 'RAKE_SYSTEM' => nil,
53
- 'HOME' => nil,
54
- 'HOMEDRIVE' => nil,
55
- "HOMEPATH" => nil,
56
- 'APPDATA' => nil,
57
- "USERPROFILE" => nil
58
- ) do
59
- assert_raises(Rake::Win32::Win32HomeError) do
60
- Win32.win32_system_dir
61
- end
62
- end
63
- end
64
-
65
- def test_win32_backtrace_with_different_case
66
- ex = nil
67
- begin
68
- raise 'test exception'
69
- rescue => ex
70
- end
71
-
72
- ex.set_backtrace ['abc', 'rakefile']
73
-
74
- rake = Rake::Application.new
75
- rake.options.trace = true
76
- rake.instance_variable_set(:@rakefile, 'Rakefile')
77
-
78
- _, err = capture_io { rake.display_error_message(ex) }
79
-
80
- assert_match(/rakefile/, err)
81
- end
82
-
83
- end
data/test/test_sys.rb DELETED
@@ -1,20 +0,0 @@
1
- require File.expand_path('../helper', __FILE__)
2
- begin
3
- old_verbose = $VERBOSE
4
- $VERBOSE = nil
5
- require 'rake/contrib/sys'
6
- ensure
7
- $VERBOSE = old_verbose
8
- end
9
-
10
- class TestSys < Rake::TestCase
11
-
12
- def test_split_all
13
- assert_equal ['a'], Sys.split_all('a')
14
- assert_equal ['..'], Sys.split_all('..')
15
- assert_equal ['/'], Sys.split_all('/')
16
- assert_equal ['a', 'b'], Sys.split_all('a/b')
17
- assert_equal ['/', 'a', 'b'], Sys.split_all('/a/b')
18
- assert_equal ['..', 'a', 'b'], Sys.split_all('../a/b')
19
- end
20
- end