rake 0.9.2.2 → 0.9.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.
Files changed (50) hide show
  1. data/CHANGES +4 -0
  2. data/README.rdoc +10 -8
  3. data/Rakefile +6 -1
  4. data/TODO +1 -0
  5. data/bin/rake +4 -0
  6. data/doc/command_line_usage.rdoc +61 -12
  7. data/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  8. data/doc/release_notes/rake-0.9.3.rdoc +102 -0
  9. data/install.rb +1 -1
  10. data/lib/rake/application.rb +244 -140
  11. data/lib/rake/backtrace.rb +18 -0
  12. data/lib/rake/clean.rb +1 -1
  13. data/lib/rake/cloneable.rb +7 -16
  14. data/lib/rake/contrib/ftptools.rb +2 -1
  15. data/lib/rake/contrib/sys.rb +6 -6
  16. data/lib/rake/dsl_definition.rb +13 -7
  17. data/lib/rake/ext/module.rb +1 -1
  18. data/lib/rake/ext/string.rb +2 -1
  19. data/lib/rake/ext/time.rb +2 -1
  20. data/lib/rake/file_list.rb +2 -2
  21. data/lib/rake/file_utils_ext.rb +4 -3
  22. data/lib/rake/multi_task.rb +2 -5
  23. data/lib/rake/phony.rb +13 -0
  24. data/lib/rake/private_reader.rb +20 -0
  25. data/lib/rake/promise.rb +99 -0
  26. data/lib/rake/rake_module.rb +15 -0
  27. data/lib/rake/rdoctask.rb +1 -1
  28. data/lib/rake/runtest.rb +1 -1
  29. data/lib/rake/task.rb +29 -7
  30. data/lib/rake/task_arguments.rb +1 -1
  31. data/lib/rake/task_manager.rb +1 -1
  32. data/lib/rake/testtask.rb +5 -1
  33. data/lib/rake/thread_history_display.rb +48 -0
  34. data/lib/rake/thread_pool.rb +155 -0
  35. data/lib/rake/version.rb +6 -4
  36. data/lib/rake.rb +1 -0
  37. data/test/helper.rb +30 -0
  38. data/test/test_private_reader.rb +42 -0
  39. data/test/test_rake_application.rb +12 -1
  40. data/test/test_rake_application_options.rb +114 -4
  41. data/test/test_rake_backtrace.rb +81 -0
  42. data/test/test_rake_directory_task.rb +16 -5
  43. data/test/test_rake_file_task.rb +21 -1
  44. data/test/test_rake_functional.rb +22 -0
  45. data/test/test_rake_multi_task.rb +8 -0
  46. data/test/test_rake_reduce_compat.rb +65 -0
  47. data/test/test_rake_task.rb +50 -1
  48. data/test/test_rake_thread_pool.rb +123 -0
  49. data/test/test_thread_history_display.rb +91 -0
  50. metadata +53 -37
data/CHANGES CHANGED
@@ -8,6 +8,10 @@
8
8
  * Rake tests are now directory-independent
9
9
  * Rake tests are no longer require flexmock
10
10
  * Commands constant is no longer polluting top level namespace.
11
+ * Show only the interesting portion of the backtrace by default (James M. Lawrence).
12
+ * Added --reduce-compat optiont to remove backward compatible DSL hacks (James M. Lawrence).
13
+ * lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to
14
+ open files in binary mode. (NAKAMURA Usaku)
11
15
 
12
16
  == Version 0.9.2
13
17
 
data/README.rdoc CHANGED
@@ -80,13 +80,13 @@ Type "rake --help" for all available options.
80
80
  === More Information
81
81
 
82
82
  * For details on Rake's command-line invocation, read
