rake 0.8.7 → 0.9.0.beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. data/.gemtest +0 -0
  2. data/CHANGES +77 -9
  3. data/{README → README.rdoc} +14 -10
  4. data/Rakefile +113 -110
  5. data/TODO +1 -1
  6. data/doc/command_line_usage.rdoc +18 -6
  7. data/doc/glossary.rdoc +2 -2
  8. data/doc/jamis.rb +2 -2
  9. data/doc/proto_rake.rdoc +22 -22
  10. data/doc/rake.1.gz +0 -0
  11. data/doc/rakefile.rdoc +60 -28
  12. data/doc/rational.rdoc +6 -6
  13. data/doc/release_notes/rake-0.4.15.rdoc +1 -1
  14. data/doc/release_notes/rake-0.5.0.rdoc +1 -1
  15. data/doc/release_notes/rake-0.7.0.rdoc +1 -1
  16. data/doc/release_notes/rake-0.7.2.rdoc +3 -3
  17. data/doc/release_notes/rake-0.7.3.rdoc +2 -2
  18. data/doc/release_notes/rake-0.8.0.rdoc +1 -1
  19. data/doc/release_notes/rake-0.8.2.rdoc +3 -3
  20. data/doc/release_notes/rake-0.8.3.rdoc +2 -2
  21. data/doc/release_notes/rake-0.8.4.rdoc +1 -1
  22. data/doc/release_notes/rake-0.8.5.rdoc +1 -1
  23. data/doc/release_notes/rake-0.8.6.rdoc +1 -1
  24. data/doc/release_notes/rake-0.8.7.rdoc +1 -1
  25. data/install.rb +14 -12
  26. data/lib/rake.rb +28 -2470
  27. data/lib/rake/alt_system.rb +7 -6
  28. data/lib/rake/application.rb +585 -0
  29. data/lib/rake/classic_namespace.rb +1 -0
  30. data/lib/rake/clean.rb +14 -14
  31. data/lib/rake/cloneable.rb +25 -0
  32. data/lib/rake/contrib/compositepublisher.rb +2 -5
  33. data/lib/rake/contrib/ftptools.rb +5 -8
  34. data/lib/rake/contrib/publisher.rb +2 -8
  35. data/lib/rake/contrib/rubyforgepublisher.rb +2 -4
  36. data/lib/rake/contrib/sshpublisher.rb +4 -6
  37. data/lib/rake/contrib/sys.rb +7 -25
  38. data/lib/rake/default_loader.rb +10 -0
  39. data/lib/rake/dsl.rb +2 -0
  40. data/lib/rake/dsl_definition.rb +146 -0
  41. data/lib/rake/early_time.rb +18 -0
  42. data/lib/rake/environment.rb +40 -0
  43. data/lib/rake/ext/core.rb +27 -0
  44. data/lib/rake/ext/module.rb +39 -0
  45. data/lib/rake/ext/string.rb +167 -0
  46. data/lib/rake/ext/time.rb +14 -0
  47. data/lib/rake/file_creation_task.rb +24 -0
  48. data/lib/rake/file_list.rb +403 -0
  49. data/lib/rake/file_task.rb +47 -0
  50. data/lib/rake/file_utils.rb +112 -0
  51. data/lib/rake/file_utils_ext.rb +132 -0
  52. data/lib/rake/gempackagetask.rb +6 -90
  53. data/lib/rake/invocation_chain.rb +51 -0
  54. data/lib/rake/invocation_exception_mixin.rb +16 -0
  55. data/lib/rake/loaders/makefile.rb +13 -15
  56. data/lib/rake/multi_task.rb +16 -0
  57. data/lib/rake/name_space.rb +25 -0
  58. data/lib/rake/packagetask.rb +13 -12
  59. data/lib/rake/pathmap.rb +1 -0
  60. data/lib/rake/pseudo_status.rb +24 -0
  61. data/lib/rake/rake_module.rb +25 -0
  62. data/lib/rake/rake_test_loader.rb +10 -2
  63. data/lib/rake/rdoctask.rb +211 -190
  64. data/lib/rake/ruby182_test_unit_fix.rb +9 -7
  65. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  66. data/lib/rake/runtest.rb +4 -6
  67. data/lib/rake/task.rb +327 -0
  68. data/lib/rake/task_argument_error.rb +7 -0
  69. data/lib/rake/task_arguments.rb +74 -0
  70. data/lib/rake/task_manager.rb +329 -0
  71. data/lib/rake/tasklib.rb +1 -2
  72. data/lib/rake/testtask.rb +51 -26
  73. data/lib/rake/version.rb +12 -0
  74. data/lib/rake/win32.rb +4 -4
  75. data/test/contrib/test_sys.rb +7 -30
  76. data/test/data/comments/Rakefile +18 -0
  77. data/test/data/default/Rakefile +1 -1
  78. data/test/data/dryrun/Rakefile +1 -1
  79. data/test/data/file_creation_task/Rakefile +1 -1
  80. data/test/data/namespace/Rakefile +9 -0
  81. data/test/data/rakelib/test1.rb +4 -2
  82. data/test/data/verbose/Rakefile +34 -0
  83. data/test/functional/functional_test.rb +25 -0
  84. data/test/{session_functional.rb → functional/session_based_tests.rb} +134 -23
  85. data/test/in_environment.rb +6 -4
  86. data/test/{test_application.rb → lib/application_test.rb} +277 -136
  87. data/test/{test_clean.rb → lib/clean_test.rb} +1 -0
  88. data/test/{test_definitions.rb → lib/definitions_test.rb} +2 -2
  89. data/test/lib/dsl_test.rb +52 -0
  90. data/test/{test_earlytime.rb → lib/earlytime_test.rb} +1 -2
  91. data/test/lib/environment_test.rb +18 -0
  92. data/test/{test_extension.rb → lib/extension_test.rb} +2 -2
  93. data/test/{test_file_creation_task.rb → lib/file_creation_task_test.rb} +0 -0
  94. data/test/{test_file_task.rb → lib/file_task_test.rb} +3 -3
  95. data/test/{test_filelist.rb → lib/filelist_test.rb} +28 -24
  96. data/test/{test_fileutils.rb → lib/fileutils_test.rb} +26 -21
  97. data/test/{test_ftp.rb → lib/ftp_test.rb} +0 -0
  98. data/test/{test_invocation_chain.rb → lib/invocation_chain_test.rb} +0 -0
  99. data/test/{test_makefile_loader.rb → lib/makefile_loader_test.rb} +0 -0
  100. data/test/{test_multitask.rb → lib/multitask_test.rb} +14 -6
  101. data/test/{test_namespace.rb → lib/namespace_test.rb} +0 -0
  102. data/test/lib/package_task_test.rb +82 -0
  103. data/test/{test_pathmap.rb → lib/pathmap_test.rb} +3 -2
  104. data/test/{test_pseudo_status.rb → lib/pseudo_status_test.rb} +0 -0
  105. data/test/{test_rake.rb → lib/rake_test.rb} +1 -1
  106. data/test/{test_rdoc_task.rb → lib/rdoc_task_test.rb} +19 -23
  107. data/test/{test_require.rb → lib/require_test.rb} +8 -2
  108. data/test/{test_rules.rb → lib/rules_test.rb} +1 -2
  109. data/test/{test_task_arguments.rb → lib/task_arguments_test.rb} +5 -5
  110. data/test/{test_task_manager.rb → lib/task_manager_test.rb} +5 -5
  111. data/test/{test_tasks.rb → lib/task_test.rb} +69 -4
  112. data/test/{test_tasklib.rb → lib/tasklib_test.rb} +0 -0
  113. data/test/{test_test_task.rb → lib/test_task_test.rb} +3 -3
  114. data/test/lib/testtask_test.rb +49 -0
  115. data/test/{test_top_level_functions.rb → lib/top_level_functions_test.rb} +3 -3
  116. data/test/{test_win32.rb → lib/win32_test.rb} +19 -0
  117. data/test/rake_test_setup.rb +4 -9
  118. data/test/ruby_version_test.rb +3 -0
  119. data/test/test_helper.rb +12 -0
  120. metadata +100 -44
  121. data/test/functional.rb +0 -15
  122. data/test/test_package_task.rb +0 -118
