rake 0.8.7 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. data/.gemtest +0 -0
  2. data/CHANGES +77 -9
  3. data/{README → README.rdoc} +14 -10
  4. data/Rakefile +129 -118
  5. data/TODO +1 -1
  6. data/doc/command_line_usage.rdoc +18 -6
  7. data/doc/glossary.rdoc +2 -2
  8. data/doc/jamis.rb +2 -2
  9. data/doc/proto_rake.rdoc +22 -22
  10. data/doc/rake.1.gz +0 -0
  11. data/doc/rakefile.rdoc +55 -32
  12. data/doc/rational.rdoc +6 -6
  13. data/doc/release_notes/rake-0.4.15.rdoc +1 -1
  14. data/doc/release_notes/rake-0.5.0.rdoc +1 -1
  15. data/doc/release_notes/rake-0.7.0.rdoc +1 -1
  16. data/doc/release_notes/rake-0.7.2.rdoc +3 -3
  17. data/doc/release_notes/rake-0.7.3.rdoc +2 -2
  18. data/doc/release_notes/rake-0.8.0.rdoc +1 -1
  19. data/doc/release_notes/rake-0.8.2.rdoc +3 -3
  20. data/doc/release_notes/rake-0.8.3.rdoc +2 -2
  21. data/doc/release_notes/rake-0.8.4.rdoc +1 -1
  22. data/doc/release_notes/rake-0.8.5.rdoc +1 -1
  23. data/doc/release_notes/rake-0.8.6.rdoc +1 -1
  24. data/doc/release_notes/rake-0.8.7.rdoc +1 -1
  25. data/doc/release_notes/rake-0.9.0.rdoc +112 -0
  26. data/install.rb +14 -12
  27. data/lib/rake/alt_system.rb +7 -6
  28. data/lib/rake/application.rb +589 -0
  29. data/lib/rake/classic_namespace.rb +1 -0
  30. data/lib/rake/clean.rb +2 -4
  31. data/lib/rake/cloneable.rb +25 -0
  32. data/lib/rake/contrib/compositepublisher.rb +2 -5
  33. data/lib/rake/contrib/ftptools.rb +5 -8
  34. data/lib/rake/contrib/publisher.rb +2 -8
  35. data/lib/rake/contrib/rubyforgepublisher.rb +2 -4
  36. data/lib/rake/contrib/sshpublisher.rb +4 -6
  37. data/lib/rake/contrib/sys.rb +7 -25
  38. data/lib/rake/default_loader.rb +10 -0
  39. data/lib/rake/dsl.rb +2 -0
  40. data/lib/rake/dsl_definition.rb +143 -0
  41. data/lib/rake/early_time.rb +18 -0
  42. data/lib/rake/ext/core.rb +27 -0
  43. data/lib/rake/ext/module.rb +39 -0
  44. data/lib/rake/ext/string.rb +167 -0
  45. data/lib/rake/ext/time.rb +14 -0
  46. data/lib/rake/file_creation_task.rb +24 -0
  47. data/lib/rake/file_list.rb +403 -0
  48. data/lib/rake/file_task.rb +47 -0
  49. data/lib/rake/file_utils.rb +112 -0
  50. data/lib/rake/file_utils_ext.rb +142 -0
  51. data/lib/rake/gempackagetask.rb +6 -90
  52. data/lib/rake/invocation_chain.rb +51 -0
  53. data/lib/rake/invocation_exception_mixin.rb +16 -0
  54. data/lib/rake/loaders/makefile.rb +13 -15
  55. data/lib/rake/multi_task.rb +16 -0
  56. data/lib/rake/name_space.rb +25 -0
  57. data/lib/rake/packagetask.rb +13 -12
  58. data/lib/rake/pathmap.rb +1 -0
  59. data/lib/rake/pseudo_status.rb +24 -0
  60. data/lib/rake/rake_module.rb +29 -0
  61. data/lib/rake/rake_test_loader.rb +10 -2
  62. data/lib/rake/rdoctask.rb +211 -190
  63. data/lib/rake/ruby182_test_unit_fix.rb +9 -7
  64. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  65. data/lib/rake/runtest.rb +4 -6
  66. data/lib/rake/task.rb +327 -0
  67. data/lib/rake/task_argument_error.rb +7 -0
  68. data/lib/rake/task_arguments.rb +74 -0
  69. data/lib/rake/task_manager.rb +307 -0
  70. data/lib/rake/tasklib.rb +1 -2
  71. data/lib/rake/testtask.rb +57 -27
  72. data/lib/rake/version.rb +10 -0
  73. data/lib/rake/win32.rb +4 -4
  74. data/lib/rake.rb +29 -2470
  75. data/test/contrib/test_sys.rb +8 -31
  76. data/test/data/access/Rakefile +33 -0
  77. data/test/data/comments/Rakefile +18 -0
  78. data/test/data/default/Rakefile +1 -1
  79. data/test/data/deprecated_import/Rakefile +1 -0
  80. data/test/data/dryrun/Rakefile +1 -1
  81. data/test/data/file_creation_task/Rakefile +1 -1
  82. data/test/data/namespace/Rakefile +9 -0
  83. data/test/data/rakelib/test1.rb +1 -0
  84. data/test/data/verbose/Rakefile +34 -0
  85. data/test/{filecreation.rb → file_creation.rb} +11 -7
  86. data/test/functional/functional_test.rb +25 -0
  87. data/test/{session_functional.rb → functional/session_based_tests.rb} +141 -23
  88. data/test/in_environment.rb +7 -5
  89. data/test/{test_application.rb → lib/application_test.rb} +331 -143
  90. data/test/{test_clean.rb → lib/clean_test.rb} +1 -0
  91. data/test/{test_definitions.rb → lib/definitions_test.rb} +3 -3
  92. data/test/lib/dsl_test.rb +52 -0
  93. data/test/{test_earlytime.rb → lib/earlytime_test.rb} +1 -2
  94. data/test/{test_extension.rb → lib/extension_test.rb} +2 -2
  95. data/test/{test_file_creation_task.rb → lib/file_creation_task_test.rb} +1 -1
  96. data/test/{test_file_task.rb → lib/file_task_test.rb} +4 -4
  97. data/test/{test_filelist.rb → lib/filelist_test.rb} +38 -24
  98. data/test/{test_fileutils.rb → lib/fileutils_test.rb} +27 -22
  99. data/test/{test_multitask.rb → lib/multitask_test.rb} +14 -6
  100. data/test/lib/package_task_test.rb +82 -0
  101. data/test/{test_pathmap.rb → lib/pathmap_test.rb} +3 -2
  102. data/test/{test_rake.rb → lib/rake_test.rb} +1 -1
  103. data/test/{test_rdoc_task.rb → lib/rdoc_task_test.rb} +19 -23
  104. data/test/{test_require.rb → lib/require_test.rb} +8 -2
  105. data/test/{test_rules.rb → lib/rules_test.rb} +2 -3
  106. data/test/{test_task_arguments.rb → lib/task_arguments_test.rb} +5 -5
  107. data/test/{test_task_manager.rb → lib/task_manager_test.rb} +15 -5
  108. data/test/{test_tasks.rb → lib/task_test.rb} +84 -21
  109. data/test/{test_test_task.rb → lib/test_task_test.rb} +3 -3
  110. data/test/lib/testtask_test.rb +49 -0
  111. data/test/{test_top_level_functions.rb → lib/top_level_functions_test.rb} +5 -3
  112. data/test/{test_win32.rb → lib/win32_test.rb} +19 -0
  113. data/test/rake_test_setup.rb +5 -9
  114. data/test/ruby_version_test.rb +3 -0
  115. data/test/test_helper.rb +19 -0
  116. metadata +108 -49
  117. data/test/functional.rb +0 -15
  118. data/test/test_package_task.rb +0 -118
  119. /data/test/{test_ftp.rb → lib/ftp_test.rb} +0 -0
  120. /data/test/{test_invocation_chain.rb → lib/invocation_chain_test.rb} +0 -0
  121. /data/test/{test_makefile_loader.rb → lib/makefile_loader_test.rb} +0 -0
  122. /data/test/{test_namespace.rb → lib/namespace_test.rb} +0 -0
  123. /data/test/{test_pseudo_status.rb → lib/pseudo_status_test.rb} +0 -0
  124. /data/test/{test_tasklib.rb → lib/tasklib_test.rb} +0 -0
