rake 0.8.7 → 0.9.0.beta.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rake might be problematic. Click here for more details.
- data/.gemtest +0 -0
- data/CHANGES +77 -9
- data/{README → README.rdoc} +14 -10
- data/Rakefile +113 -110
- data/TODO +1 -1
- 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 +60 -28
- 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/install.rb +14 -12
- data/lib/rake.rb +28 -2470
- data/lib/rake/alt_system.rb +7 -6
- data/lib/rake/application.rb +585 -0
- data/lib/rake/classic_namespace.rb +1 -0
- data/lib/rake/clean.rb +14 -14
- 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.rb +2 -0
- data/lib/rake/dsl_definition.rb +146 -0
- data/lib/rake/early_time.rb +18 -0
- data/lib/rake/environment.rb +40 -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 +132 -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 +25 -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 +329 -0
- data/lib/rake/tasklib.rb +1 -2
- data/lib/rake/testtask.rb +51 -26
- data/lib/rake/version.rb +12 -0
- data/lib/rake/win32.rb +4 -4
- data/test/contrib/test_sys.rb +7 -30
- data/test/data/comments/Rakefile +18 -0
- data/test/data/default/Rakefile +1 -1
- data/test/data/dryrun/Rakefile +1 -1
- data/test/data/file_creation_task/Rakefile +1 -1
- data/test/data/namespace/Rakefile +9 -0
- data/test/data/rakelib/test1.rb +4 -2
- data/test/data/verbose/Rakefile +34 -0
- data/test/functional/functional_test.rb +25 -0
- data/test/{session_functional.rb → functional/session_based_tests.rb} +134 -23
- data/test/in_environment.rb +6 -4
- data/test/{test_application.rb → lib/application_test.rb} +277 -136
- data/test/{test_clean.rb → lib/clean_test.rb} +1 -0
- data/test/{test_definitions.rb → lib/definitions_test.rb} +2 -2
- data/test/lib/dsl_test.rb +52 -0
- data/test/{test_earlytime.rb → lib/earlytime_test.rb} +1 -2
- data/test/lib/environment_test.rb +18 -0
- data/test/{test_extension.rb → lib/extension_test.rb} +2 -2
- data/test/{test_file_creation_task.rb → lib/file_creation_task_test.rb} +0 -0
- data/test/{test_file_task.rb → lib/file_task_test.rb} +3 -3
- data/test/{test_filelist.rb → lib/filelist_test.rb} +28 -24
- data/test/{test_fileutils.rb → lib/fileutils_test.rb} +26 -21
- data/test/{test_ftp.rb → lib/ftp_test.rb} +0 -0
- data/test/{test_invocation_chain.rb → lib/invocation_chain_test.rb} +0 -0
- data/test/{test_makefile_loader.rb → lib/makefile_loader_test.rb} +0 -0
- data/test/{test_multitask.rb → lib/multitask_test.rb} +14 -6
- data/test/{test_namespace.rb → lib/namespace_test.rb} +0 -0
- data/test/lib/package_task_test.rb +82 -0
- data/test/{test_pathmap.rb → lib/pathmap_test.rb} +3 -2
- data/test/{test_pseudo_status.rb → lib/pseudo_status_test.rb} +0 -0
- data/test/{test_rake.rb → lib/rake_test.rb} +1 -1
- data/test/{test_rdoc_task.rb → lib/rdoc_task_test.rb} +19 -23
- data/test/{test_require.rb → lib/require_test.rb} +8 -2
- data/test/{test_rules.rb → lib/rules_test.rb} +1 -2
- data/test/{test_task_arguments.rb → lib/task_arguments_test.rb} +5 -5
- data/test/{test_task_manager.rb → lib/task_manager_test.rb} +5 -5
- data/test/{test_tasks.rb → lib/task_test.rb} +69 -4
- data/test/{test_tasklib.rb → lib/tasklib_test.rb} +0 -0
- data/test/{test_test_task.rb → lib/test_task_test.rb} +3 -3
- data/test/lib/testtask_test.rb +49 -0
- data/test/{test_top_level_functions.rb → lib/top_level_functions_test.rb} +3 -3
- data/test/{test_win32.rb → lib/win32_test.rb} +19 -0
- data/test/rake_test_setup.rb +4 -9
- data/test/ruby_version_test.rb +3 -0
- data/test/test_helper.rb +12 -0
- metadata +100 -44
- data/test/functional.rb +0 -15
- data/test/test_package_task.rb +0 -118
data/.gemtest
ADDED
File without changes
|
data/CHANGES
CHANGED
@@ -1,6 +1,70 @@
|
|
1
|
-
|
2
1
|
= Rake Changelog
|
3
2
|
|
3
|
+
== Pre-Version 0.9.x
|
4
|
+
|
5
|
+
* Rake history is now UTF-8 encoded.
|
6
|
+
|
7
|
+
* Rake now uses case-insensitive comparisons to find the Rakefile on Windows.
|
8
|
+
Based on patch by Roger Pack.
|
9
|
+
|
10
|
+
* Rake now requires (instead of loads) files in the test task. Patch by Cezary
|
11
|
+
Baginski.
|
12
|
+
|
13
|
+
* Rake now runs tasks when they have equal timestamps. Patch by James M.
|
14
|
+
Lawrence.
|
15
|
+
|
16
|
+
* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow.
|
17
|
+
|
18
|
+
* Rake now prints the Rakefile directory only when it's different from the
|
19
|
+
current directory. Patch by Alex Chaffee.
|
20
|
+
|
21
|
+
* Improved rakefile_location discovery on Windows. Patch by James Tucker.
|
22
|
+
|
23
|
+
* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias
|
24
|
+
Lüdtke
|
25
|
+
|
26
|
+
* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require
|
27
|
+
'rdoc/task')
|
28
|
+
|
29
|
+
* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require
|
30
|
+
'rubygems/package_task')
|
31
|
+
|
32
|
+
* Rake now outputs various messages to $stderr instead of $stdout.
|
33
|
+
|
34
|
+
* Rake no longer emits warnings for Config. Patch by Santiago Pastorino.
|
35
|
+
|
36
|
+
* Removed Rake's DSL methods from the top level scope. If you need to
|
37
|
+
call 'task :xzy' in your code, include Rake::DSL into your class, or
|
38
|
+
put the code in a Rake::DSL.environment do ... end block.
|
39
|
+
|
40
|
+
* Allow single line comments immediately prior to a task to be used in
|
41
|
+
place of +desc+.
|
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
|
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
|
|
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/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,47 +58,50 @@ 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: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 => :
|
60
|
-
task :tf => :
|
61
|
-
task :tu => :
|
62
|
-
task :tc => :
|
63
|
-
task :test => :
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
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
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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(:
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
end
|
88
|
+
Rake::TestTask.new(:units) do |t|
|
89
|
+
t.test_files = TestFiles::UNIT
|
90
|
+
t.libs << "."
|
91
|
+
t.warning = true
|
92
|
+
end
|
86
93
|
|
87
|
-
Rake::TestTask.new(:
|
88
|
-
|
89
|
-
|
90
|
-
|
94
|
+
Rake::TestTask.new(:functional) do |t|
|
95
|
+
t.test_files = TestFiles::FUNCTIONAL
|
96
|
+
t.libs << "."
|
97
|
+
t.warning = true
|
98
|
+
end
|
99
|
+
|
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
|
@@ -95,25 +109,29 @@ begin
|
|
95
109
|
|
96
110
|
Rcov::RcovTask.new do |t|
|
97
111
|
t.libs << "test"
|
98
|
-
dot_rakes =
|
112
|
+
dot_rakes =
|
99
113
|
t.rcov_opts = [
|
100
114
|
'-xRakefile', '-xrakefile', '-xpublish.rf',
|
101
|
-
'-xlib/rake/contrib', '-x/Library',
|
115
|
+
'-xlib/rake/contrib', '-x/Library',
|
102
116
|
'--text-report',
|
103
117
|
'--sort coverage'
|
104
118
|
] + FileList['rakelib/*.rake'].pathmap("-x%p")
|
105
119
|
t.test_files = FileList[
|
106
|
-
'test/
|
120
|
+
'test/lib/*_test.rb',
|
121
|
+
'test/contrib/*_test.rb',
|
122
|
+
'test/functional/*_test.rb'
|
107
123
|
]
|
108
124
|
t.output_dir = 'coverage'
|
109
125
|
t.verbose = true
|
110
126
|
end
|
111
127
|
rescue LoadError
|
112
|
-
|
128
|
+
task :rcov do
|
129
|
+
puts "RCov is not available"
|
130
|
+
end
|
113
131
|
end
|
114
132
|
|
115
133
|
directory 'testdata'
|
116
|
-
[:
|
134
|
+
["test:all", :test_units, :test_contribs, :test_functional].each do |t|
|
117
135
|
task t => ['testdata']
|
118
136
|
end
|
119
137
|
|
@@ -128,29 +146,24 @@ end
|
|
128
146
|
|
129
147
|
# Create a task to build the RDOC documentation tree.
|
130
148
|
|
131
|
-
begin
|
132
|
-
require 'darkfish-rdoc'
|
133
|
-
DARKFISH_ENABLED = true
|
134
|
-
rescue LoadError => ex
|
135
|
-
DARKFISH_ENABLED = false
|
136
|
-
end
|
137
|
-
|
138
149
|
BASE_RDOC_OPTIONS = [
|
139
|
-
'--line-numbers',
|
140
|
-
'--main', 'README',
|
141
|
-
'--title', 'Rake -- Ruby Make'
|
150
|
+
'--line-numbers', '--show-hash',
|
151
|
+
'--main', 'README.rdoc',
|
152
|
+
'--title', 'Rake -- Ruby Make'
|
142
153
|
]
|
143
154
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
155
|
+
if defined?(RDoc::Task) then
|
156
|
+
RDoc::Task.new do |rdoc|
|
157
|
+
rdoc.rdoc_dir = 'html'
|
158
|
+
rdoc.title = "Rake -- Ruby Make"
|
159
|
+
rdoc.options = BASE_RDOC_OPTIONS.dup
|
160
|
+
|
161
|
+
rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES')
|
162
|
+
rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
|
163
|
+
rdoc.rdoc_files.exclude(/\bcontrib\b/)
|
164
|
+
end
|
165
|
+
else
|
166
|
+
warn "RDoc 2.4.2+ is required to build documentation"
|
154
167
|
end
|
155
168
|
|
156
169
|
# ====================================================================
|
@@ -158,10 +171,11 @@ end
|
|
158
171
|
# tar, zip and gem files.
|
159
172
|
|
160
173
|
PKG_FILES = FileList[
|
174
|
+
'.gemtest',
|
161
175
|
'install.rb',
|
162
176
|
'[A-Z]*',
|
163
|
-
'bin/**/*',
|
164
|
-
'lib/**/*.rb',
|
177
|
+
'bin/**/*',
|
178
|
+
'lib/**/*.rb',
|
165
179
|
'test/**/*.rb',
|
166
180
|
'test/**/*.rf',
|
167
181
|
'test/**/*.mf',
|
@@ -177,7 +191,7 @@ if ! defined?(Gem)
|
|
177
191
|
puts "Package Target requires RubyGEMs"
|
178
192
|
else
|
179
193
|
SPEC = Gem::Specification.new do |s|
|
180
|
-
|
194
|
+
|
181
195
|
#### Basic information.
|
182
196
|
|
183
197
|
s.name = 'rake'
|
@@ -185,13 +199,14 @@ else
|
|
185
199
|
s.summary = "Ruby based make-like utility."
|
186
200
|
s.description = <<-EOF
|
187
201
|
Rake is a Make-like program implemented in Ruby. Tasks
|
188
|
-
and dependencies are specified in standard Ruby syntax.
|
202
|
+
and dependencies are specified in standard Ruby syntax.
|
189
203
|
EOF
|
190
204
|
|
191
205
|
#### Dependencies and requirements.
|
192
206
|
|
193
|
-
|
194
|
-
|
207
|
+
s.required_rubygems_version = '>= 1.3.2'
|
208
|
+
s.add_development_dependency 'session', '~> 2.4'
|
209
|
+
s.add_development_dependency 'flexmock', '~> 0.8.11'
|
195
210
|
|
196
211
|
#### Which files are to be included in this gem? Everything! (Except CVS directories.)
|
197
212
|
|
@@ -211,8 +226,14 @@ else
|
|
211
226
|
|
212
227
|
#### Documentation and testing.
|
213
228
|
|
214
|
-
s.
|
215
|
-
|
229
|
+
s.extra_rdoc_files = FileList[
|
230
|
+
'README.rdoc',
|
231
|
+
'MIT-LICENSE',
|
232
|
+
'TODO',
|
233
|
+
'CHANGES',
|
234
|
+
'doc/**/*.rdoc'
|
235
|
+
]
|
236
|
+
|
216
237
|
s.rdoc_options = BASE_RDOC_OPTIONS
|
217
238
|
|
218
239
|
#### Author and project details.
|
@@ -227,7 +248,7 @@ else
|
|
227
248
|
# end
|
228
249
|
end
|
229
250
|
|
230
|
-
package_task =
|
251
|
+
package_task = Gem::PackageTask.new(SPEC) do |pkg|
|
231
252
|
pkg.need_zip = true
|
232
253
|
pkg.need_tar = true
|
233
254
|
end
|
@@ -289,28 +310,13 @@ task :todo do
|
|
289
310
|
RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
|
290
311
|
end
|
291
312
|
|
292
|
-
desc "Look for Debugging print lines"
|
293
|
-
task :dbg do
|
294
|
-
RUBY_FILES.egrep(/\bDBG|\bbreakpoint\b/)
|
295
|
-
end
|
296
|
-
|
297
313
|
desc "List all ruby files"
|
298
|
-
task :rubyfiles do
|
314
|
+
task :rubyfiles do
|
299
315
|
puts RUBY_FILES
|
300
316
|
puts FileList['bin/*'].exclude('bin/*.rb')
|
301
317
|
end
|
302
318
|
task :rf => :rubyfiles
|
303
319
|
|
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
320
|
# --------------------------------------------------------------------
|
315
321
|
# Creating a release
|
316
322
|
|
@@ -326,28 +332,28 @@ task :release, :rel, :reuse, :reltest,
|
|
326
332
|
:needs => [
|
327
333
|
:prerelease,
|
328
334
|
:clobber,
|
329
|
-
:
|
335
|
+
"test:all",
|
330
336
|
:update_version,
|
331
337
|
:package,
|
332
338
|
:tag
|
333
339
|
] do
|
334
|
-
announce
|
340
|
+
announce
|
335
341
|
announce "**************************************************************"
|
336
342
|
announce "* Release #{$package_version} Complete."
|
337
343
|
announce "* Packages ready to upload."
|
338
344
|
announce "**************************************************************"
|
339
|
-
announce
|
345
|
+
announce
|
340
346
|
end
|
341
347
|
|
342
348
|
# Validate that everything is ready to go for a release.
|
343
349
|
task :prerelease, :rel, :reuse, :reltest do |t, args|
|
344
350
|
$package_version = args.rel
|
345
|
-
announce
|
351
|
+
announce
|
346
352
|
announce "**************************************************************"
|
347
353
|
announce "* Making RubyGem Release #{$package_version}"
|
348
354
|
announce "* (current version #{CURRENT_VERSION})"
|
349
355
|
announce "**************************************************************"
|
350
|
-
announce
|
356
|
+
announce
|
351
357
|
|
352
358
|
# Is a release number supplied?
|
353
359
|
unless args.rel
|
@@ -381,13 +387,13 @@ task :update_version, :rel, :reuse, :reltest,
|
|
381
387
|
announce "Updating Rake version to #{args.rel}"
|
382
388
|
open("lib/rake.rb") do |rakein|
|
383
389
|
open("lib/rake.rb.new", "w") do |rakeout|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
390
|
+
rakein.each do |line|
|
391
|
+
if line =~ /^RAKEVERSION\s*=\s*/
|
392
|
+
rakeout.puts "RAKEVERSION = '#{args.rel}'"
|
393
|
+
else
|
394
|
+
rakeout.puts line
|
395
|
+
end
|
396
|
+
end
|
391
397
|
end
|
392
398
|
end
|
393
399
|
mv "lib/rake.rb.new", "lib/rake.rb"
|
@@ -412,14 +418,6 @@ task :tag, :rel, :reuse, :reltest,
|
|
412
418
|
end
|
413
419
|
end
|
414
420
|
|
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
421
|
# Require experimental XForge/Metaproject support.
|
424
422
|
|
425
423
|
load 'xforge.rf' if File.exist?('xforge.rf')
|
@@ -428,3 +426,8 @@ desc "Where is the current directory. This task displays\nthe current rake dire
|
|
428
426
|
task :where_am_i do
|
429
427
|
puts Rake.original_dir
|
430
428
|
end
|
429
|
+
|
430
|
+
task :failure => :really_fail
|
431
|
+
task :really_fail do
|
432
|
+
fail "oops"
|
433
|
+
end
|