data/TODO CHANGED
@@ -6,7 +6,7 @@ the rake-devel@rubyforge.org mailing list.
6
6
  === To Do
7
7
  * Need a nice API for accessing tasks in namespaces, namespaces in an app, etc.
8
8
  * Provide a way to disable -w warning mode.
9
- * Define a set of default rules that work in the absense of any Rakefile
9
+ * Define a set of default rules that work in the absence of any Rakefile
10
10
  * What about cyclic dependencies?
11
11
  * Java support utilities
12
12
  * Installation support utilities
@@ -9,7 +9,7 @@ Options are:
9
9
  [<tt><em>name</em>=<em>value</em></tt>]
10
10
  Set the environment variable <em>name</em> to <em>value</em>
11
11
  during the execution of the <b>rake</b> command. You can access
12
- the value by using ENV['<em>name</em>'].
12
+ the value by using ENV['<em>name</em>'].
13
13
 
14
14
  [<tt>--classic-namespace</tt> (-n)]
15
15
  Import the Task, FileTask, and FileCreateTask into the top-level
@@ -80,23 +80,35 @@ Options are:
80
80
  Use the project level Rakefile, ignoring the system-wide (global)
81
81
  rakefiles.
82
82
 
83
- [<tt>--tasks</tt> (-T)]
83
+ [<tt>--tasks</tt> <em>pattern</em> (-T)]
84
84
  Display a list of the major tasks and their comments. Comments