83
- doc/command_line_usage.rdoc[http://rake.rubyforge.org/files/doc/command_line_usage_rdoc.html]
83
+ doc/command_line_usage.rdoc[https://github.com/jimweirich/rake/blob/master/doc/command_line_usage.rdoc]
84
84
  * For details on writing Rakefiles, see
85
- doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html].
85
+ doc/rakefile.rdoc[https://github.com/jimweirich/rake/blob/master/doc/rakefile.rdoc].
86
86
  * For the original announcement of Rake, see
87
- doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html].
87
+ doc/rational.rdoc[https://github.com/jimweirich/rake/blob/master/doc/rational.rdoc].
88
88
  * For a glossary of terms, see
89
- doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html].
89
+ doc/glossary.rdoc[https://github.com/jimweirich/rake/blob/master/doc/glossary.rdoc].
90
90
 
91
91
  == Development
92
92
 
@@ -128,8 +128,8 @@ Issues and bug reports can also be tracked here:
128
128
  * Rake API Documents: http://rake.rubyforge.org
129
129
  * Rake Source Code Repo: http://github.com/jimweirich/rake
130
130
  * Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git
131
- * Rake Issue Tracking: http://www.pivotaltracker.com/projects/28469
132
131
  * Rake Bug Reports: https://github.com/jimweirich/rake/issues
132
+ * Rake Continuous Build Server: https://travis-ci.org/#!/jimweirich/rake
133
133
 
134
134
  === Presentations and Articles about Rake
135
135
 
@@ -160,6 +160,8 @@ other projects with similar (and not so similar) goals.
160
160
 
161
161
  [<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.
162
162
 
163
+ [<b>Eric Hodel</b>] For aid in maintaining rake.
164
+
163
165
  == License
164
166
 
165
167
  Rake is available under an MIT-style license.
@@ -185,9 +187,9 @@ jim dot weirich at gmail.com.
185
187
 
186
188
  Author:: Jim Weirich <jim.weirich@gmail.com>
187
189
  Requires:: Ruby 1.8.6 or later
188
- License:: Copyright 2003-2008 by Jim Weirich.
189
- Released under an MIT-style license. See the LICENSE file
190
- included in the distribution.
190
+ License:: Copyright 2003-2011 by Jim Weirich.
191
+ Released under an MIT-style license. See the MIT-LICENSE
192
+ file included in the distribution.
191
193
 
192
194
  == Warranty
193
195
 
data/Rakefile CHANGED
@@ -60,6 +60,7 @@ task :default => :test
60
60
 
61
61
  Rake::TestTask.new do |t|
62
62
  files = FileList['test/helper.rb', 'test/test_*.rb']
63
+ t.loader = :testrb
63
64
  t.test_files = files
64
65
  t.libs << "."
65
66
  t.warning = true
@@ -141,7 +142,11 @@ end
141
142
  PKG_FILES = FileList[
142
143
  '.gemtest',
143
144
  'install.rb',
144
- '[A-Z]*',
145
+ 'CHANGES',
146
+ 'MIT-LICENSE',
147
+ 'README.rdoc',
148
+ 'Rakefile',
149
+ 'TODO',
145
150
  'bin/rake',
146
151
  'lib/**/*.rb',
147
152
  'test/**/*.rb',
data/TODO CHANGED
@@ -17,4 +17,5 @@ the rake-devel@rubyforge.org mailing list.
17
17
  * Trap "ln -s" commands that fail and use "cp" instead (SMB mounted
18
18
  drives have problems with "ln -s".
19
19
 
20
+
20
21
  (moved DONE list to CHANGES file)
data/bin/rake CHANGED
@@ -28,6 +28,10 @@ begin
28
28
  rescue LoadError
29
29
  end
30
30
 
31
+ module Rake
32
+ REDUCE_COMPAT = true if ARGV.include?("--reduce-compat")
33
+ end
34
+
31
35
  require 'rake'
32
36
 
33
37
  Rake.application.run
@@ -11,6 +11,16 @@ Options are:
11
11
  during the execution of the <b>rake</b> command. You can access
12
12
  the value by using ENV['<em>name</em>'].
13
13
 
14
+ [<tt>--all</tt> (-A)]
15
+ Used in combination with the -T and -D options, will force
16
+ those options to show all the tasks, even the ones without comments.
17
+
18
+ [<tt>--backtrace</tt> _output_ (-n)]
19
+ Enable a full backtrace (i.e. like --trace, but without the task
20
+ tracing details). The backtrace output will be directed to stderr
21
+ by default. If the options _output_ parameter is set to "stdout",
22
+ then the output will be directed to standard output.
23
+
14
24
  [<tt>--classic-namespace</tt> (-n)]
15
25
  Import the Task, FileTask, and FileCreateTask into the top-level
16
26
  scope to be compatible with older versions of Rake. Alternatively
@@ -18,6 +28,11 @@ Options are:
18
28
  'rake/classic_namespace'</code> in your Rakefile to get the
19
29
  classic behavior.
20
30
 
31
+ [<tt>--comments</tt>]
32
+ Used in combination with the -W options to force the output to
33
+ contain commented options only. This is the reverse of
34
+ <tt>--all</tt>.
35
+
21
36
  [<tt>--describe</tt> _pattern_ (-D)]
22
37
  Describe the tasks (matching optional PATTERN), then exit.
23
38
 
@@ -31,15 +46,40 @@ Options are:
31
46
  [<tt>--execute-print</tt> _code_ (-p)]
32
47
  Execute some Ruby code, print the result, and exit.
33
48
 
34
- [<tt>--execute-continue</tt> _code_ (-p)]
49
+ [<tt>--execute-continue</tt> _code_ (-E)]
35
50
  Execute some Ruby code, then continue with normal task processing.
36
51
 
37
52
  [<tt>--help</tt> (-H)]
38
53
  Display some help text and exit.
39
54
 
55
+ [<tt>--jobs</tt> _number_ (-j)]
56
+ Specifies the number of active concurrent tasks used. The
57
+ suggested value is equal to the number of CPUs. The concurrent
58
+ tasks are used to execute the <tt>multitask</tt> prerequisites.
59
+ Also see the <tt>-m</tt> option which turns all tasks into
60
+ multitasks.
61
+
62
+ Sample values:
63
+ (no -j) : unlimited concurrent tasks (standard rake behavior)
64
+ -j : 2 concurrent tasks (exact number may change)
65
+ -j 16 : 16 concurrent tasks
66
+
67
+ [<tt>--job-stats</tt> _level_]
68
+
69
+ Display job statistics at the completion of the run. By default,
70
+ this will display the requested number of active tasks (from the
71
+ -j options) and the maximum number of tasks in play at any given
72
+ time.
73
+
74
+ If the optional _level_ is <tt>history</tt>, then a complete trace
75
+ of task history will be displayed on standard output.
76
+
40
77
  [<tt>--libdir</tt> _directory_ (-I)]
41
78
  Add _directory_ to the list of directories searched for require.
42
79
 
80
+ [<tt>--multitask</tt> (-m)]
81
+ Treat all tasks as multitasks. ('make/drake' semantics)
82
+
43
83
  [<tt>--nosearch</tt> (-N)]
44
84
  Do not search for a Rakefile in parent directories.
45
85
 
@@ -60,6 +100,16 @@ Options are:
60
100
  [<tt>--rakelibdir</tt> _rakelibdir_ (-R)]
61
101
  Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
62
102
 
103
+ [<tt>--reduce-compat</tt>]
104
+
105
+ Remove the DSL commands from the Object inheritance hierarchy and
106
+ do not define top level constants. This reduces the backwards
107
+ compatibility of Rake, but allows rake to be used with software
108
+ that would otherwise have conflicting definitions.
109
+
110
+ *NOTE:* The next major version of Rake will only be able to be run
111
+ in "reduce-compat" mode.
112
+
63
113
  [<tt>--require</tt> _name_ (-r)]
64
114
  Require _name_ before executing the Rakefile.
65
115
 
@@ -69,6 +119,11 @@ Options are:
69
119
  [<tt>--silent (-s)</tt>]
70
120
  Like --quiet, but also suppresses the 'in directory' announcement.
71
121
 
122
+ [<tt>--suppress-backtrace _pattern_ </tt>]
123
+ Line matching the regular expression _pattern_ will be removed
124
+ from the backtrace output. Note that the --backtrace option is the
125
+ full backtrace without these lines suppressed.
126
+
72
127
  [<tt>--system</tt> (-g)]
73
128
  Use the system wide (global) rakefiles. The project Rakefile is
74
129
  ignored. By default, the system wide rakefiles are used only if no
@@ -85,16 +140,6 @@ Options are:
85
140
  are defined using the "desc" command. If a pattern is given, then
86
141
  only tasks matching the pattern are displayed.
87
142
 
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.
97
-
98
143
  [<tt>--trace</tt> (-t)]
99
144
  Turn on invoke/execute tracing. Also enable full backtrace on
100
145
  errors.
@@ -107,7 +152,11 @@ Options are:
107
152
 
108
153
  [<tt>--where</tt> <em>pattern</em> (-W)]
109
154
  Display tasks that match <em>pattern</em> and the file and line
110
- number where the task is defined.
155
+ number where the task is defined. By default this option will
156
+ display all tasks, not just the tasks that have descriptions.
157
+
158
+ [<tt>--no-deprecation-warnings</tt> (-W)]
159
+ Do not display the deprecation warnings.
111
160
 
112
161
  In addition, any command line option of the form
113
162
  <em>VAR</em>=<em>VALUE</em> will be added to the environment hash
@@ -0,0 +1,55 @@
1
+ = Rake 0.9.3 Released
2
+
3
+ Rake version 0.9.3 is mainly bug fixes.
4
+
5
+ == Changes
6
+
7
+ * The rake test loader now removes arguments it has processed. Issue #51
8
+ * Rake::TaskArguments now responds to #values_at
9
+ * RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7
10
+ * Rake tests are now directory-independent
11
+ * Rake tests are no longer require flexmock
12
+ * Commands constant is no longer polluting top level namespace.
13
+ * Show only the interesting portion of the backtrace by default (James M. Lawrence).
14
+ * Added --reduce-compat option to remove backward compatible DSL hacks (James M. Lawrence).
15
+
16
+ == What is Rake
17
+
18
+ Rake is a build tool similar to the make program in many ways. But
19
+ instead of cryptic make recipes, Rake uses standard Ruby code to
20
+ declare tasks and dependencies. You have the full power of a modern
21
+ scripting language built right into your build tool.
22
+
23
+ == Availability
24
+
25
+ The easiest way to get and install rake is via RubyGems ...
26
+
27
+ gem install rake (you may need root/admin privileges)
28
+
29
+ Otherwise, you can get it from the more traditional places:
30
+
31
+ Home Page:: http://rake.rubyforge.org/
32
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
33
+ GitHub:: git://github.com/jimweirich/rake.git
34
+
35
+ == Thanks
36
+
37
+ As usual, it was input from users that drove a alot of these changes. The
38
+ following people either contributed patches, made suggestions or made
39
+ otherwise helpful comments. Thanks to ...
40
+
41
+ * James M. Lawrence (quix)
42
+ * Roger Pack
43
+ * Cezary Baginski
44
+ * Sean Scot August Moon
45
+ * R.T. Lechow
46
+ * Alex Chaffee
47
+ * James Tucker
48
+ * Matthias Lüdtke
49
+ * Santiago Pastorino
50
+
51
+ Also, bit thanks to Eric Hodel for assisting with getting this release
52
+ out the door (where "assisting" includes, but is not by any means
53
+ limited to, "pushing" me to get it done).
54
+
55
+ -- Jim Weirich
@@ -0,0 +1,102 @@
1
+ = Rake 0.9.3 Released
2
+
3
+ Rake version 0.9.3 contains some new, backwards compatible features and
4
+ a number of bug fixes.
5
+
6
+ == Changes
7
+
8
+ === New Features
9
+
10
+ * Multitask tasks now use a thread pool. Use -j to limit the number of
11
+ available threads.
12
+
13
+ * Use -m to turn regular tasks into multitasks (use at your own risk).
14
+
15
+ * You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
16
+ programatically add rake task libraries.
17
+
18
+ * You can specific backtrace suppression patterns (see
19
+ --supress-backtrace)
20
+
21
+ * Directory tasks can now take prerequisites and actions
22
+
23
+ * Use --backtrace to request a full backtrace without the task trace.
24
+
25
+ * You can say "--backtrace=stdout" and "--trace=stdout" to route trace
26
+ output to standard output rather than standard error.
27
+
28
+ * Optional 'phony' target (enable with 'require 'rake/phony'") for
29
+ special purpose builds.
30
+
31
+ * Task#clear now clears task comments as well as actions and
32
+ prerequisites. Task#clear_comment will specifically target comments.
33
+
34
+ * The --all option will force -T and -D to consider all the tasks,
35
+ with and without descriptions.
36
+
37
+ === Bug Fixes
38
+
39
+ * Semi-colons in windows rakefile paths now work.
40
+
41
+ * Improved Control-C support when invoking multiple test suites.
42
+
43
+ * egrep method now reads files in text mode (better support for
44
+ Windows)
45
+
46
+ * Better deprecation line number reporting.
47
+
48
+ * The -W option now works with all tasks, whether they have a
49
+ description or not.
50
+
51
+ * File globs in rake should not be sorted alphabetically, independent
52
+ of file system and platform.
53
+
54
+ * Numerous internal improvements.
55
+
56
+ * Documentation typos and fixes.
57
+
58
+ == What is Rake
59
+
60
+ Rake is a build tool similar to the make program in many ways. But
61
+ instead of cryptic make recipes, Rake uses standard Ruby code to
62
+ declare tasks and dependencies. You have the full power of a modern
63
+ scripting language built right into your build tool.
64
+
65
+ == Availability
66
+
67
+ The easiest way to get and install rake is via RubyGems ...
68
+
69
+ gem install rake (you may need root/admin privileges)
70
+
71
+ Otherwise, you can get it from the more traditional places:
72
+
73
+ Home Page:: http://github.com/jimweirich/rake
74
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
75
+ GitHub:: git://github.com/jimweirich/rake.git
76
+
77
+ == Thanks
78
+
79
+ As usual, it was input from users that drove a alot of these changes. The
80
+ following people either contributed patches, made suggestions or made
81
+ otherwise helpful comments. Thanks to ...
82
+
83
+ * Aaron Patterson
84
+ * Dylan Smith
85
+ * Jo Liss
86
+ * Jonas Pfenniger
87
+ * Kazuki Tsujimoto
88
+ * Michael Bishop
89
+ * Michael Elufimov
90
+ * NAKAMURA Usaku
91
+ * Ryan Davis
92
+ * Sam Grönblom
93
+ * Sam Phippen
94
+ * Sergio Wong
95
+ * Tay Ray Chuan
96
+ * grosser
97
+ * quix
98
+
99
+ Also, many thanks to Eric Hodel for assisting with getting this release
100
+ out the door.
101
+
102
+ -- Jim Weirich
data/install.rb CHANGED
@@ -73,7 +73,7 @@ File.chmod(0755, rake_dest)
73
73
 
74
74
  # The library files
75
75
 
76
- files = Dir.chdir('lib') { Dir['**/*.rb'] }
76
+ files = Dir.chdir('lib') { Dir['**/*.rb'].sort }
77
77
 
78
78
  for fn in files
79
79
  fn_dir = File.dirname(fn)