data/.gemtest ADDED
File without changes
data/CHANGES CHANGED
@@ -1,6 +1,70 @@
1
-
2
1
  = Rake Changelog
3
2
 
3
+ == Version 0.9.0
4
+
5
+ * Rake now warns when the deprecated :needs syntax used.
6
+
7
+ * Moved Rake DSL commands to top level ruby object 'main'. Rake DSL
8
+ commands are no longer private methods in Object. (Suggested by
9
+ James M. Lawrence/quix)
10
+
11
+ * Rake history is now UTF-8 encoded.
12
+
13
+ * Rake now uses case-insensitive comparisons to find the Rakefile on Windows.
14
+ Based on patch by Roger Pack.
15
+
16
+ * Rake now requires (instead of loads) files in the test task. Patch by Cezary
17
+ Baginski.
18
+
19
+ * Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow.
20
+
21
+ * Rake now prints the Rakefile directory only when it's different from the
22
+ current directory. Patch by Alex Chaffee.
23
+
24
+ * Improved rakefile_location discovery on Windows. Patch by James Tucker.
25
+
26
+ * Rake now recognizes "Windows Server" as a windows system. Patch by Matthias
27
+ Lüdtke
28
+
29
+ * Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require
30
+ 'rdoc/task')
31
+
32
+ * Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require
33
+ 'rubygems/package_task')
34
+
35
+ * Rake now outputs various messages to $stderr instead of $stdout.
36
+
37
+ * Rake no longer emits warnings for Config. Patch by Santiago Pastorino.
38
+
39
+ * Removed Rake's DSL methods from the top level scope. If you need to
40
+ call 'task :xzy' in your code, include Rake::DSL into your class, or
41
+ put the code in a Rake::DSL.environment do ... end block.
42
+
43
+ * Split rake.rb into individual files.
44
+
45
+ * Support for the --where (-W) flag for showing where a task is defined.
46
+
47
+ * Fixed quoting in test task.
48
+ (http://onestepback.org/redmine/issues/show/44,
49
+ http://www.pivotaltracker.com/story/show/1223138)
50
+
51
+ * Fixed the silent option parsing problem.
52
+ (http://onestepback.org/redmine/issues/show/47)
53
+
54
+ * Fixed :verbose=>false flag on sh and ruby commands.
55
+
56
+ * Rake command line options may be given by default in a RAKEOPT
57
+ environment variable.
58
+
59
+ * Errors in Rake will now display the task invocation chain in effect
60
+ at the time of the error.
61
+
62
+ * Accepted change by warnickr to not expand test patterns in shell
63
+ (allowing more files in the test suite).
64
+
65
+ * Fixed that file tasks did not perform prereq lookups in scope
66
+ (Redmine #57).
67
+
4
68
  == Version 0.8.7
5
69
 
6
70
  * Fixed EXEEXT for JRuby on windows.
@@ -10,6 +74,10 @@
10
74
  * Minor fixes to the RDoc generation (removed dependency on darkfish
11
75
  and removed inline source option).
12
76
 
77
+ == PreVersion 0.8.6
78
+
79
+ * Now allow # comments to comment a task definition.
80
+
13
81
  == Version 0.8.5
14
82
 
15
83
  * Better support for the system command on Windows.
@@ -36,7 +104,7 @@
36
104
  * Fixed stray ARGV option problem that was interfering with
37
105
  Test::Unit::Runner.
38
106
 
39
- * Fixed default verbose mode (was accidently changed to false).
107
+ * Fixed default verbose mode (was accidently changed to false).
40
108
 
41
109
  * Removed reference to manage_gem to fix the warning produced by the
42
110
  gem package task.
@@ -49,7 +117,7 @@
49
117
  directory.
50
118
 
51
119
  * Added fix to handle ruby installations in directories with spaces in
52
- their name.
120
+ their name.
53
121
 
54
122
  == Version 0.8.2
55
123
 
@@ -66,7 +134,7 @@
66
134
  symbol/string differences. (Patch supplied by Edwin Pratomo)
67
135
 
68
136
  * Fixed bug with rules involving multiple source (Patch supplied by
69
- Emanuel Inderm�hle)
137
+ Emanuel Indermühle)
70
138
 
71
139
  * Switched from getoptlong to optparse (patches supplied by Edwin
72
140
  Pratomo)
@@ -87,7 +155,7 @@
87
155
 
88
156
  * Changed from using Mutex to Monitor. Evidently Mutex causes thread
89
157
  join errors when Ruby is compiled with -disable-pthreads. (Patch
90
- supplied by Ittay Dror)
158
+ supplied by Ittay Dror)
91
159
 
92
160
  * Fixed bug in makefile parser that had problems with extra spaces in
93
161
  file task names. (Patch supplied by Ittay Dror)
@@ -142,14 +210,14 @@
142
210
  * Fixed some bugs where the application object was going to the global
143
211
  appliation instead of using its own data.
144
212
  * Added square and curly bracket patterns to FileList#include (Tilman
145
- Sauerbeck).
213
+ Sauerbeck).
146
214
  * Added plain filename support to rule dependents (suggested by Nobu
147
- Nakada).
215
+ Nakada).
148
216
  * Added pathmap support to rule dependents.