85
- are defined using the "desc" command.
85
+ are defined using the "desc" command. If a pattern is given, then
86
+ only tasks matching the pattern are displayed.
87
+
88
+ [<tt>--no-top-level-dsl</tt> (-X)]
89
+ Do not put the Rake DSL commands into the top level scope.
90
+
91
+ [<tt>--top-level-dsl</tt>]
92
+ Put the Rake DSL commands into the top level scope (default).
93
+
94
+ NOTE: Although currently Rake defaults to its DSL in the top level
95
+ scope, the plan is to deprecate this in the future and default ot
96
+ having the DSL commands *not* appear in the top level scope.
86
97
 
87
98
  [<tt>--trace</tt> (-t)]
88
99
  Turn on invoke/execute tracing. Also enable full backtrace on
89
100
  errors.
90
101
 
91
- [<tt>--usage</tt> (-h)]
92
- Display a usage message and exit.
93
-
94
102
  [<tt>--verbose</tt> (-v)]
95
103
  Echo the Sys commands to standard output.
96
104
 
97
105
  [<tt>--version</tt> (-V)]
98
106
  Display the program version and exit.
99
107
 
108
+ [<tt>--where</tt> <em>pattern</em> (-W)]
109
+ Display tasks that match <em>pattern</em> and the file and line
110
+ number where the task is defined.
111
+
100
112
  In addition, any command line option of the form
101
113
  <em>VAR</em>=<em>VALUE</em> will be added to the environment hash
102
114
  <tt>ENV</tt> and may be tested in the Rakefile.
@@ -37,9 +37,9 @@
37
37
  not needed. This may change in the future.
38
38
 
39
39
  [<b>prerequisites</b>]
40
- Every task has a set (possiblity empty) of prerequisites. A
40
+ Every task has a set (possibly empty) of prerequisites. A
41
41
  prerequisite P to Task T is itself a task that must be invoked
42
- before Task T.
42
+ before Task T.
43
43
 
44
44
  [<b>rule</b>]
45
45
  A rule is a recipe for synthesizing a task when no task is
@@ -183,7 +183,7 @@ h3, h4, h5, h6 {
183
183
  CSS
184
184
 
185
185
  XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
186
- <!DOCTYPE html
186
+ <!DOCTYPE html
187
187
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
188
188
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
189
189
  }
@@ -510,7 +510,7 @@ FILE_INDEX = XHTML_PREAMBLE + <<HTML
510
510
  <!--
511
511
  body {
512
512
  background-color: #EEE;
513
- font-family: #{FONTS};
513
+ font-family: #{FONTS};
514
514
  color: #000;
515
515
  margin: 0px;
516
516
  }
