rake 0.7.3 → 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.
Files changed (66) hide show
  1. data/CHANGES +126 -1
  2. data/README +86 -132
  3. data/Rakefile +111 -64
  4. data/TODO +1 -0
  5. data/bin/rake +24 -0
  6. data/doc/command_line_usage.rdoc +102 -0
  7. data/doc/rakefile.rdoc +126 -3
  8. data/doc/release_notes/rake-0.7.3.rdoc +0 -0
  9. data/doc/release_notes/rake-0.8.0.rdoc +114 -0
  10. data/doc/release_notes/rake-0.8.2.rdoc +165 -0
  11. data/doc/release_notes/rake-0.8.3.rdoc +112 -0
  12. data/doc/release_notes/rake-0.8.4.rdoc +147 -0
  13. data/doc/release_notes/rake-0.8.5.rdoc +53 -0
  14. data/doc/release_notes/rake-0.8.6.rdoc +55 -0
  15. data/doc/release_notes/rake-0.8.7.rdoc +55 -0
  16. data/lib/rake/alt_system.rb +108 -0
  17. data/lib/rake/contrib/ftptools.rb +24 -10
  18. data/lib/rake/contrib/publisher.rb +1 -1
  19. data/lib/rake/contrib/sys.rb +5 -2
  20. data/lib/rake/gempackagetask.rb +2 -6
  21. data/lib/rake/loaders/makefile.rb +17 -15
  22. data/lib/rake/rdoctask.rb +83 -21
  23. data/lib/rake/ruby182_test_unit_fix.rb +0 -0
  24. data/lib/rake/tasklib.rb +8 -3
  25. data/lib/rake/testtask.rb +1 -1
  26. data/lib/rake/win32.rb +55 -0
  27. data/lib/rake.rb +861 -386
  28. data/test/check_expansion.rb +5 -0
  29. data/test/check_no_expansion.rb +5 -0
  30. data/test/data/file_creation_task/Rakefile +4 -1
  31. data/test/data/multidesc/Rakefile +3 -0
  32. data/test/data/sample.mf +6 -1
  33. data/test/data/statusreturn/Rakefile +8 -0
  34. data/test/filecreation.rb +0 -2
  35. data/test/functional.rb +3 -1
  36. data/test/in_environment.rb +30 -0
  37. data/test/rake_test_setup.rb +24 -0
  38. data/test/session_functional.rb +145 -24
  39. data/test/shellcommand.rb +0 -0
  40. data/test/test_application.rb +345 -95
  41. data/test/test_definitions.rb +4 -1
  42. data/test/test_earlytime.rb +2 -2
  43. data/test/test_extension.rb +63 -0
  44. data/test/test_file_task.rb +20 -16
  45. data/test/test_filelist.rb +59 -10
  46. data/test/test_fileutils.rb +59 -38
  47. data/test/test_ftp.rb +5 -1
  48. data/test/test_invocation_chain.rb +81 -0
  49. data/test/test_makefile_loader.rb +5 -2
  50. data/test/test_namespace.rb +37 -14
  51. data/test/test_package_task.rb +3 -15
  52. data/test/test_pathmap.rb +24 -2
  53. data/test/test_pseudo_status.rb +26 -0
  54. data/test/test_rake.rb +9 -2
  55. data/test/test_rdoc_task.rb +88 -0
  56. data/test/test_require.rb +3 -1
  57. data/test/test_rules.rb +56 -12
  58. data/test/test_task_arguments.rb +89 -0
  59. data/test/test_task_manager.rb +27 -2
  60. data/test/test_tasklib.rb +12 -0
  61. data/test/test_tasks.rb +248 -20
  62. data/test/test_test_task.rb +3 -2
  63. data/test/test_top_level_functions.rb +10 -3
  64. data/test/test_win32.rb +72 -0
  65. metadata +105 -69
  66. /data/test/contrib/{testsys.rb → test_sys.rb} +0 -0
data/CHANGES CHANGED
@@ -1,6 +1,131 @@
1
+
1
2
  = Rake Changelog
2
3
 
