rake 0.4.8 → 0.7.3
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 +183 -0
- data/README +47 -14
- data/Rakefile +212 -44
- data/bin/rake +2 -3
- data/doc/jamis.rb +591 -0
- data/doc/rake.1.gz +0 -0
- data/doc/rakefile.rdoc +180 -3
- data/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/lib/rake/classic_namespace.rb +8 -0
- data/lib/rake/clean.rb +3 -1
- data/lib/rake/contrib/ftptools.rb +21 -21
- data/lib/rake/contrib/rubyforgepublisher.rb +3 -3
- data/lib/rake/contrib/sshpublisher.rb +1 -1
- data/lib/rake/contrib/sys.rb +20 -21
- data/lib/rake/gempackagetask.rb +12 -9
- data/lib/rake/loaders/makefile.rb +40 -0
- data/lib/rake/packagetask.rb +65 -33
- data/lib/rake/rake_test_loader.rb +5 -0
- data/lib/rake/rdoctask.rb +34 -15
- data/lib/rake/ruby182_test_unit_fix.rb +23 -0
- data/lib/rake/runtest.rb +4 -4
- data/lib/rake/tasklib.rb +3 -9
- data/lib/rake/testtask.rb +67 -24
- data/lib/rake.rb +1600 -552
- data/test/capture_stdout.rb +26 -0
- data/test/data/chains/Rakefile +15 -0
- data/test/data/default/Rakefile +19 -0
- data/test/data/dryrun/Rakefile +22 -0
- data/test/data/file_creation_task/Rakefile +30 -0
- data/test/data/imports/Rakefile +19 -0
- data/test/data/imports/deps.mf +1 -0
- data/test/data/multidesc/Rakefile +14 -0
- data/test/data/namespace/Rakefile +57 -0
- data/test/data/rakelib/test1.rb +3 -0
- data/test/data/sample.mf +9 -0
- data/test/data/unittest/Rakefile +1 -0
- data/test/filecreation.rb +18 -10
- data/test/functional.rb +3 -72
- data/test/reqfile.rb +3 -0
- data/test/reqfile2.rb +3 -0
- data/test/session_functional.rb +218 -0
- data/test/shellcommand.rb +3 -0
- data/test/test_application.rb +425 -0
- data/test/{testclean.rb → test_clean.rb} +1 -0
- data/test/test_definitions.rb +82 -0
- data/test/test_earlytime.rb +35 -0
- data/test/test_file_creation_task.rb +62 -0
- data/test/test_file_task.rb +139 -0
- data/test/test_filelist.rb +574 -0
- data/test/test_fileutils.rb +230 -0
- data/test/test_makefile_loader.rb +23 -0
- data/test/test_multitask.rb +45 -0
- data/test/test_namespace.rb +32 -0
- data/test/test_package_task.rb +130 -0
- data/test/test_pathmap.rb +188 -0
- data/test/test_rake.rb +34 -0
- data/test/test_require.rb +33 -0
- data/test/test_rules.rb +305 -0
- data/test/test_task_manager.rb +148 -0
- data/test/test_tasks.rb +146 -0
- data/test/{testtesttask.rb → test_test_task.rb} +5 -0
- data/test/test_top_level_functions.rb +79 -0
- metadata +134 -68
- data/test/testfilelist.rb +0 -255
- data/test/testfileutils.rb +0 -55
- data/test/testpackagetask.rb +0 -81
- data/test/testtasks.rb +0 -371
- /data/test/{testftp.rb → test_ftp.rb} +0 -0
data/doc/rakefile.rdoc
CHANGED
|
@@ -110,6 +110,46 @@ both prerequisites and actions can be added later. For example ...
|
|
|
110
110
|
cp Dir["standard_data/*.data"], "testdata"
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
+
== Tasks with Parallel Prerequisites
|
|
114
|
+
|
|
115
|
+
Rake allows parallel execution of prerequisites using the following syntax:
|
|
116
|
+
|
|
117
|
+
multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do
|
|
118
|
+
puts "All Copies Complete"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
In this example, +copy_files+ is a normal rake task. Its actions are
|
|
122
|
+
executed whereever all of its prerequisites are done. The big
|
|
123
|
+
difference is that the prerequisites (+copy_src+, +copy_bin+ and
|
|
124
|
+
+copy_doc+) are executed in parallel. Each of the prerequisites are
|
|
125
|
+
run in their own Ruby thread, possibly allowing faster overall runtime.
|
|
126
|
+
|
|
127
|
+
=== Secondary Prerequisites
|
|
128
|
+
|
|
129
|
+
If any of the primary prerequites of a multitask have common secondary
|
|
130
|
+
prerequisites, all of the primary/parallel prerequisites will wait
|
|
131
|
+
until the common prerequisites have been run.
|
|
132
|
+
|
|
133
|
+
For example, if the <tt>copy_<em>xxx</em></tt> tasks have the
|
|
134
|
+
following prerequisites:
|
|
135
|
+
|
|
136
|
+
task :copy_src => [:prep_for_copy]
|
|
137
|
+
task :copy_bin => [:prep_for_copy]
|
|
138
|
+
task :copy_doc => [:prep_for_copy]
|
|
139
|
+
|
|
140
|
+
Then the +prep_for_copy+ task is run before starting all the copies in
|
|
141
|
+
parallel. Once +prep_for_copy+ is complete, +copy_src+, +copy_bin+,
|
|
142
|
+
and +copy_doc+ are all run in parallel. Note that +prep_for_copy+ is
|
|
143
|
+
run only once, even though it is referenced in multiple threads.
|
|
144
|
+
|
|
145
|
+
=== Thread Safety
|
|
146
|
+
|
|
147
|
+
The Rake internal data structures are thread-safe with respect
|
|
148
|
+
to the multitask parallel execution, so there is no need for the user
|
|
149
|
+
to do extra synchronization for Rake's benefit. However, if there are
|
|
150
|
+
user data structures shared between the parallel prerequisites, the
|
|
151
|
+
user must do whatever is necessary to prevent race conditions.
|
|
152
|
+
|
|
113
153
|
== Rules
|
|
114
154
|
|
|
115
155
|
When a file is named as a prerequisite, but does not have a file task
|
|
@@ -128,8 +168,8 @@ prerequisite a source file with an extension of ".c" must exist. If
|
|
|
128
168
|
Rake is able to find a file named "mycode.c", it will automatically
|
|
129
169
|
create a task that builds "mycode.o" from "mycode.c".
|
|
130
170
|
|
|
131
|
-
|
|
132
|
-
|
|
171
|
+
If the file "mycode.c" does not exist, rake will attempt
|
|
172
|
+
to recursively synthesize a rule for it.
|
|
133
173
|
|
|
134
174
|
When a task is synthesized from a rule, the +source+ attribute of the
|
|
135
175
|
task is set to the matching source file. This allows us to write
|
|
@@ -163,6 +203,39 @@ The following rule might be used for Java files ...
|
|
|
163
203
|
<b>NOTE:</b> +java_compile+ is a hypothetical method that invokes the
|
|
164
204
|
java compiler.
|
|
165
205
|
|
|
206
|
+
== Importing Dependencies
|
|
207
|
+
|
|
208
|
+
Any ruby file (including other rakefiles) can be included with a
|
|
209
|
+
standard Ruby +require+ command. The rules and declarations in the
|
|
210
|
+
required file are just added to the definitions already accumulated.
|
|
211
|
+
|
|
212
|
+
Because the files are loaded _before_ the rake targets are evaluated,
|
|
213
|
+
the loaded files must be "ready to go" when the rake command is
|
|
214
|
+
invoked. This make generated dependency files difficult to use. By
|
|
215
|
+
the time rake gets around to updating the dependencies file, it is too
|
|
216
|
+
late to load it.
|
|
217
|
+
|
|
218
|
+
The +import+ command addresses this by specifying a file to be loaded
|
|
219
|
+
_after_ the main rakefile is loaded, but _before_ any targets on the
|
|
220
|
+
command line are specified. In addition, if the file name matches an
|
|
221
|
+
explicit task, that task is invoked before loading the file. This
|
|
222
|
+
allows dependency files to be generated and used in a single rake
|
|
223
|
+
command invocation.
|
|
224
|
+
|
|
225
|
+
=== Example:
|
|
226
|
+
|
|
227
|
+
require 'rake/loaders/makefile'
|
|
228
|
+
|
|
229
|
+
file ".depends.mf" => [SRC_LIST] do |t|
|
|
230
|
+
sh "makedepend -f- -- #{CFLAGS} -- #{t.prerequisites} > #{t.name}"
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
import ".depends.mf"
|
|
234
|
+
|
|
235
|
+
If ".depends" does not exist, or is out of date w.r.t. the source
|
|
236
|
+
files, a new ".depends" file is generated using +makedepend+ before
|
|
237
|
+
loading.
|
|
238
|
+
|
|
166
239
|
== Comments
|
|
167
240
|
|
|
168
241
|
Standard Ruby comments (beginning with "#") can be used anywhere it is
|
|
@@ -170,7 +243,7 @@ legal in Ruby source code, including comments for tasks and rules.
|
|
|
170
243
|
However, if you wish a task to be described using the "-T" switch,
|
|
171
244
|
then you need to use the +desc+ command to describe the task.
|
|
172
245
|
|
|
173
|
-
Example:
|
|
246
|
+
=== Example:
|
|
174
247
|
|
|
175
248
|
desc "Create a distribution package"
|
|
176
249
|
task :package => [ ... ] do ... end
|
|
@@ -198,6 +271,109 @@ Only tasks with descriptions will be displayed with the "-T" switch.
|
|
|
198
271
|
Use "-P" (or "--prereqs") to get a list of all tasks and their
|
|
199
272
|
prerequisites.
|
|
200
273
|
|
|
274
|
+
== Namespaces
|
|
275
|
+
|
|
276
|
+
As projects grow (and along with it, the number of tasks), it is
|
|
277
|
+
common for task names to begin to clash. For example, if you might
|
|
278
|
+
have a main program and a set of sample programs built by a single
|
|
279
|
+
Rakefile. By placing the tasks related to the main program in one
|
|
280
|
+
namespace, and the tasks for building the sample programs in a
|
|
281
|
+
different namespace, the task names will not will not interfer with
|
|
282
|
+
each other.
|
|
283
|
+
|
|
284
|
+
For example:
|
|
285
|
+
|
|
286
|
+
namespace "main"
|
|
287
|
+
task :build do
|
|
288
|
+
# Build the main program
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
namespace "samples" do
|
|
293
|
+
task :build do
|
|
294
|
+
# Build the sample programs
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
task :build => ["main:build", "samples:build"]
|
|
299
|
+
|
|
300
|
+
Referencing a task in a separate namespace can be achieved by
|
|
301
|
+
prefixing the task name with the namespace and a colon
|
|
302
|
+
(e.g. "main:build" refers to the :build task in the +main+ namespace).
|
|
303
|
+
Nested namespaces are supported, so
|
|
304
|
+
|
|
305
|
+
Note that the name given in the +task+ command is always the unadorned
|
|
306
|
+
task name without any namespace prefixes. The +task+ command always
|
|
307
|
+
defines a task in the current namespace.
|
|
308
|
+
|
|
309
|
+
=== FileTasks
|
|
310
|
+
|
|
311
|
+
File task names are not scoped by the namespace command. Since the
|
|
312
|
+
name of a file task is the name of an actual file in the file system,
|
|
313
|
+
it makes little sense to include file task names in name space.
|
|
314
|
+
Directory tasks (created by the +directory+ command) are a type of
|
|
315
|
+
file task and are also not affected by namespaces.
|
|
316
|
+
|
|
317
|
+
=== Name Resolution
|
|
318
|
+
|
|
319
|
+
When looking up a task name, rake will start with the current
|
|
320
|
+
namespace and attempt to find the name there. If it fails to find a
|
|
321
|
+
name in the current namespace, it will search the parent namespaces
|
|
322
|
+
until a match is found (or an error occurs if there is no match).
|
|
323
|
+
|
|
324
|
+
The "rake" namespace is a special implicit namespace that refers to
|
|
325
|
+
the toplevel names.
|
|
326
|
+
|
|
327
|
+
If a task name begins with a "^" character, the name resolution will
|
|
328
|
+
start in the parent namespace. Multiple "^" characters are allowed.
|
|
329
|
+
|
|
330
|
+
Here is an example file with multiple :run tasks and how various names
|
|
331
|
+
resolve in different locations.
|
|
332
|
+
|
|
333
|
+
task :run
|
|
334
|
+
|
|
335
|
+
namespace "one" do
|
|
336
|
+
task :run
|
|
337
|
+
|
|
338
|
+
namespace "two" do
|
|
339
|
+
task :run
|
|
340
|
+
|
|
341
|
+
# :run => "one:two:run"
|
|
342
|
+
# "two:run" => "one:two:run"
|
|
343
|
+
# "one:two:run" => "one:two:run"
|
|
344
|
+
# "one:run" => "one:run"
|
|
345
|
+
# "^run" => "one:run"
|
|
346
|
+
# "^^run" => "rake:run" (the top level task)
|
|
347
|
+
# "rake:run" => "rake:run" (the top level task)
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# :run => "one:run"
|
|
351
|
+
# "two:run" => "one:two:run"
|
|
352
|
+
# "^run" => "rake:run"
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# :run => "rake:run"
|
|
356
|
+
# "one:run" => "one:run"
|
|
357
|
+
# "one:two:run" => "one:two:run"
|
|
358
|
+
|
|
359
|
+
== FileLists
|
|
360
|
+
|
|
361
|
+
FileLists are the way Rake manages lists of files. You can treat a
|
|
362
|
+
FileList as an array of strings for the most part, but FileLists
|
|
363
|
+
support some additional operations.
|
|
364
|
+
|
|
365
|
+
=== Creating a FileList
|
|
366
|
+
|
|
367
|
+
Creating a file list is easy. Just give it the list of file names:
|
|
368
|
+
|
|
369
|
+
fl = FileList['file1.rb', file2.rb']
|
|
370
|
+
|
|
371
|
+
Or give it a glob pattern:
|
|
372
|
+
|
|
373
|
+
fl = FileList['*.rb']
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
201
377
|
== Odds and Ends
|
|
202
378
|
|
|
203
379
|
=== do/end verses { }
|
|
@@ -229,6 +405,7 @@ This is the proper way to specify the task ...
|
|
|
229
405
|
end
|
|
230
406
|
|
|
231
407
|
----
|
|
408
|
+
|
|
232
409
|
== See
|
|
233
410
|
|
|
234
411
|
* README -- Main documentation for Rake.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
= Rake 0.4.14 Released
|
|
2
|
+
|
|
3
|
+
== Changes
|
|
4
|
+
|
|
5
|
+
Version 0.4.14 is a compatibility fix to allow Rake's test task to
|
|
6
|
+
work under Ruby 1.8.2. A change in the Test::Unit autorun feature
|
|
7
|
+
prevented Rake from running any tests. This release fixes the
|
|
8
|
+
problem.
|
|
9
|
+
|
|
10
|
+
Rake 0.4.14 is the recommended release for anyone using Ruby 1.8.2.
|
|
11
|
+
|
|
12
|
+
== What is Rake
|
|
13
|
+
|
|
14
|
+
Rake is a build tool similar to the make program in many ways. But
|
|
15
|
+
instead of cryptic make recipes, Rake uses standard Ruby code to
|
|
16
|
+
declare tasks and dependencies. You have the full power of a modern
|
|
17
|
+
scripting language built right into your build tool.
|
|
18
|
+
|
|
19
|
+
== Availability
|
|
20
|
+
|
|
21
|
+
Home Page:: http://rake.rubyforge.org/
|
|
22
|
+
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
|
|
23
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
= Rake 0.4.15 Released
|
|
2
|
+
|
|
3
|
+
== Changes
|
|
4
|
+
|
|
5
|
+
Version 0.4.15 is a bug fix update for the Ruby 1.8.2 compatibility
|
|
6
|
+
changes. This release includes:
|
|
7
|
+
|
|
8
|
+
* Fixed a bug that prevented the TESTOPTS flag from working with the
|
|
9
|
+
revised for 1.8.2 test task.
|
|
10
|
+
|
|
11
|
+
* Updated the docs on --trace to indicate that it also enables a full
|
|
12
|
+
backtrace on errors.
|
|
13
|
+
|
|
14
|
+
* Several fixes for new warnings generated.
|
|
15
|
+
|
|
16
|
+
== Mini-Roadmap
|
|
17
|
+
|
|
18
|
+
I will continue to issue Rake updates in the 0.4.xx series as new
|
|
19
|
+
Ruby-1.8.2 issues become manifest. Once the codebase stabilizes, I
|
|
20
|
+
will release a 0.5.0 version incorporating all the changes. If you
|
|
21
|
+
are not using Ruby-1.8.2 and wish to avoid version churn, I recommend
|
|
22
|
+
staying with a release prior to Rake-0.4.14.
|
|
23
|
+
|
|
24
|
+
== What is Rake
|
|
25
|
+
|
|
26
|
+
Rake is a build tool similar to the make program in many ways. But
|
|
27
|
+
instead of cryptic make recipes, Rake uses standard Ruby code to
|
|
28
|
+
declare tasks and dependencies. You have the full power of a modern
|
|
29
|
+
scripting language built right into your build tool.
|
|
30
|
+
|
|
31
|
+
== Availability
|
|
32
|
+
|
|
33
|
+
Home Page:: http://rake.rubyforge.org/
|
|
34
|
+
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
|
|
35
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
= Rake 0.5.0 Released
|
|
2
|
+
|
|
3
|
+
It has been a long time in coming, but we finally have a new version
|
|
4
|
+
of Rake available.
|
|
5
|
+
|
|
6
|
+
== Changes
|
|
7
|
+
|
|
8
|
+
* Fixed bug where missing intermediate file dependencies could cause
|
|
9
|
+
an abort with --trace or --dry-run. (Brian Candler)
|
|
10
|
+
|
|
11
|
+
* Recursive rules are now supported (Tilman Sauerbeck).
|
|
12
|
+
|
|
13
|
+
* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck).
|
|
14
|
+
|
|
15
|
+
* Added warning option for the Test Task (requested by Eric Hodel).
|
|
16
|
+
|
|
17
|
+
* The jamis rdoc template is only used if it exists.
|
|
18
|
+
|
|
19
|
+
* Added fix for Ruby 1.8.2 test/unit and rails problem.
|
|
20
|
+
|
|
21
|
+
* Added contributed rake man file. (Jani Monoses)
|
|
22
|
+
|
|
23
|
+
* Fixed documentation that was lacking the Rake module name (Tilman
|
|
24
|
+
Sauerbeck).
|
|
25
|
+
|
|
26
|
+
== What is Rake
|
|
27
|
+
|
|
28
|
+
Rake is a build tool similar to the make program in many ways. But
|
|
29
|
+
instead of cryptic make recipes, Rake uses standard Ruby code to
|
|
30
|
+
declare tasks and dependencies. You have the full power of a modern
|
|
31
|
+
scripting language built right into your build tool.
|
|
32
|
+
|
|
33
|
+
== Availability
|
|
34
|
+
|
|
35
|
+
The easiest way to get and install rake is via RubyGems ...
|
|
36
|
+
|
|
37
|
+
gem install rake (you may need root/admin privileges)
|
|
38
|
+
|
|
39
|
+
Otherwise, you can get it from the more traditional places:
|
|
40
|
+
|
|
41
|
+
Home Page:: http://rake.rubyforge.org/
|
|
42
|
+
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
|
|
43
|
+
|
|
44
|
+
== Thanks
|
|
45
|
+
|
|
46
|
+
Lots of people provided input to this release. Thanks to Tilman
|
|
47
|
+
Sauerbeck for numerous patches, documentation fixes and suggestions.
|
|
48
|
+
And for also pushing me to get this release out. Also, thanks to
|
|
49
|
+
Brian Candler for the finding and fixing --trace/dry-run fix. That
|
|
50
|
+
was an obscure bug. Also to Eric Hodel for some good suggestions.
|
|
51
|
+
|
|
52
|
+
-- Jim Weirich
|
|
53
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
= Rake 0.5.0 Released
|
|
2
|
+
|
|
3
|
+
Although it has only been two weeks since the last release, we have
|
|
4
|
+
enough updates to the Rake program to make it time for another
|
|
5
|
+
release.
|
|
6
|
+
|
|
7
|
+
== Changes
|
|
8
|
+
|
|
9
|
+
Here are the changes for version 0.5.3 ...
|
|
10
|
+
|
|
11
|
+
* FileLists have been extensively changed so that they mimic the
|
|
12
|
+
behavior of real arrays even more closely. In particular,
|
|
13
|
+
operations on FileLists that return a new collection (e.g. collect,
|
|
14
|
+
reject) will now return a FileList rather than an array. In
|
|
15
|
+
addition, several places where FileLists were not properly expanded
|
|
16
|
+
before use have been fixed.
|
|
17
|
+
|
|
18
|
+
* A method (+ext+) to simplify the handling of file extensions was
|
|
19
|
+
added to String and to Array.
|
|
20
|
+
|
|
21
|
+
* The 'testrb' script in test/unit tends to silently swallow syntax
|
|
22
|
+
errors in test suites. Because of that, the default test loader is
|
|
23
|
+
now a rake-provided script. You can still use 'testrb' by setting
|
|
24
|
+
the loader flag in the test task to :testrb. (See the API documents
|
|
25
|
+
for TestTask for all the loader flag values).
|
|
26
|
+
|
|
27
|
+
* FileUtil methods (e.g. cp, mv, install) are now declared to be
|
|
28
|
+
private. This will cut down on the interference with user defined
|
|
29
|
+
methods of the same name.
|
|
30
|
+
|
|
31
|
+
* Fixed the verbose flag in the TestTask so that the test code is
|
|
32
|
+
controlled by the flag. Also shortened up some failure messages.
|
|
33
|
+
(Thanks to Tobias Luetke for the suggestion).
|
|
34
|
+
|
|
35
|
+
* Rules will now properly detect a task that can generate a source
|
|
36
|
+
file. Previously rules would only consider source files that were
|
|
37
|
+
already present.
|
|
38
|
+
|
|
39
|
+
* Added an +import+ command that allows Rake to dynamically import
|
|
40
|
+
dependendencies into a running Rake session. The +import+ command
|
|
41
|
+
can run tasks to update the dependency file before loading them.
|
|
42
|
+
Dependency files can be in rake or make format, allowing rake to
|
|
43
|
+
work with tools designed to generate dependencies for make.
|
|
44
|
+
|
|
45
|
+
== What is Rake
|
|
46
|
+
|
|
47
|
+
Rake is a build tool similar to the make program in many ways. But
|
|
48
|
+
instead of cryptic make recipes, Rake uses standard Ruby code to
|
|
49
|
+
declare tasks and dependencies. You have the full power of a modern
|
|
50
|
+
scripting language built right into your build tool.
|
|
51
|
+
|
|
52
|
+
== Availability
|
|
53
|
+
|
|
54
|
+
The easiest way to get and install rake is via RubyGems ...
|
|
55
|
+
|
|
56
|
+
gem install rake (you may need root/admin privileges)
|
|
57
|
+
|
|
58
|
+
Otherwise, you can get it from the more traditional places:
|
|
59
|
+
|
|
60
|
+
Home Page:: http://rake.rubyforge.org/
|
|
61
|
+
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
|
|
62
|
+
|
|
63
|
+
== Thanks
|
|
64
|
+
|
|
65
|
+
As usual, it was input from users that drove a alot of these changes.
|
|
66
|
+
Thanks to ...
|
|
67
|
+
|
|
68
|
+
* Brian Gernhardt for the rules fix (especially for the patience to
|
|
69
|
+
explain the problem to me until I got what he was talking about).
|
|
70
|
+
* Stefan Lang for pointing out problems in the dark corners of the
|
|
71
|
+
FileList implementation.
|
|
72
|
+
* Alexey Verkhovsky pointing out the silently swallows syntax errors
|
|
73
|
+
in tests.
|
|
74
|
+
* Tobias Luetke for beautifying the test task output.
|
|
75
|
+
* Sam Roberts for some of the ideas behind dependency loading.
|
|
76
|
+
|
|
77
|
+
-- Jim Weirich
|
|
78
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
= Rake 0.5.4 Released
|
|
2
|
+
|
|
3
|
+
Time for some minor bug fixes and small enhancements
|
|
4
|
+
|
|
5
|
+
== Changes
|
|
6
|
+
|
|
7
|
+
Here are the changes for version 0.5.3 ...
|
|
8
|
+
|
|
9
|
+
* Added double quotes to the test runner. This allows the location of
|
|
10
|
+
the tests (and runner) to be in a directory path that contains
|
|
11
|
+
spaces (e.g. "C:/Program Files/ruby/bin").
|
|
12
|
+
|
|
13
|
+
* Added .svn to default ignore list. Now subversion project metadata
|
|
14
|
+
is automatically ignored by Rake's FileList.
|
|
15
|
+
|
|
16
|
+
* Updated FileList#include to support nested arrays and filelists.
|
|
17
|
+
FileLists are flat lists of file names. Using a FileList in an
|
|
18
|
+
include will flatten out the nested file names.
|
|
19
|
+
|
|
20
|
+
== What is Rake
|
|
21
|
+
|
|
22
|
+
Rake is a build tool similar to the make program in many ways. But
|
|
23
|
+
instead of cryptic make recipes, Rake uses standard Ruby code to
|
|
24
|
+
declare tasks and dependencies. You have the full power of a modern
|
|
25
|
+
scripting language built right into your build tool.
|
|
26
|
+
|
|
27
|
+
== Availability
|
|
28
|
+
|
|
29
|
+
The easiest way to get and install rake is via RubyGems ...
|
|
30
|
+
|
|
31
|
+
gem install rake (you may need root/admin privileges)
|
|
32
|
+
|
|
33
|
+
Otherwise, you can get it from the more traditional places:
|
|
34
|
+
|
|
35
|
+
Home Page:: http://rake.rubyforge.org/
|
|
36
|
+
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
|
|
37
|
+
|
|
38
|
+
== Thanks
|
|
39
|
+
|
|
40
|
+
As usual, it was input from users that drove a alot of these changes.
|
|
41
|
+
Thanks to ...
|
|
42
|
+
|
|
43
|
+
* Tilman Sauerbeck for the nested FileList suggestion.
|
|
44
|
+
* Josh Knowles for pointing out the spaces in directory name problem.
|
|
45
|
+
|
|
46
|
+
-- Jim Weirich
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
= Rake 0.6.0 Released
|
|
2
|
+
|
|
3
|
+
Its time for some long requested enhancements and lots of bug fixes
|
|
4
|
+
... And a whole new web page.
|
|
5
|
+
|
|
6
|
+
== New Web Page
|
|
7
|
+
|
|
8
|
+
The primary documentation for rake has moved from the RubyForge based
|
|
9
|
+
wiki to its own Hieraki based web site. Constant spam on the wiki
|
|
10
|
+
made it a difficult to keep clean. The new site will be easier to
|
|
11
|
+
update and organize.
|
|
12
|
+
|
|
13
|
+
Check out the new documentation at: http://docs.rubyrake.org
|
|
14
|
+
|
|
15
|
+
We will be adding new documentation to the site as time goes on.
|
|
16
|
+
|
|
17
|
+
In addition to the new docs page, make sure you check out Martin
|
|
18
|
+
Fowlers article on rake at http://martinfowler.com/articles/rake.html
|
|
19
|
+
|
|
20
|
+
== Changes
|
|
21
|
+
|
|
22
|
+
=== New Features
|
|
23
|
+
|
|
24
|
+
* Multiple prerequisites on Rake rules now allowed. However, keep the
|
|
25
|
+
following in mind:
|
|
26
|
+
|
|
27
|
+
1. All the prerequisites of a rule must be available before a rule
|
|
28
|
+
is triggered, where "enabled" means (a) an existing file, (b) a
|
|
29
|
+
defined rule, or (c) another rule which also must be
|
|
30
|
+
trigger-able.
|
|
31
|
+
2. Rules are checked in order of definition, so it is important to
|
|
32
|
+
order your rules properly. If a file can be created by two
|
|
33
|
+
different rules, put the more specific rule first (otherwise the
|
|
34
|
+
more general rule will trigger first and the specific one will
|
|
35
|
+
never be triggered).
|
|
36
|
+
3. The <tt>source</tt> method now returns the name of the first
|
|
37
|
+
prerequisite listed in the rule. <tt>sources</tt> returns the
|
|
38
|
+
names of all the rule prerequisites, ordered as they are defined
|
|
39
|
+
in the rule. If the task has other prerequisites not defined in
|
|
40
|
+
the rule (but defined in an explicit task definition), then they
|
|
41
|
+
will _not_ be included in the sources list.
|
|
42
|
+
|
|
43
|
+
* FileLists may now use the egrep command. This popular enhancement
|
|
44
|
+
is now a core part of the FileList object. If you want to get a
|
|
45
|
+
list of all your to-dos, fixmes and TBD comments, add the following
|
|
46
|
+
to your Rakefile.
|
|
47
|
+
|
|
48
|
+
desc "Look for TODO and FIXME tags in the code"
|
|
49
|
+
task :todo do
|
|
50
|
+
FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
* The <tt>investigation</tt> method was added to task object to dump
|
|
54
|
+
out some important values. This makes it a bit easier to debug Rake
|
|
55
|
+
tasks.
|
|
56
|
+
|
|
57
|
+
For example, if you are having problems with a particular task, just
|
|
58
|
+
print it out:
|
|
59
|
+
|
|
60
|
+
task :huh do
|
|
61
|
+
puts Rake::Task['huh'].investigation
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
* The Rake::TestTask class now supports a "ruby_opts" option to pass
|
|
65
|
+
arbitrary ruby options to a test subprocess.
|
|
66
|
+
|
|
67
|
+
=== Some Incompatibilities
|
|
68
|
+
|
|
69
|
+
* When using the <tt>ruby</tt> command to start a Ruby subprocess, the
|
|
70
|
+
Ruby interpreter that is currently running rake is used by default.
|
|
71
|
+
This makes it easier to use rake in an environment with multiple
|
|
72
|
+
ruby installation. (Previously, the first ruby command found in the
|
|
73
|
+
PATH was used).
|
|
74
|
+
|
|
75
|
+
If you wish to chose a different Ruby interpreter, you can
|
|
76
|
+
explicitly choose the interpreter via the <tt>sh</tt> command.
|
|
77
|
+
|
|
78
|
+
* The major rake classes (Task, FileTask, FileCreationTask, RakeApp)
|
|
79
|
+
have been moved out of the toplevel scope and are now accessible as
|
|
80
|
+
Rake::Task, Rake::FileTask, Rake::FileCreationTask and
|
|
81
|
+
Rake::Application. If your Rakefile
|
|
82
|
+
directly references any one of these tasks, you may:
|
|
83
|
+
|
|
84
|
+
1. Update your Rakefile to use the new classnames
|
|
85
|
+
2. Use the --classic-namespace option on the rake command to get the
|
|
86
|
+
old behavior,
|
|
87
|
+
3. Add <code>require 'rake/classic_namespace'</code> to the
|
|
88
|
+
Rakefile to get the old behavior.
|
|
89
|
+
|
|
90
|
+
<tt>rake</tt> will print a rather annoying warning whenever a
|
|
91
|
+
deprecated class name is referenced without enabling classic
|
|
92
|
+
namespace.
|
|
93
|
+
|
|
94
|
+
=== Bug Fixes
|
|
95
|
+
|
|
96
|
+
* Several unit tests and functional tests were fixed to run better
|
|
97
|
+
under windows.
|
|
98
|
+
|
|
99
|
+
* Directory tasks are now a specialized version of a File task. A
|
|
100
|
+
directory task will only be triggered if it doesn't exist. It will
|
|
101
|
+
not be triggered if it is out of date w.r.t. any of its
|
|
102
|
+
prerequisites.
|
|
103
|
+
|
|
104
|
+
* Fixed a bug in the Rake::GemPackageTask class so that the gem now
|
|
105
|
+
properly contains the platform name.
|
|
106
|
+
|
|
107
|
+
* Fixed a bug where a prerequisite on a <tt>file</tt> task would cause
|
|
108
|
+
an exception if the prerequisite did not exist.
|
|
109
|
+
|
|
110
|
+
== What is Rake
|
|
111
|
+
|
|
112
|
+
Rake is a build tool similar to the make program in many ways. But
|
|
113
|
+
instead of cryptic make recipes, Rake uses standard Ruby code to
|
|
114
|
+
declare tasks and dependencies. You have the full power of a modern
|
|
115
|
+
scripting language built right into your build tool.
|
|
116
|
+
|
|
117
|
+
== Availability
|
|
118
|
+
|
|
119
|
+
The easiest way to get and install rake is via RubyGems ...
|
|
120
|
+
|
|
121
|
+
gem install rake (you may need root/admin privileges)
|
|
122
|
+
|
|
123
|
+
Otherwise, you can get it from the more traditional places:
|
|
124
|
+
|
|
125
|
+
Home Page:: http://rake.rubyforge.org/
|
|
126
|
+
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
|
|
127
|
+
|
|
128
|
+
== Thanks
|
|
129
|
+
|
|
130
|
+
As usual, it was input from users that drove a alot of these changes.
|
|
131
|
+
The following people either contributed patches, made suggestions or
|
|
132
|
+
made otherwise helpful comments. Thanks to ...
|
|
133
|
+
|
|
134
|
+
* Greg Fast (better ruby_opt test options)
|
|
135
|
+
* Kelly Felkins (requested by better namespace support)
|
|
136
|
+
* Martin Fowler (suggested Task.investigation)
|
|
137
|
+
* Stuart Jansen (send initial patch for multiple prerequisites).
|
|
138
|
+
* Masao Mutch (better support for non-ruby Gem platforms)
|
|
139
|
+
* Philipp Neubeck (patch for file task exception fix)
|
|
140
|
+
|
|
141
|
+
-- Jim Weirich
|