@@ -4,54 +4,54 @@ This is the original 100 line prototype rake program.
4
4
 
5
5
  ---
6
6
  #!/usr/bin/env ruby
7
-
7
+
8
8
  require 'ftools'
9
-
9
+
10
10
  class Task
11
11
  TASKS = Hash.new
12
-
12
+
13
13
  attr_reader :prerequisites
14
-
14
+
15
15
  def initialize(task_name)
16
16
  @name = task_name
17
17
  @prerequisites = []
18
18
  @actions = []
19
19
  end
20
-
20
+
21
21
  def enhance(deps=nil, &block)
22
22
  @prerequisites |= deps if deps
23
23
  @actions << block if block_given?
24
24
  self
25
25
  end
26
-
26
+
27
27
  def name
28
28
  @name.to_s
29
29
  end
30
-
30
+
31
31
  def invoke
32
32
  @prerequisites.each { |n| Task[n].invoke }
33
33
  execute if needed?
34
34
  end
35
-
35
+
36
36
  def execute
37
37
  return if @triggered
38
38
  @triggered = true
39
39
  @actions.collect { |act| result = act.call(self) }.last
40
40
  end
41
-
41
+
42
42
  def needed?
43
43
  true
44
44
  end
45
-
45
+
46
46
  def timestamp
47
47
  Time.now
48
48
  end
49
-
49
+
50
50
  class << self
51
51
  def [](task_name)
52
52
  TASKS[intern(task_name)] or fail "Don't know how to rake #{task_name}"
53
53
  end
54
-
54
+
55
55
  def define_task(args, &block)
56
56
  case args
57
57
  when Hash
@@ -66,18 +66,18 @@ This is the original 100 line prototype rake program.
66
66
  deps = deps.collect {|d| intern(d) }
67
67
  get(task_name).enhance(deps, &block)
68
68
  end
69
-
69
+
70
70
  def get(task_name)
71
71
  name = intern(task_name)
72
72
  TASKS[name] ||= self.new(name)
73
73
  end
74
-
74
+
75
75
  def intern(task_name)
76
76
  (Symbol === task_name) ? task_name : task_name.intern
77
77
  end
78
78
  end
79
79
  end
80
-
80
+
81
81
  class FileTask < Task
82
82
  def needed?
83
83
  return true unless File.exist?(name)
@@ -85,25 +85,25 @@ This is the original 100 line prototype rake program.
85
85
  return false if latest_prereq.nil?
86
86
  timestamp < latest_prereq
87
87
  end
88
-
88
+
89
89
  def timestamp
90
90
  File.new(name.to_s).mtime
91
91
  end
92
92
  end
93
-
93
+
94
94
  def task(args, &block)
95
95
  Task.define_task(args, &block)
96
96
  end
97
-
97
+
98
98
  def file(args, &block)
99
99
  FileTask.define_task(args, &block)
100
100
  end
101
-
101
+
102
102
  def sys(cmd)
103
103
  puts cmd
104
104
  system(cmd) or fail "Command Failed: [#{cmd}]"
105
105
  end
106
-
106
+
107
107
  def rake
108
108
  begin
109
109
  here = Dir.pwd
@@ -119,9 +119,9 @@ This is the original 100 line prototype rake program.
119
119
  rescue Exception => ex
120
120
  puts "rake aborted ... #{ex.message}"
121
121
  puts ex.backtrace.find {|str| str =~ /Rakefile/ } || ""
122
- end
122
+ end
123
123
  end
124
-
124
+
125
125
  if __FILE__ == $0 then
126
126
  rake
127
127
  end
Binary file
@@ -1,4 +1,4 @@
1
- = Rakefile Format (as of version 0.8.3)
1
+ = Rakefile Format (as of version 0.8.7)
2
2
 
3
3
  First of all, there is no special format for a Rakefile. A Rakefile
4
4
  contains executable Ruby code. Anything legal in a ruby script is
@@ -27,7 +27,7 @@ parameter that is the name of the task.
27
27
 
28
28
  === Tasks with Prerequisites
29
29
 
30
- Any prerequisites are given as a list (inclosed in square brackets)
30
+ Any prerequisites are given as a list (enclosed in square brackets)
31
31
  following the name and an arrow (=>).