149
217
  * Added a 'tasks' method to a namespace to get a list of tasks
150
218
  associated with the namespace.
151
219
  * Fixed the method name leak from FileUtils (bug found by Glenn
152
- Vanderburg).
220
+ Vanderburg).
153
221
  * Added rake_extension to handle detection of extension collisions.
154
222
  * Added test for noop, bad_option and verbose flags to sh command.
155
223
  * Removed dependency on internal fu_xxx functions from FileUtils.
@@ -270,7 +338,7 @@
270
338
  * Fixed a bug that prevented the TESTOPTS flag from working with the
271
339
  revised for 1.8.2 test task.
272
340
  * Updated the docs on --trace to indicate that it also enables a full
273
- backtrace on errors.
341
+ backtrace on errors.
274
342
 
275
343
  == Version 0.4.14
276
344
 
@@ -1,6 +1,6 @@
1
- = RAKE -- Ruby Make
1
+ = RAKE -- Ruby Make
2
2
 
3
- Supporting Rake version: 0.8.6
3
+ Supporting Rake version: 0.8.7.
4
4
 
5
5
  This package contains Rake, a simple ruby build program with
6
6
  capabilities similar to make.
@@ -52,7 +52,7 @@ First, you must write a "Rakefile" file which contains the build rules. Here's
52
52
  a simple example:
