rake 0.8.0 → 0.8.7
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/CHANGES +113 -2
- data/README +86 -132
- data/Rakefile +41 -13
- data/bin/rake +0 -0
- data/doc/command_line_usage.rdoc +102 -0
- data/doc/rakefile.rdoc +126 -3
- data/doc/release_notes/rake-0.7.3.rdoc +0 -0
- data/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/doc/release_notes/rake-0.8.6.rdoc +55 -0
- data/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/lib/rake/alt_system.rb +108 -0
- data/lib/rake/contrib/ftptools.rb +24 -10
- data/lib/rake/contrib/publisher.rb +1 -1
- data/lib/rake/contrib/sys.rb +5 -2
- data/lib/rake/gempackagetask.rb +0 -6
- data/lib/rake/loaders/makefile.rb +17 -15
- data/lib/rake/rdoctask.rb +83 -21
- data/lib/rake/ruby182_test_unit_fix.rb +0 -0
- data/lib/rake/tasklib.rb +8 -3
- data/lib/rake/testtask.rb +1 -1
- data/lib/rake/win32.rb +55 -0
- data/lib/rake.rb +490 -225
- data/test/check_expansion.rb +5 -0
- data/test/check_no_expansion.rb +5 -0
- data/test/data/file_creation_task/Rakefile +4 -1
- data/test/data/sample.mf +6 -1
- data/test/filecreation.rb +0 -2
- data/test/functional.rb +1 -1
- data/test/in_environment.rb +30 -0
- data/test/rake_test_setup.rb +21 -2
- data/test/session_functional.rb +109 -33
- data/test/shellcommand.rb +0 -0
- data/test/test_application.rb +269 -96
- data/test/test_definitions.rb +4 -1
- data/test/test_earlytime.rb +2 -2
- data/test/test_file_task.rb +20 -16
- data/test/test_filelist.rb +48 -7
- data/test/test_fileutils.rb +59 -38
- data/test/test_ftp.rb +5 -1
- data/test/test_invocation_chain.rb +8 -2
- data/test/test_makefile_loader.rb +5 -2
- data/test/test_namespace.rb +30 -11
- data/test/test_package_task.rb +3 -1
- data/test/test_pathmap.rb +3 -2
- data/test/test_pseudo_status.rb +26 -0
- data/test/test_rake.rb +9 -2
- data/test/test_rdoc_task.rb +88 -0
- data/test/test_require.rb +3 -1
- data/test/test_rules.rb +25 -7
- data/test/test_task_arguments.rb +14 -1
- data/test/test_task_manager.rb +27 -2
- data/test/test_tasklib.rb +12 -0
- data/test/test_tasks.rb +72 -54
- data/test/test_test_task.rb +2 -0
- data/test/test_top_level_functions.rb +4 -2
- data/test/test_win32.rb +72 -0
- metadata +99 -75
- /data/test/contrib/{testsys.rb → test_sys.rb} +0 -0
data/CHANGES
CHANGED
|
@@ -1,10 +1,121 @@
|
|
|
1
|
+
|
|
1
2
|
= Rake Changelog
|
|
2
3
|
|
|
3
|
-
==
|
|
4
|
+
== Version 0.8.7
|
|
5
|
+
|
|
6
|
+
* Fixed EXEEXT for JRuby on windows.
|
|
7
|
+
|
|
8
|
+
== Version 0.8.6
|
|
9
|
+
|
|
10
|
+
* Minor fixes to the RDoc generation (removed dependency on darkfish
|
|
11
|
+
and removed inline source option).
|
|
12
|
+
|
|
13
|
+
== Version 0.8.5
|
|
14
|
+
|
|
15
|
+
* Better support for the system command on Windows.
|
|
16
|
+
|
|
17
|
+
== Version 0.8.4
|
|
18
|
+
|
|
19
|
+
* Preserve case when locating rakefiles (patch from James
|
|
20
|
+
M. Lawrence/quix)
|
|
21
|
+
|
|
22
|
+
* Better support for windows paths in the test task (patch from Simon
|
|
23
|
+
Chiang/bahuvrihi)
|
|
24
|
+
|
|
25
|
+
* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH,
|
|
26
|
+
APPDATA, USERPROFILE (patch from Luis Lavena)
|
|
27
|
+
|
|
28
|
+
* MingGW is now recognized as a windows platform. (patch from Luis
|
|
29
|
+
Lavena)
|
|
30
|
+
|
|
31
|
+
* Numerous fixes to the windows test suite (patch from Luis Lavena).
|
|
32
|
+
|
|
33
|
+
* Improved Rakefile case insensitivity testing (patch from Luis
|
|
34
|
+
Lavena).
|
|
35
|
+
|
|
36
|
+
* Fixed stray ARGV option problem that was interfering with
|
|
37
|
+
Test::Unit::Runner.
|
|
38
|
+
|
|
39
|
+
* Fixed default verbose mode (was accidently changed to false).
|
|
40
|
+
|
|
41
|
+
* Removed reference to manage_gem to fix the warning produced by the
|
|
42
|
+
gem package task.
|
|
43
|
+
|
|
44
|
+
== Version 0.8.3
|
|
45
|
+
|
|
46
|
+
* Enhanced the system directory detection in windows. We now check
|
|
47
|
+
HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch
|
|
48
|
+
supplied by James Tucker). Rake no long aborts if it can't find the
|
|
49
|
+
directory.
|
|
50
|
+
|
|
51
|
+
* Added fix to handle ruby installations in directories with spaces in
|
|
52
|
+
their name.
|
|
53
|
+
|
|
54
|
+
== Version 0.8.2
|
|
55
|
+
|
|
56
|
+
* Fixed bug in package task so that it will include the subdir
|
|
57
|
+
directory in the package for testing. (Bug found by Adam Majer)
|
|
58
|
+
|
|
59
|
+
* Added ENV var to rakefile to prevent OS X from including extended
|
|
60
|
+
attribute junk in a tar file. (Bug found by Adam Majer)
|
|
61
|
+
|
|
62
|
+
* Fixed filename dependency order bug in test_inspect_pending and
|
|
63
|
+
test_to_s_pending. (Bug found by Adam Majer)
|
|
64
|
+
|
|
65
|
+
* Fixed check for file utils options to make them immune to the
|
|
66
|
+
symbol/string differences. (Patch supplied by Edwin Pratomo)
|
|
67
|
+
|
|
68
|
+
* Fixed bug with rules involving multiple source (Patch supplied by
|
|
69
|
+
Emanuel Inderm�hle)
|
|
70
|
+
|
|
71
|
+
* Switched from getoptlong to optparse (patches supplied by Edwin
|
|
72
|
+
Pratomo)
|
|
73
|
+
|
|
74
|
+
* The -T option will now attempt to dynamically sense the size of the
|
|
75
|
+
terminal. RAKE_COLUMNS will override any dynamic sensing.
|
|
76
|
+
|
|
77
|
+
* FileList#clone and FileList#dup have better sematics w.r.t. taint
|
|
78
|
+
and freeze.
|
|
79
|
+
|
|
80
|
+
* Added ability clear prerequisites, and/or actions from an existing
|
|
81
|
+
task.
|
|
82
|
+
|
|
83
|
+
* Added the ability to reenable a task to be invoked a second time.
|
|
84
|
+
|
|
85
|
+
* Changed RDoc test task to have no default template. This makes it
|
|
86
|
+
easier for the tempate to pick up the template from the environment.
|
|
87
|
+
|
|
88
|
+
* Changed from using Mutex to Monitor. Evidently Mutex causes thread
|
|
89
|
+
join errors when Ruby is compiled with -disable-pthreads. (Patch
|
|
90
|
+
supplied by Ittay Dror)
|
|
91
|
+
|
|
92
|
+
* Fixed bug in makefile parser that had problems with extra spaces in
|
|
93
|
+
file task names. (Patch supplied by Ittay Dror)
|
|
94
|
+
|
|
95
|
+
* Added a performance patch for reading large makefile dependency
|
|
96
|
+
files. (Patch supplied by Ittay Dror)
|
|
97
|
+
|
|
98
|
+
* Default values for task arguments can easily be specified with the
|
|
99
|
+
:with_defaults method. (Idea for default argument merging supplied
|
|
100
|
+
by (Adam Q. Salter)
|
|
101
|
+
|
|
102
|
+
* The -T output will only self-truncate if the output is a tty.
|
|
103
|
+
However, if RAKE_COLUMNS is explicitly set, it will be honored in
|
|
104
|
+
any case. (Patch provided by Gavin Stark).
|
|
105
|
+
|
|
106
|
+
* Numerous fixes for running under windows. A big thanks to Bheeshmar
|
|
107
|
+
Redheendran for spending a good part of the afternoon at the
|
|
108
|
+
Lonestar Ruby Conference to help me work out these issues.
|
|
109
|
+
|
|
110
|
+
== Version 0.8.1
|
|
111
|
+
|
|
112
|
+
* Removed requires on parsedate.rb (in Ftptools)
|
|
113
|
+
* Removed ftools from rake.rb. Made it options in sys.rb
|
|
114
|
+
|
|
115
|
+
== Version 0.8.0
|
|
4
116
|
|
|
5
117
|
* Added task parameters (e.g. "rake build[version7]")
|
|
6
118
|
* Made task parameters passable to prerequisites.
|
|
7
|
-
* The 'desc' command will now document task argument names.
|
|
8
119
|
* Comments are limited to 80 columns or so (suggested by Jamis Buck).
|
|
9
120
|
* Added -D to display full comments (suggested by Jamis Buck).
|
|
10
121
|
* The rake program will set the status value used in any explicit
|
data/README
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
= RAKE -- Ruby Make
|
|
2
2
|
|
|
3
|
-
Supporting Rake version: 0.
|
|
3
|
+
Supporting Rake version: 0.8.6
|
|
4
4
|
|
|
5
5
|
This package contains Rake, a simple ruby build program with
|
|
6
6
|
capabilities similar to make.
|
|
@@ -13,95 +13,128 @@ Rake has the following features:
|
|
|
13
13
|
|
|
14
14
|
* Users can specify tasks with prerequisites.
|
|
15
15
|
|
|
16
|
-
* Rake supports rule patterns to
|
|
16
|
+
* Rake supports rule patterns to synthesize implicit tasks.
|
|
17
17
|
|
|
18
|
-
*
|
|
19
|
-
|
|
18
|
+
* Flexible FileLists that act like arrays but know about manipulating
|
|
19
|
+
file names and paths.
|
|
20
20
|
|
|
21
|
-
* A library of prepackaged tasks to make building rakefiles easier.
|
|
21
|
+
* A library of prepackaged tasks to make building rakefiles easier. For example,
|
|
22
|
+
tasks for building tarballs, gems and RDoc output are provided.
|
|
22
23
|
|
|
24
|
+
* Supports parallel execution of tasks.
|
|
23
25
|
|
|
24
|
-
== Download
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
== Installation
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
=== Gem Installation
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
Download and install rake with the following.
|
|
32
|
+
|
|
33
|
+
gem install rake
|
|
31
34
|
|
|
32
35
|
=== Normal Installation
|
|
33
36
|
|
|
34
|
-
You can
|
|
37
|
+
You can download the source tarball of the latest version of Rake from
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
* http://rubyforge.org/project/showfiles.php?group_id=50
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
Extract the tarball and run
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
% ruby install.rb
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
from its distribution directory.
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
== Usage
|
|
45
48
|
|
|
46
|
-
===
|
|
49
|
+
=== Simple Example
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
First, you must write a "Rakefile" file which contains the build rules. Here's
|
|
52
|
+
a simple example:
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
task :default => [:test]
|
|
55
|
+
|
|
56
|
+
task :test do
|
|
57
|
+
ruby "test/unittest.rb"
|
|
58
|
+
end
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
ruby -Ilib bin/rake # If you do not have a version of rake installed.
|
|
60
|
+
This Rakefile has two tasks:
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
* A task named "test", which - upon invocation - will run a unit test file in
|
|
63
|
+
Ruby.
|
|
64
|
+
* A task named "default". This task does nothing by itself, but it has exactly
|
|
65
|
+
one dependency, namely the "test" task. Invoking the "default" task will
|
|
66
|
+
cause Rake to invoke the "test" task as well.
|
|
57
67
|
|
|
58
|
-
|
|
68
|
+
Running the "rake" command without any options will cause it to run the
|
|
69
|
+
"default" task in the Rakefile:
|
|
59
70
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
71
|
+
% ls
|
|
72
|
+
Rakefile test/
|
|
73
|
+
% rake
|
|
74
|
+
(in /home/some_user/Projects/rake)
|
|
75
|
+
ruby test/unittest.rb
|
|
76
|
+
....unit test output here...
|
|
63
77
|
|
|
64
|
-
|
|
78
|
+
Type "rake --help" for all available options.
|
|
65
79
|
|
|
66
|
-
* Jim Weirich's 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/
|
|
67
|
-
* Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html
|
|
68
80
|
|
|
69
|
-
===
|
|
81
|
+
=== More Information
|
|
70
82
|
|
|
71
|
-
*
|
|
72
|
-
|
|
83
|
+
* For details on Rake's command-line invocation, read
|
|
84
|
+
doc/command_line_usage.rdoc[http://rake.rubyforge.org/files/doc/command_line_usage_rdoc.html]
|
|
85
|
+
* For details on writing Rakefiles, see
|
|
73
86
|
doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html].
|
|
74
|
-
*
|
|
87
|
+
* For the original announcement of Rake, see
|
|
75
88
|
doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html].
|
|
76
|
-
*
|
|
89
|
+
* For a glossary of terms, see
|
|
77
90
|
doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html].
|
|
78
91
|
|
|
79
|
-
== Simple Example
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
== Development
|
|
82
94
|
|
|
83
|
-
|
|
95
|
+
=== Source Repository
|
|
84
96
|
|
|
85
|
-
|
|
97
|
+
Rake is currently hosted at github. The github web page is
|
|
98
|
+
http://github.com/jimweirich/rake. The public git clone URL is
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
look for a rakefile and invoke the default task in that rakefile.
|
|
100
|
+
* git://github.com/jimweirich/rake.git
|
|
89
101
|
|
|
90
|
-
|
|
102
|
+
=== Running the Rake Test Suite
|
|
91
103
|
|
|
92
|
-
|
|
104
|
+
If you wish to run the unit and functional tests that come with Rake:
|
|
93
105
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
* Install the 'session' gem in order to run the functional tests.
|
|
107
|
+
* CD into the top project directory of rake.
|
|
108
|
+
* Type one of the following:
|
|
109
|
+
|
|
110
|
+
rake # If you have a version of rake installed
|
|
111
|
+
ruby -Ilib bin/rake # If you do not have a version of rake installed.
|
|
97
112
|
|
|
98
|
-
|
|
113
|
+
=== Issues and Bug Reports
|
|
99
114
|
|
|
100
|
-
|
|
115
|
+
Bugs, features requests and other issues can be logged at
|
|
101
116
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
* http://onestepback.org/redmine/projects/show/rake
|
|
118
|
+
|
|
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
|
+
|
|
123
|
+
|
|
124
|
+
== Online Resources
|
|
125
|
+
|
|
126
|
+
=== Rake References
|
|
127
|
+
|
|
128
|
+
* Rake Documentation Home: http://docs.rubyrake.org
|
|
129
|
+
* Rake Project Page: http://rubyforge.org/projects/rake
|
|
130
|
+
* Rake API Documents: http://rake.rubyforge.org
|
|
131
|
+
* Rake Source Code Repo: http://github.com/jimweirich/rake
|
|
132
|
+
* Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git
|
|
133
|
+
|
|
134
|
+
=== Presentations and Articles about Rake
|
|
135
|
+
|
|
136
|
+
* Jim Weirich's 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/
|
|
137
|
+
* Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html
|
|
105
138
|
|
|
106
139
|
== Other Make Reinvisionings ...
|
|
107
140
|
|
|
@@ -143,94 +176,15 @@ new feature to be submitted in the form of new unit tests.
|
|
|
143
176
|
|
|
144
177
|
For other information, feel free to ask on the ruby-talk mailing list
|
|
145
178
|
(which is mirrored to comp.lang.ruby) or contact
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
----
|
|
149
|
-
|
|
150
|
-
= Usage
|
|
151
|
-
|
|
152
|
-
Rake is invoked from the command line using:
|
|
153
|
-
|
|
154
|
-
% rake [<em>options</em> ...] [<em>VAR</em>=<em>VALUE</em>] [<em>targets</em> ...]
|
|
155
|
-
|
|
156
|
-
Options are:
|
|
157
|
-
|
|
158
|
-
[<tt><em>name</em>=<em>value</em></tt>]
|
|
159
|
-
Set the environment variable <em>name</em> to <em>value</em>
|
|
160
|
-
during the execution of the <b>rake</b> command. You can access
|
|
161
|
-
the value by using ENV['<em>name</em>'].
|
|
162
|
-
|
|
163
|
-
[<tt>--classic-namespace</tt> (-n)]
|
|
164
|
-
Import the Task, FileTask, and FileCreateTask into the top-level
|
|
165
|
-
scope to be compatible with older versions of Rake. Alternatively
|
|
166
|
-
you can include the line <code>require
|
|
167
|
-
'rake/classic_namespace'</code> in your Rakefile to get the
|
|
168
|
-
classic behavior.
|
|
169
|
-
|
|
170
|
-
[<tt>--dry-run</tt> (-n)]
|
|
171
|
-
Do a dry run. Print the tasks invoked and executed, but do not
|
|
172
|
-
actually execute any of the actions.
|
|
173
|
-
|
|
174
|
-
[<tt>--help</tt> (-H)]
|
|
175
|
-
Display some help text and exit.
|
|
176
|
-
|
|
177
|
-
[<tt>--libdir</tt> _directory_ (-I)]
|
|
178
|
-
Add _directory_ to the list of directories searched for require.
|
|
179
|
-
|
|
180
|
-
[<tt>--nosearch</tt> (-N)]
|
|
181
|
-
Do not search for a Rakefile in parent directories.
|
|
182
|
-
|
|
183
|
-
[<tt>--prereqs</tt> (-P)]
|
|
184
|
-
Display a list of all tasks and their immediate prerequisites.
|
|
185
|
-
|
|
186
|
-
[<tt>--quiet</tt> (-q)]
|
|
187
|
-
Do not echo commands from FileUtils.
|
|
188
|
-
|
|
189
|
-
[<tt>--rakefile</tt> _filename_ (-f)]
|
|
190
|
-
Use _filename_ as the name of the rakefile. The default rakefile
|
|
191
|
-
names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
|
|
192
|
-
precedence). If the rakefile is not found in the current
|
|
193
|
-
directory, +rake+ will search parent directories for a match. The
|
|
194
|
-
directory where the Rakefile is found will become the current
|
|
195
|
-
directory for the actions executed in the Rakefile.
|
|
196
|
-
|
|
197
|
-
[<tt>--require</tt> _name_ (-r)]
|
|
198
|
-
Require _name_ before executing the Rakefile.
|
|
199
|
-
|
|
200
|
-
[<tt>--tasks</tt> (-T)]
|
|
201
|
-
Display a list of the major tasks and their comments. Comments
|
|
202
|
-
are defined using the "desc" command.
|
|
203
|
-
|
|
204
|
-
[<tt>--trace</tt> (-t)]
|
|
205
|
-
Turn on invoke/execute tracing. Also enable full backtrace on errors.
|
|
206
|
-
|
|
207
|
-
[<tt>--usage</tt> (-h)]
|
|
208
|
-
Display a usage message and exit.
|
|
209
|
-
|
|
210
|
-
[<tt>--verbose</tt> (-v)]
|
|
211
|
-
Echo the Sys commands to standard output.
|
|
212
|
-
|
|
213
|
-
[<tt>--version</tt> (-V)]
|
|
214
|
-
Display the program version and exit.
|
|
215
|
-
|
|
216
|
-
In addition, any command line option of the form
|
|
217
|
-
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
|
|
218
|
-
<tt>ENV</tt> and may be tested in the Rakefile.
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
= Rakefile Format
|
|
223
|
-
|
|
224
|
-
See doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html]
|
|
225
|
-
for details on the Rakefile format.
|
|
179
|
+
jim dot weirich at gmail.com.
|
|
226
180
|
|
|
227
181
|
---
|
|
228
182
|
|
|
229
183
|
= Other stuff
|
|
230
184
|
|
|
231
|
-
Author:: Jim Weirich <jim@
|
|
185
|
+
Author:: Jim Weirich <jim.weirich@gmail.com>
|
|
232
186
|
Requires:: Ruby 1.8.0 or later
|
|
233
|
-
License:: Copyright 2003
|
|
187
|
+
License:: Copyright 2003-2008 by Jim Weirich.
|
|
234
188
|
Released under an MIT-style license. See the LICENSE file
|
|
235
189
|
included in the distribution.
|
|
236
190
|
|
data/Rakefile
CHANGED
|
@@ -16,7 +16,7 @@ require 'rake/clean'
|
|
|
16
16
|
require 'rake/testtask'
|
|
17
17
|
require 'rake/rdoctask'
|
|
18
18
|
|
|
19
|
-
CLEAN.include('**/*.o', '*.dot')
|
|
19
|
+
CLEAN.include('**/*.o', '*.dot', '**/.*.rbc')
|
|
20
20
|
CLOBBER.include('doc/example/main', 'testdata')
|
|
21
21
|
CLOBBER.include('test/data/**/temp_*')
|
|
22
22
|
CLOBBER.include('test/data/chains/play.*')
|
|
@@ -25,6 +25,9 @@ CLOBBER.include('test/data/file_creation_task/src')
|
|
|
25
25
|
CLOBBER.include('TAGS')
|
|
26
26
|
CLOBBER.include('coverage', 'rcov_aggregate')
|
|
27
27
|
|
|
28
|
+
# Prevent OS X from including extended attribute junk in the tar output
|
|
29
|
+
ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
|
|
30
|
+
|
|
28
31
|
def announce(msg='')
|
|
29
32
|
STDERR.puts msg
|
|
30
33
|
end
|
|
@@ -92,9 +95,13 @@ begin
|
|
|
92
95
|
|
|
93
96
|
Rcov::RcovTask.new do |t|
|
|
94
97
|
t.libs << "test"
|
|
98
|
+
dot_rakes =
|
|
95
99
|
t.rcov_opts = [
|
|
96
|
-
'-xRakefile', '-xrakefile', '-xpublish.rf',
|
|
97
|
-
|
|
100
|
+
'-xRakefile', '-xrakefile', '-xpublish.rf',
|
|
101
|
+
'-xlib/rake/contrib', '-x/Library',
|
|
102
|
+
'--text-report',
|
|
103
|
+
'--sort coverage'
|
|
104
|
+
] + FileList['rakelib/*.rake'].pathmap("-x%p")
|
|
98
105
|
t.test_files = FileList[
|
|
99
106
|
'test/test*.rb', 'test/functional.rb'
|
|
100
107
|
]
|
|
@@ -121,19 +128,30 @@ end
|
|
|
121
128
|
|
|
122
129
|
# Create a task to build the RDOC documentation tree.
|
|
123
130
|
|
|
124
|
-
|
|
131
|
+
begin
|
|
132
|
+
require 'darkfish-rdoc'
|
|
133
|
+
DARKFISH_ENABLED = true
|
|
134
|
+
rescue LoadError => ex
|
|
135
|
+
DARKFISH_ENABLED = false
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
BASE_RDOC_OPTIONS = [
|
|
139
|
+
'--line-numbers',
|
|
140
|
+
'--main', 'README',
|
|
141
|
+
'--title', 'Rake -- Ruby Make',
|
|
142
|
+
]
|
|
143
|
+
|
|
144
|
+
rd = Rake::RDocTask.new("rdoc") do |rdoc|
|
|
125
145
|
rdoc.rdoc_dir = 'html'
|
|
126
|
-
# rdoc.template = 'kilmer'
|
|
127
|
-
# rdoc.template = 'css2'
|
|
128
146
|
rdoc.template = 'doc/jamis.rb'
|
|
129
147
|
rdoc.title = "Rake -- Ruby Make"
|
|
130
|
-
rdoc.options
|
|
131
|
-
|
|
132
|
-
|
|
148
|
+
rdoc.options = BASE_RDOC_OPTIONS.dup
|
|
149
|
+
rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED
|
|
150
|
+
|
|
133
151
|
rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
|
|
134
152
|
rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
|
|
135
153
|
rdoc.rdoc_files.exclude(/\bcontrib\b/)
|
|
136
|
-
|
|
154
|
+
end
|
|
137
155
|
|
|
138
156
|
# ====================================================================
|
|
139
157
|
# Create a task that will package the Rake software into distributable
|
|
@@ -148,15 +166,17 @@ PKG_FILES = FileList[
|
|
|
148
166
|
'test/**/*.rf',
|
|
149
167
|
'test/**/*.mf',
|
|
150
168
|
'test/**/Rakefile',
|
|
169
|
+
'test/**/subdir',
|
|
151
170
|
'doc/**/*'
|
|
152
171
|
]
|
|
153
172
|
PKG_FILES.exclude('doc/example/*.o')
|
|
173
|
+
PKG_FILES.exclude('TAGS')
|
|
154
174
|
PKG_FILES.exclude(%r{doc/example/main$})
|
|
155
175
|
|
|
156
176
|
if ! defined?(Gem)
|
|
157
177
|
puts "Package Target requires RubyGEMs"
|
|
158
178
|
else
|
|
159
|
-
|
|
179
|
+
SPEC = Gem::Specification.new do |s|
|
|
160
180
|
|
|
161
181
|
#### Basic information.
|
|
162
182
|
|
|
@@ -193,7 +213,7 @@ else
|
|
|
193
213
|
|
|
194
214
|
s.has_rdoc = true
|
|
195
215
|
s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
|
|
196
|
-
s.rdoc_options =
|
|
216
|
+
s.rdoc_options = BASE_RDOC_OPTIONS
|
|
197
217
|
|
|
198
218
|
#### Author and project details.
|
|
199
219
|
|
|
@@ -207,10 +227,18 @@ else
|
|
|
207
227
|
# end
|
|
208
228
|
end
|
|
209
229
|
|
|
210
|
-
package_task = Rake::GemPackageTask.new(
|
|
230
|
+
package_task = Rake::GemPackageTask.new(SPEC) do |pkg|
|
|
211
231
|
pkg.need_zip = true
|
|
212
232
|
pkg.need_tar = true
|
|
213
233
|
end
|
|
234
|
+
|
|
235
|
+
file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t|
|
|
236
|
+
require 'yaml'
|
|
237
|
+
open(t.name, "w") { |f| f.puts SPEC.to_yaml }
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
desc "Create a stand-alone gemspec"
|
|
241
|
+
task :gemspec => "rake.gemspec"
|
|
214
242
|
end
|
|
215
243
|
|
|
216
244
|
# Misc tasks =========================================================
|
data/bin/rake
CHANGED
|
File without changes
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
= Rake Command Line Usage
|
|
2
|
+
|
|
3
|
+
Rake is invoked from the command line using:
|
|
4
|
+
|
|
5
|
+
% rake [<em>options</em> ...] [<em>VAR</em>=<em>VALUE</em>] [<em>targets</em> ...]
|
|
6
|
+
|
|
7
|
+
Options are:
|
|
8
|
+
|
|
9
|
+
[<tt><em>name</em>=<em>value</em></tt>]
|
|
10
|
+
Set the environment variable <em>name</em> to <em>value</em>
|
|
11
|
+
during the execution of the <b>rake</b> command. You can access
|
|
12
|
+
the value by using ENV['<em>name</em>'].
|
|
13
|
+
|
|
14
|
+
[<tt>--classic-namespace</tt> (-n)]
|
|
15
|
+
Import the Task, FileTask, and FileCreateTask into the top-level
|
|
16
|
+
scope to be compatible with older versions of Rake. Alternatively
|
|
17
|
+
you can include the line <code>require
|
|
18
|
+
'rake/classic_namespace'</code> in your Rakefile to get the
|
|
19
|
+
classic behavior.
|
|
20
|
+
|
|
21
|
+
[<tt>--describe</tt> _pattern_ (-D)]
|
|
22
|
+
Describe the tasks (matching optional PATTERN), then exit.
|
|
23
|
+
|
|
24
|
+
[<tt>--dry-run</tt> (-n)]
|
|
25
|
+
Do a dry run. Print the tasks invoked and executed, but do not
|
|
26
|
+
actually execute any of the actions.
|
|
27
|
+
|
|
28
|
+
[<tt>--execute</tt> _code_ (-e)]
|
|
29
|
+
Execute some Ruby code and exit.
|
|
30
|
+
|
|
31
|
+
[<tt>--execute-print</tt> _code_ (-p)]
|
|
32
|
+
Execute some Ruby code, print the result, and exit.
|
|
33
|
+
|
|
34
|
+
[<tt>--execute-continue</tt> _code_ (-p)]
|
|
35
|
+
Execute some Ruby code, then continue with normal task processing.
|
|
36
|
+
|
|
37
|
+
[<tt>--help</tt> (-H)]
|
|
38
|
+
Display some help text and exit.
|
|
39
|
+
|
|
40
|
+
[<tt>--libdir</tt> _directory_ (-I)]
|
|
41
|
+
Add _directory_ to the list of directories searched for require.
|
|
42
|
+
|
|
43
|
+
[<tt>--nosearch</tt> (-N)]
|
|
44
|
+
Do not search for a Rakefile in parent directories.
|
|
45
|
+
|
|
46
|
+
[<tt>--prereqs</tt> (-P)]
|
|
47
|
+
Display a list of all tasks and their immediate prerequisites.
|
|
48
|
+
|
|
49
|
+
[<tt>--quiet</tt> (-q)]
|
|
50
|
+
Do not echo commands from FileUtils.
|
|
51
|
+
|
|
52
|
+
[<tt>--rakefile</tt> _filename_ (-f)]
|
|
53
|
+
Use _filename_ as the name of the rakefile. The default rakefile
|
|
54
|
+
names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
|
|
55
|
+
precedence). If the rakefile is not found in the current
|
|
56
|
+
directory, +rake+ will search parent directories for a match. The
|
|
57
|
+
directory where the Rakefile is found will become the current
|
|
58
|
+
directory for the actions executed in the Rakefile.
|
|
59
|
+
|
|
60
|
+
[<tt>--rakelibdir</tt> _rakelibdir_ (-R)]
|
|
61
|
+
Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
|
|
62
|
+
|
|
63
|
+
[<tt>--require</tt> _name_ (-r)]
|
|
64
|
+
Require _name_ before executing the Rakefile.
|
|
65
|
+
|
|
66
|
+
[<tt>--rules</tt>]
|
|
67
|
+
Trace the rules resolution.
|
|
68
|
+
|
|
69
|
+
[<tt>--silent (-s)</tt>]
|
|
70
|
+
Like --quiet, but also suppresses the 'in directory' announcement.
|
|
71
|
+
|
|
72
|
+
[<tt>--system</tt> (-g)]
|
|
73
|
+
Use the system wide (global) rakefiles. The project Rakefile is
|
|
74
|
+
ignored. By default, the system wide rakefiles are used only if no
|
|
75
|
+
project Rakefile is found. On Unix-like system, the system wide
|
|
76
|
+
rake files are located in $HOME/.rake. On a windows system they
|
|
77
|
+
are stored in $APPDATA/Rake.
|
|
78
|
+
|
|
79
|
+
[<tt>--no-system</tt> (-G)]
|
|
80
|
+
Use the project level Rakefile, ignoring the system-wide (global)
|
|
81
|
+
rakefiles.
|
|
82
|
+
|
|
83
|
+
[<tt>--tasks</tt> (-T)]
|
|
84
|
+
Display a list of the major tasks and their comments. Comments
|
|
85
|
+
are defined using the "desc" command.
|
|
86
|
+
|
|
87
|
+
[<tt>--trace</tt> (-t)]
|
|
88
|
+
Turn on invoke/execute tracing. Also enable full backtrace on
|
|
89
|
+
errors.
|
|
90
|
+
|
|
91
|
+
[<tt>--usage</tt> (-h)]
|
|
92
|
+
Display a usage message and exit.
|
|
93
|
+
|
|
94
|
+
[<tt>--verbose</tt> (-v)]
|
|
95
|
+
Echo the Sys commands to standard output.
|
|
96
|
+
|
|
97
|
+
[<tt>--version</tt> (-V)]
|
|
98
|
+
Display the program version and exit.
|
|
99
|
+
|
|
100
|
+
In addition, any command line option of the form
|
|
101
|
+
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
|
|
102
|
+
<tt>ENV</tt> and may be tested in the Rakefile.
|