32
32
 
33
33
  task :name => [:prereq1, :prereq2]
@@ -45,7 +45,7 @@ following ...
45
45
 
46
46
  Actions are defined by passing a block to the +task+ method. Any Ruby
47
47
  code can be placed in the block. The block may reference the task
48
- object via the block paramter..
48
+ object via the block parameter.
49
49
 
50
50
  task :name => [:prereq1, :prereq2] do |t|
51
51
  # actions (may reference t)
@@ -119,14 +119,14 @@ Rake allows parallel execution of prerequisites using the following syntax:
119
119
  end
120
120
 
121
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
122
+ executed whenever all of its prerequisites are done. The big
123
123
  difference is that the prerequisites (+copy_src+, +copy_bin+ and
124
124
  +copy_doc+) are executed in parallel. Each of the prerequisites are
125
125
  run in their own Ruby thread, possibly allowing faster overall runtime.
126
126
 
127
127
  === Secondary Prerequisites
128
128
 
129
- If any of the primary prerequites of a multitask have common secondary
129
+ If any of the primary prerequisites of a multitask have common secondary
130
130
  prerequisites, all of the primary/parallel prerequisites will wait
131
131
  until the common prerequisites have been run.
132
132
 
@@ -183,6 +183,22 @@ argument string should be quoted. Something like this:
183
183
  (Quoting rules vary between operating systems and shells, so make sure
184
184
  you consult the proper docs for your OS/shell).
185
185
 
186
+ === Tasks Arguments and the Environment
187
+
188
+ Task argument values can also be picked up from the environment. For
189
+ example, if the "release" task expected a parameter named
190
+ "release_version", then either
191
+
192
+ rake release[0.8.2]
193
+
194
+ or
195
+
196
+ RELEASE_VERSION rake release
197
+
198
+ will work. Environment variable names must either match the task
199
+ parameter exactly, or match an all-uppercase version of the task
200
+ parameter.
201
+
186
202
  === Tasks that Expect Parameters
187
203
 
188
204
  Parameters are only given to tasks that are setup to expect them. In
@@ -195,10 +211,10 @@ declared as:
195
211
  task :name, [:first_name, :last_name]
196
212
 
197
213
  The first argument is still the name of the task (:name in this case).
198
- The next to argumements are the names of the parameters expected by
214
+ The next two arguments are the names of the parameters expected by
199
215
  :name in an array (:first_name and :last_name in the example).
200
216
 
201
- To access the values of the paramters, the block defining the task
217
+ To access the values of the parameters, the block defining the task
202
218
  behaviour can now accept a second parameter:
203
219
 
204
220
  task :name, [:first_name, :last_name] do |t, args|
@@ -210,7 +226,8 @@ The first argument of the block "t" is always bound to the current
210
226
  task object. The second argument "args" is an open-struct like object
211
227
  that allows access to the task arguments. Extra command line
212
228
  arguments to a task are ignored. Missing command line arguments are
213
- given the nil value.
229
+ picked up from matching environment variables. If there are no
230
+ matching environment variables, they are given the nil value.
214
231
 
215
232
  If you wish to specify default values for the arguments, you can use
216
233
  the with_defaults method in the task body. Here is the above example
@@ -239,11 +256,12 @@ for tasks with arguments. For example:
239
256
  There is an older format for declaring task parameters that omitted
240
257
  the task argument array and used the :needs keyword to introduce the
241
258
  dependencies. That format is still supported for compatibility, but
242
- is not recommended for use.
259
+ is not recommended for use. The older format may be dropped in future
260
+ versions of rake.
243
261
 
244
- == Accessing Task Programatically
262
+ == Accessing Task Programmatically
245
263
 
246
- Sometimes it is useful to manipulate tasks programatically in a
264
+ Sometimes it is useful to manipulate tasks programmatically in a
247
265
  Rakefile. To find a task object, use the <tt>:[]</tt> operator on the
248
266
  <tt>Rake::Task</tt>.
249
267
 
@@ -260,7 +278,7 @@ actions.
260
278
 
261
279
  task :dont do
262
280
  Rake::Task[:doit].clear