53
53
 
54
54
  task :default => [:test]
55
-
55
+
56
56
  task :test do
57
57
  ruby "test/unittest.rb"
58
58
  end
@@ -89,7 +89,6 @@ Type "rake --help" for all available options.
89
89
  * For a glossary of terms, see
90
90
  doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html].
91
91
 
92
-
93
92
  == Development
94
93
 
95
94
  === Source Repository
@@ -103,6 +102,7 @@ http://github.com/jimweirich/rake. The public git clone URL is
103
102
 
104
103
  If you wish to run the unit and functional tests that come with Rake:
105
104
 
105
+ * Install the 'flexmock' gem
106
106
  * Install the 'session' gem in order to run the functional tests.
107
107
  * CD into the top project directory of rake.
108
108
  * Type one of the following:
@@ -112,14 +112,16 @@ If you wish to run the unit and functional tests that come with Rake:
112
112
 
113
113
  === Issues and Bug Reports
114
114
 
115
- Bugs, features requests and other issues can be logged at
115
+ Feature requests and bug reports can be made here
116
+
117
+ * http://onestepback.org/cgi-bin/bugs.cgi?project=rake
116
118
 
117
- * http://onestepback.org/redmine/projects/show/rake
119
+ No account is needed for posting requests. Or you can send me an
120
+ email (at jim dot weirich at gmail dot com)
118
121
 
119
- You will need an account to before you can post issues. Register at
120
- http://onestepback.org/redmine/account/register. Or you can send me
121
- an email (at jim dot weirich at gmail dot com)
122
+ Issues and bug reports can be tracked here:
122
123
 
124
+ * http://www.pivotaltracker.com/projects/28469
123
125
 
124
126
  == Online Resources
125
127
 
@@ -130,6 +132,8 @@ an email (at jim dot weirich at gmail dot com)
130
132
  * Rake API Documents: http://rake.rubyforge.org
131
133
  * Rake Source Code Repo: http://github.com/jimweirich/rake
132
134
  * Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git
135
+ * Rake Issue Tracking: http://www.pivotaltracker.com/projects/28469
136
+ * Rake Bug Reports: http://onestepback.org/cgi-bin/bugs.cgi?project=rake
133
137
 
134
138
  === Presentations and Articles about Rake
135
139
 
@@ -171,7 +175,7 @@ The Rake homepage is http://rake.rubyforge.org. You can find the Rake
171
175
  RubyForge page at http://rubyforge.org/projects/rake.
