rake 0.8.7 → 0.9.2
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.
- data/.gemtest +0 -0
- data/CHANGES +78 -9
- data/{README → README.rdoc} +14 -10
- data/RRR +9 -0
- data/Rakefile +100 -125
- data/TODO +1 -1
- data/bin/rake +4 -3
- data/doc/command_line_usage.rdoc +18 -6
- data/doc/glossary.rdoc +2 -2
- data/doc/jamis.rb +2 -2
- data/doc/proto_rake.rdoc +22 -22
- data/doc/rake.1.gz +0 -0
- data/doc/rakefile.rdoc +56 -33
- data/doc/rational.rdoc +6 -6
- data/doc/release_notes/rake-0.4.15.rdoc +1 -1
- data/doc/release_notes/rake-0.5.0.rdoc +1 -1
- data/doc/release_notes/rake-0.7.0.rdoc +1 -1
- data/doc/release_notes/rake-0.7.2.rdoc +3 -3
- data/doc/release_notes/rake-0.7.3.rdoc +2 -2
- data/doc/release_notes/rake-0.8.0.rdoc +1 -1
- data/doc/release_notes/rake-0.8.2.rdoc +3 -3
- data/doc/release_notes/rake-0.8.3.rdoc +2 -2
- data/doc/release_notes/rake-0.8.4.rdoc +1 -1
- data/doc/release_notes/rake-0.8.5.rdoc +1 -1
- data/doc/release_notes/rake-0.8.6.rdoc +1 -1
- data/doc/release_notes/rake-0.8.7.rdoc +1 -1
- data/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/install.rb +14 -12
- data/lib/rake/alt_system.rb +7 -6
- data/lib/rake/application.rb +589 -0
- data/lib/rake/classic_namespace.rb +1 -0
- data/lib/rake/clean.rb +2 -4
- data/lib/rake/cloneable.rb +25 -0
- data/lib/rake/contrib/compositepublisher.rb +2 -5
- data/lib/rake/contrib/ftptools.rb +5 -8
- data/lib/rake/contrib/publisher.rb +2 -8
- data/lib/rake/contrib/rubyforgepublisher.rb +2 -4
- data/lib/rake/contrib/sshpublisher.rb +4 -6
- data/lib/rake/contrib/sys.rb +7 -25
- data/lib/rake/default_loader.rb +10 -0
- data/lib/rake/dsl_definition.rb +167 -0
- data/lib/rake/early_time.rb +18 -0
- data/lib/rake/ext/core.rb +27 -0
- data/lib/rake/ext/module.rb +39 -0
- data/lib/rake/ext/string.rb +167 -0
- data/lib/rake/ext/time.rb +14 -0
- data/lib/rake/file_creation_task.rb +24 -0
- data/lib/rake/file_list.rb +403 -0
- data/lib/rake/file_task.rb +47 -0
- data/lib/rake/file_utils.rb +112 -0
- data/lib/rake/file_utils_ext.rb +142 -0
- data/lib/rake/gempackagetask.rb +6 -90
- data/lib/rake/invocation_chain.rb +51 -0
- data/lib/rake/invocation_exception_mixin.rb +16 -0
- data/lib/rake/loaders/makefile.rb +13 -15
- data/lib/rake/multi_task.rb +16 -0
- data/lib/rake/name_space.rb +25 -0
- data/lib/rake/packagetask.rb +13 -12
- data/lib/rake/pathmap.rb +1 -0
- data/lib/rake/pseudo_status.rb +24 -0
- data/lib/rake/rake_module.rb +29 -0
- data/lib/rake/rake_test_loader.rb +10 -2
- data/lib/rake/rdoctask.rb +211 -190
- data/lib/rake/ruby182_test_unit_fix.rb +9 -7
- data/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/lib/rake/runtest.rb +4 -6
- data/lib/rake/task.rb +327 -0
- data/lib/rake/task_argument_error.rb +7 -0
- data/lib/rake/task_arguments.rb +74 -0
- data/lib/rake/task_manager.rb +307 -0
- data/lib/rake/tasklib.rb +1 -2
- data/lib/rake/testtask.rb +57 -27
- data/lib/rake/version.rb +10 -0
- data/lib/rake/win32.rb +4 -4
- data/lib/rake.rb +29 -2470
- data/test/data/access/Rakefile +35 -0
- data/test/data/comments/Rakefile +18 -0
- data/test/data/default/Rakefile +1 -3
- data/test/data/deprecated_import/Rakefile +1 -0
- data/test/data/dryrun/Rakefile +1 -1
- data/test/data/extra/Rakefile +1 -0
- data/test/data/file_creation_task/Rakefile +1 -3
- data/test/data/multidesc/Rakefile +0 -2
- data/test/data/namespace/Rakefile +9 -2
- data/test/data/rakelib/test1.rb +1 -0
- data/test/data/statusreturn/Rakefile +0 -2
- data/test/data/verbose/Rakefile +34 -0
- data/test/{filecreation.rb → file_creation.rb} +11 -9
- data/test/helper.rb +44 -0
- data/test/in_environment.rb +11 -6
- data/test/test_rake.rb +3 -6
- data/test/test_rake_application.rb +364 -0
- data/test/test_rake_application_options.rb +382 -0
- data/test/{test_clean.rb → test_rake_clean.rb} +2 -4
- data/test/{test_definitions.rb → test_rake_definitions.rb} +7 -12
- data/test/test_rake_directory_task.rb +55 -0
- data/test/test_rake_dsl.rb +73 -0
- data/test/{test_earlytime.rb → test_rake_early_time.rb} +3 -7
- data/test/{test_extension.rb → test_rake_extension.rb} +4 -8
- data/test/{test_file_creation_task.rb → test_rake_file_creation_task.rb} +7 -7
- data/test/{test_filelist.rb → test_rake_file_list.rb} +45 -35
- data/test/test_rake_file_list_path_map.rb +8 -0
- data/test/{test_file_task.rb → test_rake_file_task.rb} +23 -62
- data/test/{test_fileutils.rb → test_rake_file_utils.rb} +34 -33
- data/test/{test_ftp.rb → test_rake_ftp_file.rb} +5 -5
- data/test/{session_functional.rb → test_rake_functional.rb} +173 -44
- data/test/test_rake_invocation_chain.rb +52 -0
- data/test/{test_makefile_loader.rb → test_rake_makefile_loader.rb} +2 -5
- data/test/{test_multitask.rb → test_rake_multi_task.rb} +18 -12
- data/test/{test_namespace.rb → test_rake_name_space.rb} +4 -16
- data/test/test_rake_package_task.rb +78 -0
- data/test/{test_pathmap.rb → test_rake_path_map.rb} +5 -58
- data/test/test_rake_path_map_explode.rb +31 -0
- data/test/test_rake_path_map_partial.rb +18 -0
- data/test/{test_pseudo_status.rb → test_rake_pseudo_status.rb} +2 -8
- data/test/{test_rdoc_task.rb → test_rake_rdoc_task.rb} +22 -29
- data/test/{test_require.rb → test_rake_require.rb} +11 -11
- data/test/{test_rules.rb → test_rake_rules.rb} +12 -15
- data/test/{test_tasks.rb → test_rake_task.rb} +75 -178
- data/test/test_rake_task_argument_parsing.rb +116 -0
- data/test/{test_task_arguments.rb → test_rake_task_arguments.rb} +7 -10
- data/test/{test_tasklib.rb → test_rake_task_lib.rb} +2 -5
- data/test/{test_task_manager.rb → test_rake_task_manager.rb} +12 -40
- data/test/test_rake_task_manager_argument_resolution.rb +36 -0
- data/test/test_rake_task_with_arguments.rb +162 -0
- data/test/test_rake_test_task.rb +122 -0
- data/test/{test_top_level_functions.rb → test_rake_top_level_functions.rb} +12 -22
- data/test/{test_win32.rb → test_rake_win32.rb} +21 -10
- data/test/test_sys.rb +20 -0
- metadata +129 -51
- data/test/capture_stdout.rb +0 -26
- data/test/contrib/test_sys.rb +0 -47
- data/test/functional.rb +0 -15
- data/test/rake_test_setup.rb +0 -24
- data/test/test_application.rb +0 -675
- data/test/test_invocation_chain.rb +0 -81
- data/test/test_package_task.rb +0 -118
- data/test/test_test_task.rb +0 -77
data/.gemtest
ADDED
|
File without changes
|
data/CHANGES
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
|
-
|
|
2
1
|
= Rake Changelog
|
|
3
2
|
|
|
3
|
+
== Version 0.9.1
|
|
4
|
+
|
|
5
|
+
* Added deprecation warnings to the Rake DSL methods.
|
|
6
|
+
|
|
7
|
+
== Version 0.9.0
|
|
8
|
+
|
|
9
|
+
* *Incompatible* *change*: Rake DSL commands ('task', 'file', etc.) are
|
|
10
|
+
no longer private methods in Object. If you need to call 'task :xzy' inside
|
|
11
|
+
your class, include Rake::DSL into the class. The DSL is still available at
|
|
12
|
+
the top level scope (via the top level object which extends Rake::DSL).
|
|
13
|
+
|
|
14
|
+
* Rake now warns when the deprecated :needs syntax used.
|
|
15
|
+
|
|
16
|
+
* Rake history is now UTF-8 encoded.
|
|
17
|
+
|
|
18
|
+
* Rake now uses case-insensitive comparisons to find the Rakefile on Windows.
|
|
19
|
+
Based on patch by Roger Pack.
|
|
20
|
+
|
|
21
|
+
* Rake now requires (instead of loads) files in the test task. Patch by Cezary
|
|
22
|
+
Baginski.
|
|
23
|
+
|
|
24
|
+
* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow.
|
|
25
|
+
|
|
26
|
+
* Rake now prints the Rakefile directory only when it's different from the
|
|
27
|
+
current directory. Patch by Alex Chaffee.
|
|
28
|
+
|
|
29
|
+
* Improved rakefile_location discovery on Windows. Patch by James Tucker.
|
|
30
|
+
|
|
31
|
+
* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias
|
|
32
|
+
Lüdtke
|
|
33
|
+
|
|
34
|
+
* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require
|
|
35
|
+
'rdoc/task')
|
|
36
|
+
|
|
37
|
+
* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require
|
|
38
|
+
'rubygems/package_task')
|
|
39
|
+
|
|
40
|
+
* Rake now outputs various messages to $stderr instead of $stdout.
|
|
41
|
+
|
|
42
|
+
* Rake no longer emits warnings for Config. Patch by Santiago Pastorino.
|
|
43
|
+
|
|
44
|
+
* Split rake.rb into individual files.
|
|
45
|
+
|
|
46
|
+
* Support for the --where (-W) flag for showing where a task is defined.
|
|
47
|
+
|
|
48
|
+
* Fixed quoting in test task.
|
|
49
|
+
(http://onestepback.org/redmine/issues/show/44,
|
|
50
|
+
http://www.pivotaltracker.com/story/show/1223138)
|
|
51
|
+
|
|
52
|
+
* Fixed the silent option parsing problem.
|
|
53
|
+
(http://onestepback.org/redmine/issues/show/47)
|
|
54
|
+
|
|
55
|
+
* Fixed :verbose=>false flag on sh and ruby commands.
|
|
56
|
+
|
|
57
|
+
* Rake command line options may be given by default in a RAKEOPT
|
|
58
|
+
environment variable.
|
|
59
|
+
|
|
60
|
+
* Errors in Rake will now display the task invocation chain in effect
|
|
61
|
+
at the time of the error.
|
|
62
|
+
|
|
63
|
+
* Accepted change by warnickr to not expand test patterns in shell
|
|
64
|
+
(allowing more files in the test suite).
|
|
65
|
+
|
|
66
|
+
* Fixed that file tasks did not perform prereq lookups in scope
|
|
67
|
+
(Redmine #57).
|
|
68
|
+
|
|
4
69
|
== Version 0.8.7
|
|
5
70
|
|
|
6
71
|
* Fixed EXEEXT for JRuby on windows.
|
|
@@ -10,6 +75,10 @@
|
|
|
10
75
|
* Minor fixes to the RDoc generation (removed dependency on darkfish
|
|
11
76
|
and removed inline source option).
|
|
12
77
|
|
|
78
|
+
== PreVersion 0.8.6
|
|
79
|
+
|
|
80
|
+
* Now allow # comments to comment a task definition.
|
|
81
|
+
|
|
13
82
|
== Version 0.8.5
|
|
14
83
|
|
|
15
84
|
* Better support for the system command on Windows.
|
|
@@ -36,7 +105,7 @@
|
|
|
36
105
|
* Fixed stray ARGV option problem that was interfering with
|
|
37
106
|
Test::Unit::Runner.
|
|
38
107
|
|
|
39
|
-
* Fixed default verbose mode (was accidently changed to false).
|
|
108
|
+
* Fixed default verbose mode (was accidently changed to false).
|
|
40
109
|
|
|
41
110
|
* Removed reference to manage_gem to fix the warning produced by the
|
|
42
111
|
gem package task.
|
|
@@ -49,7 +118,7 @@
|
|
|
49
118
|
directory.
|
|
50
119
|
|
|
51
120
|
* Added fix to handle ruby installations in directories with spaces in
|
|
52
|
-
their name.
|
|
121
|
+
their name.
|
|
53
122
|
|
|
54
123
|
== Version 0.8.2
|
|
55
124
|
|
|
@@ -66,7 +135,7 @@
|
|
|
66
135
|
symbol/string differences. (Patch supplied by Edwin Pratomo)
|
|
67
136
|
|
|
68
137
|
* Fixed bug with rules involving multiple source (Patch supplied by
|
|
69
|
-
Emanuel
|
|
138
|
+
Emanuel Indermühle)
|
|
70
139
|
|
|
71
140
|
* Switched from getoptlong to optparse (patches supplied by Edwin
|
|
72
141
|
Pratomo)
|
|
@@ -87,7 +156,7 @@
|
|
|
87
156
|
|
|
88
157
|
* Changed from using Mutex to Monitor. Evidently Mutex causes thread
|
|
89
158
|
join errors when Ruby is compiled with -disable-pthreads. (Patch
|
|
90
|
-
supplied by Ittay Dror)
|
|
159
|
+
supplied by Ittay Dror)
|
|
91
160
|
|
|
92
161
|
* Fixed bug in makefile parser that had problems with extra spaces in
|
|
93
162
|
file task names. (Patch supplied by Ittay Dror)
|
|
@@ -142,14 +211,14 @@
|
|
|
142
211
|
* Fixed some bugs where the application object was going to the global
|
|
143
212
|
appliation instead of using its own data.
|
|
144
213
|
* Added square and curly bracket patterns to FileList#include (Tilman
|
|
145
|
-
Sauerbeck).
|
|
214
|
+
Sauerbeck).
|
|
146
215
|
* Added plain filename support to rule dependents (suggested by Nobu
|
|
147
|
-
Nakada).
|
|
216
|
+
Nakada).
|
|
148
217
|
* Added pathmap support to rule dependents.
|
|
149
218
|
* Added a 'tasks' method to a namespace to get a list of tasks
|
|
150
219
|
associated with the namespace.
|
|
151
220
|
* Fixed the method name leak from FileUtils (bug found by Glenn
|
|
152
|
-
Vanderburg).
|
|
221
|
+
Vanderburg).
|
|
153
222
|
* Added rake_extension to handle detection of extension collisions.
|
|
154
223
|
* Added test for noop, bad_option and verbose flags to sh command.
|
|
155
224
|
* Removed dependency on internal fu_xxx functions from FileUtils.
|
|
@@ -270,7 +339,7 @@
|
|
|
270
339
|
* Fixed a bug that prevented the TESTOPTS flag from working with the
|
|
271
340
|
revised for 1.8.2 test task.
|
|
272
341
|
* Updated the docs on --trace to indicate that it also enables a full
|
|
273
|
-
backtrace on errors.
|
|
342
|
+
backtrace on errors.
|
|
274
343
|
|
|
275
344
|
== Version 0.4.14
|
|
276
345
|
|
data/{README → README.rdoc}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
= RAKE -- Ruby Make
|
|
1
|
+
= RAKE -- Ruby Make
|
|
2
2
|
|
|
3
|
-
Supporting Rake version: 0.8.
|
|
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
|
-
|
|
115
|
+
Feature requests and bug reports can be made here
|
|
116
|
+
|
|
117
|
+
* http://onestepback.org/cgi-bin/bugs.cgi?project=rake
|
|
116
118
|
|
|
117
|
-
|
|
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
|
-
|
|
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.
|
|
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/RRR
ADDED
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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-
|
|
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,75 +58,57 @@ 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 => :
|
|
61
|
+
task :default => :test
|
|
51
62
|
|
|
52
63
|
# Test Tasks ---------------------------------------------------------
|
|
53
|
-
task :dbg do |t|
|
|
54
|
-
puts "Arguments are: #{t.args.join(', ')}"
|
|
55
|
-
end
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
]
|
|
65
|
+
Rake::TestTask.new do |t|
|
|
66
|
+
files = FileList['test/helper.rb', 'test/test_*.rb']
|
|
67
|
+
t.test_files = files
|
|
68
|
+
t.libs << "."
|
|
71
69
|
t.warning = true
|
|
72
|
-
t.verbose = false
|
|
73
|
-
end
|
|
74
|
-
|
|
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
|
|
80
|
-
|
|
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
|
|
86
|
-
|
|
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
|
|
91
70
|
end
|
|
92
71
|
|
|
93
72
|
begin
|
|
94
73
|
require 'rcov/rcovtask'
|
|
74
|
+
IGNORE_COVERAGE_IN = FileList[
|
|
75
|
+
'lib/rake/rdoctask.rb',
|
|
76
|
+
'lib/rake/testtask.rb',
|
|
77
|
+
'lib/rake/packagetask.rb',
|
|
78
|
+
'lib/rake/clean.rb',
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
unless File::ALT_SEPARATOR
|
|
82
|
+
IGNORE_COVERAGE_IN.include(
|
|
83
|
+
'lib/rake/alt_system.rb',
|
|
84
|
+
'lib/rake/win32.rb')
|
|
85
|
+
end
|
|
95
86
|
|
|
96
87
|
Rcov::RcovTask.new do |t|
|
|
97
88
|
t.libs << "test"
|
|
98
|
-
dot_rakes =
|
|
99
89
|
t.rcov_opts = [
|
|
100
90
|
'-xRakefile', '-xrakefile', '-xpublish.rf',
|
|
101
|
-
'-xlib/rake/contrib', '-x/Library',
|
|
91
|
+
'-xlib/rake/contrib', '-x/Library', '-x.rvm',
|
|
102
92
|
'--text-report',
|
|
103
93
|
'--sort coverage'
|
|
104
|
-
] + FileList['rakelib/*.rake'].pathmap("-x%p")
|
|
94
|
+
] + FileList['rakelib/*.rake'].pathmap("-x%p") +
|
|
95
|
+
IGNORE_COVERAGE_IN.map { |fn| "-x#{fn}" }
|
|
105
96
|
t.test_files = FileList[
|
|
106
|
-
'test/
|
|
97
|
+
'test/lib/*_test.rb',
|
|
98
|
+
'test/contrib/*_test.rb',
|
|
99
|
+
'test/functional/*_test.rb'
|
|
107
100
|
]
|
|
108
101
|
t.output_dir = 'coverage'
|
|
109
102
|
t.verbose = true
|
|
110
103
|
end
|
|
111
104
|
rescue LoadError
|
|
112
|
-
|
|
105
|
+
task :rcov do
|
|
106
|
+
puts "RCov is not available"
|
|
107
|
+
end
|
|
113
108
|
end
|
|
114
109
|
|
|
115
110
|
directory 'testdata'
|
|
116
|
-
|
|
117
|
-
task t => ['testdata']
|
|
118
|
-
end
|
|
111
|
+
task :test => ['testdata']
|
|
119
112
|
|
|
120
113
|
# CVS Tasks ----------------------------------------------------------
|
|
121
114
|
|
|
@@ -128,29 +121,24 @@ end
|
|
|
128
121
|
|
|
129
122
|
# Create a task to build the RDOC documentation tree.
|
|
130
123
|
|
|
131
|
-
begin
|
|
132
|
-
require 'darkfish-rdoc'
|
|
133
|
-
DARKFISH_ENABLED = true
|
|
134
|
-
rescue LoadError => ex
|
|
135
|
-
DARKFISH_ENABLED = false
|
|
136
|
-
end
|
|
137
|
-
|
|
138
124
|
BASE_RDOC_OPTIONS = [
|
|
139
|
-
'--line-numbers',
|
|
140
|
-
'--main', 'README',
|
|
141
|
-
'--title', 'Rake -- Ruby Make'
|
|
125
|
+
'--line-numbers', '--show-hash',
|
|
126
|
+
'--main', 'README.rdoc',
|
|
127
|
+
'--title', 'Rake -- Ruby Make'
|
|
142
128
|
]
|
|
143
129
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
130
|
+
if defined?(RDoc::Task) then
|
|
131
|
+
RDoc::Task.new do |rdoc|
|
|
132
|
+
rdoc.rdoc_dir = 'html'
|
|
133
|
+
rdoc.title = "Rake -- Ruby Make"
|
|
134
|
+
rdoc.options = BASE_RDOC_OPTIONS.dup
|
|
135
|
+
|
|
136
|
+
rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES')
|
|
137
|
+
rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
|
|
138
|
+
rdoc.rdoc_files.exclude(/\bcontrib\b/)
|
|
139
|
+
end
|
|
140
|
+
else
|
|
141
|
+
warn "RDoc 2.4.2+ is required to build documentation"
|
|
154
142
|
end
|
|
155
143
|
|
|
156
144
|
# ====================================================================
|
|
@@ -158,10 +146,11 @@ end
|
|
|
158
146
|
# tar, zip and gem files.
|
|
159
147
|
|
|
160
148
|
PKG_FILES = FileList[
|
|
149
|
+
'.gemtest',
|
|
161
150
|
'install.rb',
|
|
162
151
|
'[A-Z]*',
|
|
163
|
-
'bin/**/*',
|
|
164
|
-
'lib/**/*.rb',
|
|
152
|
+
'bin/**/*',
|
|
153
|
+
'lib/**/*.rb',
|
|
165
154
|
'test/**/*.rb',
|
|
166
155
|
'test/**/*.rf',
|
|
167
156
|
'test/**/*.mf',
|
|
@@ -177,7 +166,7 @@ if ! defined?(Gem)
|
|
|
177
166
|
puts "Package Target requires RubyGEMs"
|
|
178
167
|
else
|
|
179
168
|
SPEC = Gem::Specification.new do |s|
|
|
180
|
-
|
|
169
|
+
|
|
181
170
|
#### Basic information.
|
|
182
171
|
|
|
183
172
|
s.name = 'rake'
|
|
@@ -185,13 +174,15 @@ else
|
|
|
185
174
|
s.summary = "Ruby based make-like utility."
|
|
186
175
|
s.description = <<-EOF
|
|
187
176
|
Rake is a Make-like program implemented in Ruby. Tasks
|
|
188
|
-
and dependencies are specified in standard Ruby syntax.
|
|
177
|
+
and dependencies are specified in standard Ruby syntax.
|
|
189
178
|
EOF
|
|
190
179
|
|
|
191
180
|
#### Dependencies and requirements.
|
|
192
181
|
|
|
193
|
-
|
|
194
|
-
|
|
182
|
+
s.required_rubygems_version = '>= 1.3.2'
|
|
183
|
+
s.add_development_dependency 'minitest', '~> 2.1'
|
|
184
|
+
s.add_development_dependency 'session', '~> 2.4'
|
|
185
|
+
s.add_development_dependency 'flexmock', '~> 0.8.11'
|
|
195
186
|
|
|
196
187
|
#### Which files are to be included in this gem? Everything! (Except CVS directories.)
|
|
197
188
|
|
|
@@ -207,12 +198,17 @@ else
|
|
|
207
198
|
|
|
208
199
|
s.bindir = "bin" # Use these for applications.
|
|
209
200
|
s.executables = ["rake"]
|
|
210
|
-
s.default_executable = "rake"
|
|
211
201
|
|
|
212
202
|
#### Documentation and testing.
|
|
213
203
|
|
|
214
|
-
s.
|
|
215
|
-
|
|
204
|
+
s.extra_rdoc_files = FileList[
|
|
205
|
+
'README.rdoc',
|
|
206
|
+
'MIT-LICENSE',
|
|
207
|
+
'TODO',
|
|
208
|
+
'CHANGES',
|
|
209
|
+
'doc/**/*.rdoc'
|
|
210
|
+
]
|
|
211
|
+
|
|
216
212
|
s.rdoc_options = BASE_RDOC_OPTIONS
|
|
217
213
|
|
|
218
214
|
#### Author and project details.
|
|
@@ -227,7 +223,7 @@ else
|
|
|
227
223
|
# end
|
|
228
224
|
end
|
|
229
225
|
|
|
230
|
-
|
|
226
|
+
Gem::PackageTask.new(SPEC) do |pkg|
|
|
231
227
|
pkg.need_zip = true
|
|
232
228
|
pkg.need_tar = true
|
|
233
229
|
end
|
|
@@ -289,28 +285,13 @@ task :todo do
|
|
|
289
285
|
RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
|
|
290
286
|
end
|
|
291
287
|
|
|
292
|
-
desc "Look for Debugging print lines"
|
|
293
|
-
task :dbg do
|
|
294
|
-
RUBY_FILES.egrep(/\bDBG|\bbreakpoint\b/)
|
|
295
|
-
end
|
|
296
|
-
|
|
297
288
|
desc "List all ruby files"
|
|
298
|
-
task :rubyfiles do
|
|
289
|
+
task :rubyfiles do
|
|
299
290
|
puts RUBY_FILES
|
|
300
291
|
puts FileList['bin/*'].exclude('bin/*.rb')
|
|
301
292
|
end
|
|
302
293
|
task :rf => :rubyfiles
|
|
303
294
|
|
|
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
295
|
# --------------------------------------------------------------------
|
|
315
296
|
# Creating a release
|
|
316
297
|
|
|
@@ -322,32 +303,31 @@ task :noop
|
|
|
322
303
|
#plugin "release_manager"
|
|
323
304
|
|
|
324
305
|
desc "Make a new release"
|
|
325
|
-
task :release, :rel, :reuse, :reltest
|
|
326
|
-
:needs => [
|
|
306
|
+
task :release, [:rel, :reuse, :reltest] => [
|
|
327
307
|
:prerelease,
|
|
328
308
|
:clobber,
|
|
329
|
-
:
|
|
309
|
+
:test,
|
|
330
310
|
:update_version,
|
|
331
311
|
:package,
|
|
332
312
|
:tag
|
|
333
313
|
] do
|
|
334
|
-
announce
|
|
314
|
+
announce
|
|
335
315
|
announce "**************************************************************"
|
|
336
316
|
announce "* Release #{$package_version} Complete."
|
|
337
317
|
announce "* Packages ready to upload."
|
|
338
318
|
announce "**************************************************************"
|
|
339
|
-
announce
|
|
319
|
+
announce
|
|
340
320
|
end
|
|
341
321
|
|
|
342
322
|
# Validate that everything is ready to go for a release.
|
|
343
323
|
task :prerelease, :rel, :reuse, :reltest do |t, args|
|
|
344
324
|
$package_version = args.rel
|
|
345
|
-
announce
|
|
325
|
+
announce
|
|
346
326
|
announce "**************************************************************"
|
|
347
327
|
announce "* Making RubyGem Release #{$package_version}"
|
|
348
328
|
announce "* (current version #{CURRENT_VERSION})"
|
|
349
329
|
announce "**************************************************************"
|
|
350
|
-
announce
|
|
330
|
+
announce
|
|
351
331
|
|
|
352
332
|
# Is a release number supplied?
|
|
353
333
|
unless args.rel
|
|
@@ -373,21 +353,20 @@ task :prerelease, :rel, :reuse, :reltest do |t, args|
|
|
|
373
353
|
end
|
|
374
354
|
end
|
|
375
355
|
|
|
376
|
-
task :update_version, :rel, :reuse, :reltest,
|
|
377
|
-
:needs => [:prerelease] do |t, args|
|
|
356
|
+
task :update_version, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
|
|
378
357
|
if args.rel == CURRENT_VERSION
|
|
379
358
|
announce "No version change ... skipping version update"
|
|
380
359
|
else
|
|
381
360
|
announce "Updating Rake version to #{args.rel}"
|
|
382
361
|
open("lib/rake.rb") do |rakein|
|
|
383
362
|
open("lib/rake.rb.new", "w") do |rakeout|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
363
|
+
rakein.each do |line|
|
|
364
|
+
if line =~ /^RAKEVERSION\s*=\s*/
|
|
365
|
+
rakeout.puts "RAKEVERSION = '#{args.rel}'"
|
|
366
|
+
else
|
|
367
|
+
rakeout.puts line
|
|
368
|
+
end
|
|
369
|
+
end
|
|
391
370
|
end
|
|
392
371
|
end
|
|
393
372
|
mv "lib/rake.rb.new", "lib/rake.rb"
|
|
@@ -400,8 +379,7 @@ task :update_version, :rel, :reuse, :reltest,
|
|
|
400
379
|
end
|
|
401
380
|
|
|
402
381
|
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|
|
|
382
|
+
task :tag, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
|
|
405
383
|
reltag = "REL_#{args.rel.gsub(/\./, '_')}"
|
|
406
384
|
reltag << args.reuse.gsub(/\./, '_') if args.reuse
|
|
407
385
|
announce "Tagging Repository with [#{reltag}]"
|
|
@@ -412,14 +390,6 @@ task :tag, :rel, :reuse, :reltest,
|
|
|
412
390
|
end
|
|
413
391
|
end
|
|
414
392
|
|
|
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
393
|
# Require experimental XForge/Metaproject support.
|
|
424
394
|
|
|
425
395
|
load 'xforge.rf' if File.exist?('xforge.rf')
|
|
@@ -428,3 +398,8 @@ desc "Where is the current directory. This task displays\nthe current rake dire
|
|
|
428
398
|
task :where_am_i do
|
|
429
399
|
puts Rake.original_dir
|
|
430
400
|
end
|
|
401
|
+
|
|
402
|
+
task :failure => :really_fail
|
|
403
|
+
task :really_fail do
|
|
404
|
+
fail "oops"
|
|
405
|
+
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
|
|
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
|