263
- end
281
+ end
264
282
 
265
283
  Running this example:
266
284
 
@@ -269,7 +287,7 @@ Running this example:
269
287
  DONE
270
288
  $ rake dont doit
271
289
  (in /Users/jim/working/git/rake/x)
272
- $
290
+ $
273
291
 
274
292
  The ability to programmatically manipulate tasks gives rake very
275
293
  powerful meta-programming capabilities w.r.t. task execution, but
@@ -294,7 +312,7 @@ Rake is able to find a file named "mycode.c", it will automatically
294
312
  create a task that builds "mycode.o" from "mycode.c".
295
313
 
296
314
  If the file "mycode.c" does not exist, rake will attempt
297
- to recursively synthesize a rule for it.
315
+ to recursively synthesize a rule for it.
298
316
 
299
317
  When a task is synthesized from a rule, the +source+ attribute of the
300
318
  task is set to the matching source file. This allows us to write
@@ -312,7 +330,7 @@ The following rule is equivalent to the example above.
312
330
  proc {|task_name| task_name.sub(/\.[^.]+$/, '.c') }
313
331
  ]) do |t|
314
332
  sh "cc #{t.source} -c -o #{t.name}"
315
- end
333
+ end
316
334
 
317
335
  <b>NOTE:</b> Because of a _quirk_ in Ruby syntax, parenthesis are
318
336
  required on *rule* when the first argument is a regular expression.