172
176
 
173
177
  Feel free to submit commits or feature requests. If you send a patch,
174
- remember to update the corresponding unit tests. If fact, I prefer
178
+ remember to update the corresponding unit tests. In fact, I prefer
175
179
  new feature to be submitted in the form of new unit tests.
176
180
 
177
181
  For other information, feel free to ask on the ruby-talk mailing list
data/Rakefile CHANGED
@@ -6,17 +6,28 @@
6
6
  # This file may be distributed under an MIT style license. See
7
7
  # MIT-LICENSE for details.
8
8
 
9
- begin
10
- require 'rubygems'
11
- require 'rake/gempackagetask'
12
- rescue Exception
13
- nil
9
+ require 'rbconfig'
10
+ require 'rubygems'
11
+
12
+ system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb'
13
+
14
+ # Use our rake, not the installed rake from system
15
+ if $".include? system_rake then
16
+ exec Gem.ruby, '-Ilib', 'bin/rake', *ARGV
14
17
  end
18
+
19
+ require 'rubygems/package_task'
20
+
15
21
  require 'rake/clean'
16
22
  require 'rake/testtask'
17
- require 'rake/rdoctask'
18
23
 
19
- CLEAN.include('**/*.o', '*.dot', '**/.*.rbc')
24
+ begin
25
+ gem 'rdoc'
26
+ require 'rdoc/task'
27
+ rescue Gem::LoadError
28
+ end
29
+
30
+ CLEAN.include('**/*.o', '*.dot', '**/*.rbc')
20
31
  CLOBBER.include('doc/example/main', 'testdata')
21
32
  CLOBBER.include('test/data/**/temp_*')
22
33
  CLOBBER.include('test/data/chains/play.*')
@@ -34,7 +45,7 @@ end
34
45
 
35
46
  # Determine the current version of the software
36
47
 
37
- if `ruby -Ilib ./bin/rake --version` =~ /rake, version ([0-9.]+)$/
48
+ if `ruby -Ilib ./bin/rake --version` =~ /rake, version ([0-9a-z.]+)$/
38
49
  CURRENT_VERSION = $1
39
50
  else
40
51
  CURRENT_VERSION = "0.0.0"
@@ -47,73 +58,92 @@ SRC_RB = FileList['lib/**/*.rb']
47
58
  # The default task is run if rake is given no explicit arguments.
48
59
 
49
60
  desc "Default Task"
50
- task :default => :test_all
61
+ task :default => "test:all"
51
62
 
52
63
  # Test Tasks ---------------------------------------------------------
53
- task :dbg do |t|
54
- puts "Arguments are: #{t.args.join(', ')}"
55
- end
56
64
 
57
65
  # Common Abbreviations ...
58
66
 
59
- task :ta => :test_all
60
- task :tf => :test_functional
61
- task :tu => :test_units
62
- task :tc => :test_contribs
63
- task :test => :test_units
64
-
65
- Rake::TestTask.new(:test_all) do |t|
66
- t.test_files = FileList[
67
- 'test/test*.rb',
68
- 'test/contrib/test*.rb',
69
- 'test/fun*.rb'
70
- ]
71
- t.warning = true
72
- t.verbose = false
67
+ task :ta => "test:all"
68
+ task :tf => "test:functional"
69
+ task :tu => "test:units"
70
+ task :tc => "test:contribs"
71
+ task :test => "test:units"
72
+
73
+ module TestFiles
74
+ UNIT = FileList['test/lib/*_test.rb']
75
+ FUNCTIONAL = FileList['test/functional/*_test.rb']
76
+ CONTRIB = FileList['test/contrib/test*.rb']
77
+ TOP = FileList['test/*_test.rb']
78
+ ALL = TOP + UNIT + FUNCTIONAL + CONTRIB
73
79
  end
74
80
 
75
- Rake::TestTask.new(:test_units) do |t|
76
- t.test_files = FileList['test/test*.rb']
77
- t.warning = true
78
- t.verbose = false
79
- end
81
+ namespace :test do
82
+ Rake::TestTask.new(:all) do |t|
83
+ t.test_files = TestFiles::ALL
84
+ t.libs << "."
85
+ t.warning = true
86
+ end
80
87
 