3
- == Pre-version 0.7.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
116
+
117
+ * Added task parameters (e.g. "rake build[version7]")
118
+ * Made task parameters passable to prerequisites.
119
+ * Comments are limited to 80 columns or so (suggested by Jamis Buck).
120
+ * Added -D to display full comments (suggested by Jamis Buck).
121
+ * The rake program will set the status value used in any explicit
122
+ exit(n) calls. (patch provided by Stephen Touset)
123
+ * Fixed error in functional tests that were not including session (and
124
+ silently skipping the functionl tests.
125
+ * Removed --usage and make -h the same as -H.
126
+ * Make a prettier inspect for tasks.
127
+
128
+ == Version 0.7.3
4
129
 
5
130
  * Added existing and existing! methods to FileList
6
131
  * FileLists now claim to be Arrays (via is_a?) to get better support
data/README CHANGED
@@ -1,6 +1,6 @@
1
1
  = RAKE -- Ruby Make
2
2
 
3
- Supporting Rake version: 0.7.x
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 sythesize implicit tasks.
16
+ * Rake supports rule patterns to synthesize implicit tasks.
17
17
 
18
- * Flexible FileLists that act like arrays but know about manipulating
19
- file names and paths.
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
- The latest version of rake can be found at
27
+ == Installation
27
28
 
28
- * http://rubyforge.org/project/showfiles.php?group_id=50
29
+ === Gem Installation
29
30
 
30
- == Installation
31
+ Download and install rake with the following.
32
+
33
+ gem install rake
31
34
 
32
35
  === Normal Installation
33
36
 
34
- You can install rake with the following command.
37
+ You can download the source tarball of the latest version of Rake from
35
38
 
36
- % ruby install.rb
39
+ * http://rubyforge.org/project/showfiles.php?group_id=50
37
40
 
38
- from its distribution directory.
41
+ Extract the tarball and run
39
42
 
40
- === GEM Installation
43
+ % ruby install.rb
41
44
 
42
- Download and install rake with the following.
45
+ from its distribution directory.
43
46
 
44
- gem install --remote rake
47
+ == Usage
45
48
 
46
- === Running the Rake Test Suite
49
+ === Simple Example
47
50
 
48
- If you wish to run the unit and functional tests that come with Rake:
51
+ First, you must write a "Rakefile" file which contains the build rules. Here's
52
+ a simple example:
49
53
 
50
- * CD into the top project directory of rake.
51
- * Type one of the following:
54
+ task :default => [:test]
55
+
56
+ task :test do
57
+ ruby "test/unittest.rb"
58
+ end
52
59
 
53
- rake # If you have a version of rake installed
54
- ruby -Ilib bin/rake # If you do not have a version of rake installed.
60
+ This Rakefile has two tasks:
55
61
 
56
- == Online Resources
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
- == Rake References
68
+ Running the "rake" command without any options will cause it to run the
69
+ "default" task in the Rakefile:
59
70
 
60
- * Rake Documentation Home: http://docs.rubyrake.org
61
- * Rake Project Page: http://rubyforge.org/projects/rake
62
- * Rake API Documents: http://rake.rubyforge.org
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
- == Presentations and Articles about Rake
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
- === Road Map
81
+ === More Information
70
82
 
71
- * If you want to see how to invoke rake to build your projects, read on.
72
- * If you want to see the format of a Rakefile, see
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
- * If you want to see the original announcement of rake, see
87
+ * For the original announcement of Rake, see
75
88
  doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html].
76
- * If you want to see a glossary of terms, see
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
- Once installed, you can run rake as follows ...
93
+ == Development
82
94
 
83
- % rake [options ...] [VAR=VALUE ...] [tasks...]
95
+ === Source Repository
84
96
 
85
- Type "rake --help" for an up-to-date option summary.
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
- Invoking <tt>rake</tt> without any options or targets causes rake to
88
- look for a rakefile and invoke the default task in that rakefile.
100
+ * git://github.com/jimweirich/rake.git
89
101
 
90
- For example, given a simple rakefile like this ...
102
+ === Running the Rake Test Suite
91
103
 
92
- task :default => [:test]
104
+ If you wish to run the unit and functional tests that come with Rake:
93
105
 
94
- task :test do
95
- ruby "test/unittest.rb"
96
- end
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
- The command
113
+ === Issues and Bug Reports
99
114
 
100
- $ rake
115
+ Bugs, features requests and other issues can be logged at
101
116
 
102
- will invoke the +default+ task. As +default+ satisfies its
103
- prerequisites, the +test+ task will run the unit tests for the
104
- package.
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
- mailto:jim@weirichhouse.org.
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@weirichhouse.org>
185
+ Author:: Jim Weirich <jim.weirich@gmail.com>
232
186
  Requires:: Ruby 1.8.0 or later
233
- License:: Copyright 2003, 2004 by Jim Weirich.
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