@@ -322,7 +340,7 @@ The following rule might be used for Java files ...
322
340
  rule '.java' => [
323
341
  proc { |tn| tn.sub(/\.class$/, '.java').sub(/^classes\//, 'src/') }
324
342
  ] do |t|
325
- java_compile(t.source, t.name)
343
+ java_compile(t.source, t.name)
326
344
  end
327
345
 
328
346
  <b>NOTE:</b> +java_compile+ is a hypothetical method that invokes the
@@ -365,18 +383,32 @@ loading.
365
383
 
366
384
  Standard Ruby comments (beginning with "#") can be used anywhere it is
367
385
  legal in Ruby source code, including comments for tasks and rules.
368
- However, if you wish a task to be described using the "-T" switch,
369
- then you need to use the +desc+ command to describe the task.
386
+ A single-line comment immediately before a task (with no blank line
387
+ between it and the task) will be used as that task's description, and
388
+ the task and description will appear in the list displayed
389
+ using the "-T" switch.
390
+
391
+ === Example:
392
+
393
+ # Create a distribution package
394
+ task :package => [ ... ] do ... end
395
+
396
+ You can also use the +desc+ command before a task to set the
397
+ description for the task. In this case, intervening blank lines
398
+ are allowed
370
399
 
371
400
  === Example:
372
401
 
373
- desc "Create a distribution package"
402
+ desc 'Create a distribution package'
403
+
374
404
  task :package => [ ... ] do ... end
375
405
 
406
+ The +desc+ comment takes priority over the comment for of description.
407
+
376
408
  The "-T" switch (or "--tasks" if you like to spell things out) will
377
- display a list of tasks that have a defined comment. If you use
378
- +desc+ to describe your major tasks, you have a semi-automatic way of
379
- generating a summary of your Rake file.
409
+ display a list of tasks that have a description. If you use
410
+ comments or +desc+ to describe your major tasks, you have a
411
+ semi-automatic way of generating a summary of your Rake file.
380
412
 
381
413
  traken$ rake -T
382
414
  (in /home/.../rake)
@@ -403,7 +435,7 @@ common for task names to begin to clash. For example, if you might
403
435
  have a main program and a set of sample programs built by a single
404
436
  Rakefile. By placing the tasks related to the main program in one
405
437
  namespace, and the tasks for building the sample programs in a
406
- different namespace, the task names will not will not interfer with
438
+ different namespace, the task names will not will not interfere with
407
439
  each other.
408
440
 
409
441
  For example:
@@ -429,7 +461,7 @@ Nested namespaces are supported, so
429
461
 
430
462
  Note that the name given in the +task+ command is always the unadorned
431
463
  task name without any namespace prefixes. The +task+ command always
432
- defines a task in the current namespace.
464
+ defines a task in the current namespace.
433
465
 
434
466
  === FileTasks
435
467
 
@@ -499,17 +531,17 @@ Or give it a glob pattern:
499
531
 
500
532
  == Odds and Ends
501
533
 
502
- === do/end verses { }
534
+ === do/end versus { }
503
535
 
504
536
  Blocks may be specified with either a +do+/+end+ pair, or with curly
505
537
  braces in Ruby. We _strongly_ recommend using +do+/+end+ to specify the
506
538
  actions for tasks and rules. Because the rakefile idiom tends to
507
- leave off parenthesis on the task/file/rule methods, unusual
539
+ leave off parentheses on the task/file/rule methods, unusual
508
540
  ambiguities can arise when using curly braces.
509
541
 
510
542
  For example, suppose that the method +object_files+ returns a list of
511
543
  object files in a project. Now we use +object_files+ as the
512
- prerequistes in a rule specified with actions in curly braces.
544
+ prerequisites in a rule specified with actions in curly braces.
513
545
 
514
546
  # DON'T DO THIS!
515
547
  file "prog" => object_files {
@@ -531,4 +563,4 @@ This is the proper way to specify the task ...
531
563
 
532
564
  == See
533
565
 
534
- * README -- Main documentation for Rake.
566
+ * README.rdoc -- Main documentation for Rake.
@@ -38,13 +38,13 @@ too much work. And that was the end of that!
38
38
  ... Except I couldn't get the thought out of my head. What exactly
39
39
  would be needed to make the about syntax work as a make file? Hmmm, you
40
40
  would need to register the tasks, you need some way of specifying
41
- dependencies between tasks, and some way of kicking off the process.
41
+ dependencies between tasks, and some way of kicking off the process.
42
42
  Hey! What if we did ... and fifteen minutes later I had a working
43
43
  prototype of Ruby make, complete with dependencies and actions.
44
44
 
45
45
  I showed the code to my coworker and we had a good laugh. It was just
46
46
  about a page worth of code that reproduced an amazing amount of the
47
- functionality of make. We were both truely stunned with the power of
47
+ functionality of make. We were both truly stunned with the power of
48
48
  Ruby.
49
49
 
50
50
  But it didn't do everything make did. In particular, it didn't have
@@ -53,7 +53,7 @@ prerequisite files have a later timestamp). Obviously THAT would be a
53
53
  pain to add and so Ruby Make would remain an interesting experiment.
54
54
 
55
55
  ... Except as I walked back to my desk, I started thinking about what
56
- file based dependecies would really need. Rats! I was hooked again,
56
+ file based dependencies would really need. Rats! I was hooked again,
57
57
  and by adding a new class and two new methods, file/timestamp
58
58
  dependencies were implemented.
59
59
 
@@ -97,7 +97,7 @@ Here's another task with dependencies ...
97
97
  end
98
98
 
99
99
  Task :clobber depends upon task :clean, so :clean will be run before
100
- :clobber is executed.
100
+ :clobber is executed.
101
101
 
102
102
  Files are specified by using the "file" command. It is similar to the
103
103
  task command, except that the task name represents a file, and the task
@@ -115,7 +115,7 @@ Here is a file based dependency that will compile "hello.cc" to
115
115
 
116
116
  I normally specify file tasks with string (rather than symbols). Some
117
117
  file names can't be represented by symbols. Plus it makes the
118
- distinction between them more clear to the casual reader.
118
+ distinction between them more clear to the casual reader.
119
119
 
120
120
  Currently writing a task for each and every file in the project would be
121
121
  tedious at best. I envision a set of libraries to make this job
@@ -133,7 +133,7 @@ created for rake.
133
133
  That's it. There's no documentation (other than whats in this
134
134
  message). Does this sound interesting to anyone? If so, I'll continue
135
135
  to clean it up and write it up and publish it on RAA. Otherwise, I'll
136
- leave it as an interesting excerise and a tribute to the power of Ruby.
136
+ leave it as an interesting exercise and a tribute to the power of Ruby.
137
137
 
138
138
  Why /might/ rake be interesting to Ruby programmers. I don't know,
139
139
  perhaps ...