81
- Rake::TestTask.new(:test_functional) do |t|
82
- t.test_files = FileList['test/fun*.rb']
83
- t.warning = true
84
- t.verbose = false
85
- end
88
+ Rake::TestTask.new(:units) do |t|
89
+ t.test_files = TestFiles::UNIT
90
+ t.libs << "."
91
+ t.warning = true
92
+ end
93
+
94
+ Rake::TestTask.new(:functional) do |t|
95
+ t.test_files = TestFiles::FUNCTIONAL
96
+ t.libs << "."
97
+ t.warning = true
98
+ end
86
99
 
87
- Rake::TestTask.new(:test_contribs) do |t|
88
- t.test_files = FileList['test/contrib/test*.rb']
89
- t.warning = true
90
- t.verbose = false
100
+ Rake::TestTask.new(:contribs) do |t|
101
+ t.test_files = TestFiles::CONTRIB
102
+ t.libs << "."
103
+ t.warning = true
104
+ end
91
105
  end
92
106
 
93
107
  begin
94
108
  require 'rcov/rcovtask'
109
+ IGNORE_COVERAGE_IN = FileList[
110
+ 'lib/rake/rdoctask.rb',
111
+ 'lib/rake/testtask.rb',
112
+ 'lib/rake/packagetask.rb',
113
+ 'lib/rake/clean.rb',
114
+ ]
115
+
116
+ unless File::ALT_SEPARATOR
117
+ IGNORE_COVERAGE_IN.include(
118
+ 'lib/rake/alt_system.rb',
119
+ 'lib/rake/win32.rb')
120
+ end
95
121
 
96
122
  Rcov::RcovTask.new do |t|
97
123
  t.libs << "test"
98
- dot_rakes =
99
124
  t.rcov_opts = [
100
125
  '-xRakefile', '-xrakefile', '-xpublish.rf',
101
- '-xlib/rake/contrib', '-x/Library',
126
+ '-xlib/rake/contrib', '-x/Library', '-x.rvm',
102
127
  '--text-report',
103
128
  '--sort coverage'
104
- ] + FileList['rakelib/*.rake'].pathmap("-x%p")
129
+ ] + FileList['rakelib/*.rake'].pathmap("-x%p") +
130
+ IGNORE_COVERAGE_IN.map { |fn| "-x#{fn}" }
105
131
  t.test_files = FileList[
106
- 'test/test*.rb', 'test/functional.rb'
132
+ 'test/lib/*_test.rb',
133
+ 'test/contrib/*_test.rb',
134
+ 'test/functional/*_test.rb'
107
135
  ]
108
136
  t.output_dir = 'coverage'
109
137
  t.verbose = true
110
138
  end
111
139
  rescue LoadError
112
- puts "RCov is not available"
140
+ task :rcov do
141
+ puts "RCov is not available"
142
+ end
113
143
  end
114
144
 
115
145
  directory 'testdata'
116
- [:test_all, :test_units, :test_contribs, :test_functional].each do |t|
146
+ ["test:all", :test_units, :test_contribs, :test_functional].each do |t|
117
147
  task t => ['testdata']
118
148
  end
119
149
 
@@ -128,29 +158,24 @@ end
128
158
 
129
159
  # Create a task to build the RDOC documentation tree.
130
160
 
131
- begin
132
- require 'darkfish-rdoc'
133
- DARKFISH_ENABLED = true
134
- rescue LoadError => ex
135
- DARKFISH_ENABLED = false
136
- end
137
-
138
161
  BASE_RDOC_OPTIONS = [
139
- '--line-numbers',
140
- '--main', 'README',
141
- '--title', 'Rake -- Ruby Make',
162
+ '--line-numbers', '--show-hash',
163
+ '--main', 'README.rdoc',
164
+ '--title', 'Rake -- Ruby Make'
142
165
  ]
143
166
 
144
- rd = Rake::RDocTask.new("rdoc") do |rdoc|
145
- rdoc.rdoc_dir = 'html'
146
- rdoc.template = 'doc/jamis.rb'
147
- rdoc.title = "Rake -- Ruby Make"
148
- rdoc.options = BASE_RDOC_OPTIONS.dup
149
- rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED
150
-
151
- rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
152
- rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
153
- rdoc.rdoc_files.exclude(/\bcontrib\b/)
167
+ if defined?(RDoc::Task) then
168
+ RDoc::Task.new do |rdoc|
169
+ rdoc.rdoc_dir = 'html'
170
+ rdoc.title = "Rake -- Ruby Make"
171
+ rdoc.options = BASE_RDOC_OPTIONS.dup
172
+
173
+ rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES')
174
+ rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
175
+ rdoc.rdoc_files.exclude(/\bcontrib\b/)
176
+ end
177
+ else
178
+ warn "RDoc 2.4.2+ is required to build documentation"
154
179
  end
155
180
 
156
181
  # ====================================================================
@@ -158,10 +183,11 @@ end
158
183
  # tar, zip and gem files.
159
184
 
160
185
  PKG_FILES = FileList[
186
+ '.gemtest',
161
187
  'install.rb',
162
188
  '[A-Z]*',
163
- 'bin/**/*',
164
- 'lib/**/*.rb',
189
+ 'bin/**/*',
190
+ 'lib/**/*.rb',
165
191
  'test/**/*.rb',
166
192
  'test/**/*.rf',
167
193
  'test/**/*.mf',
@@ -177,7 +203,7 @@ if ! defined?(Gem)
177
203
  puts "Package Target requires RubyGEMs"
178
204
  else
179
205
  SPEC = Gem::Specification.new do |s|
180
-
206
+
181
207
  #### Basic information.
182
208
 
183
209
  s.name = 'rake'
@@ -185,13 +211,14 @@ else
185
211
  s.summary = "Ruby based make-like utility."
186
212
  s.description = <<-EOF
187
213
  Rake is a Make-like program implemented in Ruby. Tasks
188
- and dependencies are specified in standard Ruby syntax.
214
+ and dependencies are specified in standard Ruby syntax.
189
215
  EOF
190
216
 
191
217
  #### Dependencies and requirements.
192
218
 
193
- #s.add_dependency('log4r', '> 1.0.4')
194
- #s.requirements << ""
219
+ s.required_rubygems_version = '>= 1.3.2'
220
+ s.add_development_dependency 'session', '~> 2.4'
221
+ s.add_development_dependency 'flexmock', '~> 0.8.11'
195
222
 
196
223
  #### Which files are to be included in this gem? Everything! (Except CVS directories.)
197
224
 
@@ -207,12 +234,17 @@ else
207
234
 
208
235
  s.bindir = "bin" # Use these for applications.
209
236
  s.executables = ["rake"]
210
- s.default_executable = "rake"
211
237
 
212
238
  #### Documentation and testing.
213
239
 
214
- s.has_rdoc = true
215
- s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
240
+ s.extra_rdoc_files = FileList[
241
+ 'README.rdoc',
242
+ 'MIT-LICENSE',
243
+ 'TODO',
244
+ 'CHANGES',
245
+ 'doc/**/*.rdoc'
246
+ ]
247
+
216
248
  s.rdoc_options = BASE_RDOC_OPTIONS
217
249
 
218
250
  #### Author and project details.
@@ -227,7 +259,7 @@ else
227
259
  # end
228
260
  end
229
261
 
230
- package_task = Rake::GemPackageTask.new(SPEC) do |pkg|
262
+ Gem::PackageTask.new(SPEC) do |pkg|
231
263
  pkg.need_zip = true
232
264
  pkg.need_tar = true
233
265
  end
@@ -289,28 +321,13 @@ task :todo do
289
321
  RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
290
322
  end
291
323
 
292
- desc "Look for Debugging print lines"
293
- task :dbg do
294
- RUBY_FILES.egrep(/\bDBG|\bbreakpoint\b/)
295
- end
296
-
297
324
  desc "List all ruby files"
298
- task :rubyfiles do
325
+ task :rubyfiles do
299
326
  puts RUBY_FILES
300
327
  puts FileList['bin/*'].exclude('bin/*.rb')
301
328
  end
302
329
  task :rf => :rubyfiles
303
330
 
304
- desc "Create a TAGS file"
305
- task :tags => "TAGS"
306
-
307
- TAGS = 'xctags -e'
308
-
309
- file "TAGS" => RUBY_FILES do
310
- puts "Makings TAGS"
311
- sh "#{TAGS} #{RUBY_FILES}", :verbose => false
312
- end
313
-
314
331
  # --------------------------------------------------------------------
315
332
  # Creating a release
316
333
 
@@ -322,32 +339,31 @@ task :noop
322
339
  #plugin "release_manager"
323
340
 
324
341
  desc "Make a new release"
325
- task :release, :rel, :reuse, :reltest,
326
- :needs => [
342
+ task :release, [:rel, :reuse, :reltest] => [
327
343
  :prerelease,
328
344
  :clobber,
329
- :test_all,
345
+ "test:all",
330
346
  :update_version,
331
347
  :package,
332
348
  :tag
333
349
  ] do
334
- announce
350
+ announce
335
351
  announce "**************************************************************"
336
352
  announce "* Release #{$package_version} Complete."
337
353
  announce "* Packages ready to upload."
338
354
  announce "**************************************************************"
339
- announce
355
+ announce
340
356
  end
341
357
 
342
358
  # Validate that everything is ready to go for a release.
343
359
  task :prerelease, :rel, :reuse, :reltest do |t, args|
344
360
  $package_version = args.rel
345
- announce
361
+ announce
346
362
  announce "**************************************************************"
347
363
  announce "* Making RubyGem Release #{$package_version}"
348
364
  announce "* (current version #{CURRENT_VERSION})"
349
365
  announce "**************************************************************"
350
- announce
366
+ announce
351
367
 
352
368
  # Is a release number supplied?
353
369
  unless args.rel
@@ -373,21 +389,20 @@ task :prerelease, :rel, :reuse, :reltest do |t, args|
373
389
  end
374
390
  end
375
391
 
376
- task :update_version, :rel, :reuse, :reltest,
377
- :needs => [:prerelease] do |t, args|
392
+ task :update_version, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
378
393
  if args.rel == CURRENT_VERSION
379
394
  announce "No version change ... skipping version update"
380
395
  else
381
396
  announce "Updating Rake version to #{args.rel}"
382
397
  open("lib/rake.rb") do |rakein|
383
398
  open("lib/rake.rb.new", "w") do |rakeout|
384
- rakein.each do |line|
385
- if line =~ /^RAKEVERSION\s*=\s*/
386
- rakeout.puts "RAKEVERSION = '#{args.rel}'"
387
- else
388
- rakeout.puts line
389
- end
390
- end
399
+ rakein.each do |line|
400
+ if line =~ /^RAKEVERSION\s*=\s*/
401
+ rakeout.puts "RAKEVERSION = '#{args.rel}'"
402
+ else
403
+ rakeout.puts line
404
+ end
405
+ end
391
406
  end
392
407
  end
393
408
  mv "lib/rake.rb.new", "lib/rake.rb"
@@ -400,8 +415,7 @@ task :update_version, :rel, :reuse, :reltest,
400
415
  end
401
416
 
402
417
  desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
403
- task :tag, :rel, :reuse, :reltest,
404
- :needs => [:prerelease] do |t, args|
418
+ task :tag, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
405
419
  reltag = "REL_#{args.rel.gsub(/\./, '_')}"
406
420
  reltag << args.reuse.gsub(/\./, '_') if args.reuse
407
421
  announce "Tagging Repository with [#{reltag}]"
@@ -412,14 +426,6 @@ task :tag, :rel, :reuse, :reltest,
412
426
  end
413
427
  end
414
428
 
415
- desc "Install the jamis RDoc template"
416
- task :install_jamis_template do
417
- require 'rbconfig'
418
- dest_dir = File.join(Config::CONFIG['rubylibdir'], "rdoc/generators/template/html")
419
- fail "Unabled to write to #{dest_dir}" unless File.writable?(dest_dir)
420
- install "doc/jamis.rb", dest_dir, :verbose => true
421
- end
422
-
423
429
  # Require experimental XForge/Metaproject support.
424
430
 
425
431
  load 'xforge.rf' if File.exist?('xforge.rf')
@@ -428,3 +434,8 @@ desc "Where is the current directory. This task displays\nthe current rake dire
428
434
  task :where_am_i do
429
435
  puts Rake.original_dir
430
436
  end
437
+
438
+ task :failure => :really_fail
439
+ task :really_fail do
440
+ fail "oops"
441
+ end
data/TODO CHANGED
@@ -6,7 +6,7 @@ the rake-devel@rubyforge.org mailing list.
6
6
  === To Do
7
7
  * Need a nice API for accessing tasks in namespaces, namespaces in an app, etc.
8
8
  * Provide a way to disable -w warning mode.
9
- * Define a set of default rules that work in the absense of any Rakefile
9
+ * Define a set of default rules that work in the absence of any Rakefile
10
10
  * What about cyclic dependencies?
11
11
  * Java support utilities
12
12
  * Installation support utilities