rake 10.0.0 → 10.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rake might be problematic. Click here for more details.

@@ -31,18 +31,6 @@ Download and install rake with the following.
31
31
 
32
32
  gem install rake
33
33
 
34
- === Normal Installation
35
-
36
- You can download the source tarball of the latest version of Rake from
37
-
38
- * http://rubyforge.org/project/showfiles.php?group_id=50
39
-
40
- Extract the tarball and run
41
-
42
- % ruby install.rb
43
-
44
- from its distribution directory.
45
-
46
34
  == Usage
47
35
 
48
36
  === Simple Example
@@ -0,0 +1,110 @@
1
+ = Rake 0.9.4 Released
2
+
3
+ Rake version 0.9.4 contains a number of bug fixes.
4
+
5
+ == Changes
6
+
7
+ === New Features (in 0.9.3)
8
+
9
+ * Multitask tasks now use a thread pool. Use -j to limit the number of
10
+ available threads.
11
+
12
+ * Use -m to turn regular tasks into multitasks (use at your own risk).
13
+
14
+ * You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
15
+ programatically add rake task libraries.
16
+
17
+ * You can specific backtrace suppression patterns (see
18
+ --supress-backtrace)
19
+
20
+ * Directory tasks can now take prerequisites and actions
21
+
22
+ * Use --backtrace to request a full backtrace without the task trace.
23
+
24
+ * You can say "--backtrace=stdout" and "--trace=stdout" to route trace
25
+ output to standard output rather than standard error.
26
+
27
+ * Optional 'phony' target (enable with 'require 'rake/phony'") for
28
+ special purpose builds.
29
+
30
+ * Task#clear now clears task comments as well as actions and
31
+ prerequisites. Task#clear_comment will specifically target comments.
32
+
33
+ * The --all option will force -T and -D to consider all the tasks,
34
+ with and without descriptions.
35
+
36
+ === Bug Fixes (0.9.3)
37
+
38
+ * Semi-colons in windows rakefile paths now work.
39
+
40
+ * Improved Control-C support when invoking multiple test suites.
41
+
42
+ * egrep method now reads files in text mode (better support for
43
+ Windows)
44
+
45
+ * Better deprecation line number reporting.
46
+
47
+ * The -W option now works with all tasks, whether they have a
48
+ description or not.
49
+
50
+ * File globs in rake should not be sorted alphabetically, independent
51
+ of file system and platform.
52
+
53
+ * Numerous internal improvements.
54
+
55
+ * Documentation typos and fixes.
56
+
57
+ === Bug Fixes (0.9.4)
58
+
59
+ * Exit status with failing tests is not correctly set to non-zero.
60
+
61
+ * Simplified syntax for phony task (for older versions of RDoc).
62
+
63
+ * Stand alone FileList usage gets glob function (without loading in
64
+ extra dependencies)
65
+
66
+ == What is Rake
67
+
68
+ Rake is a build tool similar to the make program in many ways. But
69
+ instead of cryptic make recipes, Rake uses standard Ruby code to
70
+ declare tasks and dependencies. You have the full power of a modern
71
+ scripting language built right into your build tool.
72
+
73
+ == Availability
74
+
75
+ The easiest way to get and install rake is via RubyGems ...
76
+
77
+ gem install rake (you may need root/admin privileges)
78
+
79
+ Otherwise, you can get it from the more traditional places:
80
+
81
+ Home Page:: http://github.com/jimweirich/rake
82
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
83
+ GitHub:: git://github.com/jimweirich/rake.git
84
+
85
+ == Thanks
86
+
87
+ As usual, it was input from users that drove a alot of these changes. The
88
+ following people either contributed patches, made suggestions or made
89
+ otherwise helpful comments. Thanks to ...
90
+
91
+ * Aaron Patterson
92
+ * Dylan Smith
93
+ * Jo Liss
94
+ * Jonas Pfenniger
95
+ * Kazuki Tsujimoto
96
+ * Michael Bishop
97
+ * Michael Elufimov
98
+ * NAKAMURA Usaku
99
+ * Ryan Davis
100
+ * Sam Grönblom
101
+ * Sam Phippen
102
+ * Sergio Wong
103
+ * Tay Ray Chuan
104
+ * grosser
105
+ * quix
106
+
107
+ Also, many thanks to Eric Hodel for assisting with getting this release
108
+ out the door.
109
+
110
+ -- Jim Weirich
@@ -0,0 +1,187 @@
1
+ = Rake 10.0.1 Released
2
+
3
+ "Jim, when will Rake reach version 1.0?"
4
+
5
+ Over the past several years I've been asked that question at
6
+ conferences, panels and over twitter. Due to historical reasons (or
7
+ maybe just plain laziness) Rake has (incorrectly) been treating the
8
+ second digit of the version as the major release number. So in my head
9
+ Rake was already at version 9.
10
+
11
+ Well, it's time to fix things. This next version of Rake drops old,
12
+ crufty, backwards compatibility hacks such as top level constants, DSL
13
+ methods defined in Object and numerous other features that are just no
14
+ longer desired. It's also time to drop the leading zero from the
15
+ version number as well and call this new version of rake what it
16
+ really is: Version 10.
17
+
18
+ So, welcome to Rake 10.0!
19
+
20
+ Rake 10 is actually feature identical to the latest version of Rake 9
21
+ (that would be the version spelled 0.9.3), *except* that Rake 10 drops
22
+ all the sundry deprecated features that have accumulated over the years.
23
+
24
+ If your Rakefile is up to date and current with all the new features
25
+ of Rake 10, you are ready to go. If your Rakefile still uses a few
26
+ deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same
27
+ feature set. Just be aware that future features will be in Rake 10
28
+ family line.
29
+
30
+ == Changes in 10.0
31
+
32
+ As mentioned above, there are no new features in Rake 10. However,
33
+ there are a number of features missing:
34
+
35
+ * Classic namespaces are now gone. Rake is no longer able to reflect
36
+ the options settings in the global variables ($rakefile, $show_tasks,
37
+ $show_prereqs, $trace, $dryrun and $silent). The
38
+ <tt>--classic-namespace</tt> option is no longer supported.
39
+
40
+ * Global constants are no longer supported. This includes
41
+ <tt>Task</tt>, <tt>FileTask</tt>, <tt>FileCreationTask</tt> and
42
+ <tt>RakeApp</tt>). The constant missing hook to warn about using
43
+ global rake constants has been removed.
44
+
45
+ * The Rake DSL methods (task, file, directory, etc) are in their own
46
+ module (Rake::DSL). The stub versions of these methods (that printed
47
+ warnings) in Object have been removed. However, the DSL methods are
48
+ added to the top-level <tt>main</tt> object. Since <tt>main</tt> is
49
+ not in the inheritance tree, the presence of the DSL methods in main
50
+ should be low impact on other libraries.
51
+
52
+ If you want to use the Rake DSL commands from your own code, just
53
+ include <tt>Rake::DSL</tt> into your own classes and modules.
54
+
55
+ * The deprecated syntax for task arguments (the one using
56
+ <tt>:needs</tt>) has been removed.
57
+
58
+ * The <tt>--reduce-compat</tt> flag has been removed (it's not needed
59
+ anymore).
60
+
61
+ * The deprecated <tt>rake/sys.rb</tt> library has been removed.
62
+
63
+ * The deprecated <tt>rake/rdoctask.rb</tt> library has been removed.
64
+ RDoc supplies its own rake task now.
65
+
66
+ * The deprecated <tt>rake/gempackagetask.rb</tt> library has been
67
+ removed. Gem supplies its own package task now.
68
+
69
+ There is one small behavioral change:
70
+
71
+ * Non-file tasks now always report the current time as their time
72
+ stamp. This is different from the previous behavior where non-file
73
+ tasks reported current time only if there were no prerequisites, and
74
+ the max prerequisite timestamp otherwise. This lead to inconsistent
75
+ and surprising behavior when adding prerequisites to tasks that in
76
+ turn were prequisites to file tasks. The new behavior is more
77
+ consistent and predictable.
78
+
79
+ == Changes (from 0.9.3 & 0.9.4)
80
+
81
+ Since Rake 10 includes the changes from the last version of Rake 9,
82
+ we'll repeat the changes for version 0.9.3 here.
83
+
84
+ === New Features (in 0.9.3)
85
+
86
+ * Multitask tasks now use a thread pool. Use -j to limit the number of
87
+ available threads.
88
+
89
+ * Use -m to turn regular tasks into multitasks (use at your own risk).
90
+
91
+ * You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
92
+ programatically add rake task libraries.
93
+
94
+ * You can specific backtrace suppression patterns (see
95
+ --supress-backtrace)
96
+
97
+ * Directory tasks can now take prerequisites and actions
98
+
99
+ * Use --backtrace to request a full backtrace without the task trace.
100
+
101
+ * You can say "--backtrace=stdout" and "--trace=stdout" to route trace
102
+ output to standard output rather than standard error.
103
+
104
+ * Optional 'phony' target (enable with 'require 'rake/phony'") for
105
+ special purpose builds.
106
+
107
+ * Task#clear now clears task comments as well as actions and
108
+ prerequisites. Task#clear_comment will specifically target comments.
109
+
110
+ * The --all option will force -T and -D to consider all the tasks,
111
+ with and without descriptions.
112
+
113
+ === Bug Fixes (in 0.9.3)
114
+
115
+ * Semi-colons in windows rakefile paths now work.
116
+
117
+ * Improved Control-C support when invoking multiple test suites.
118
+
119
+ * egrep method now reads files in text mode (better support for
120
+ Windows)
121
+
122
+ * Better deprecation line number reporting.
123
+
124
+ * The -W option now works with all tasks, whether they have a
125
+ description or not.
126
+
127
+ * File globs in rake should not be sorted alphabetically, independent
128
+ of file system and platform.
129
+
130
+ * Numerous internal improvements.
131
+
132
+ * Documentation typos and fixes.
133
+
134
+ === Bug Fixes (in 0.9.4)
135
+
136
+ * Exit status with failing tests is not correctly set to non-zero.
137
+
138
+ * Simplified syntax for phony task (for older versions of RDoc).
139
+
140
+ * Stand alone FileList usage gets glob function (without loading in
141
+ extra dependencies)
142
+
143
+ == What is Rake
144
+
145
+ Rake is a build tool similar to the make program in many ways. But
146
+ instead of cryptic make recipes, Rake uses standard Ruby code to
147
+ declare tasks and dependencies. You have the full power of a modern
148
+ scripting language built right into your build tool.
149
+
150
+ == Availability
151
+
152
+ The easiest way to get and install rake is via RubyGems ...
153
+
154
+ gem install rake (you may need root/admin privileges)
155
+
156
+ Otherwise, you can get it from the more traditional places:
157
+
158
+ Home Page:: http://github.com/jimweirich/rake
159
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
160
+ GitHub:: git://github.com/jimweirich/rake.git
161
+
162
+ == Thanks
163
+
164
+ As usual, it was input from users that drove a lot of these changes. The
165
+ following people contributed patches, made suggestions or made
166
+ otherwise helpful comments. Thanks to ...
167
+
168
+ * Aaron Patterson
169
+ * Dylan Smith
170
+ * Jo Liss
171
+ * Jonas Pfenniger
172
+ * Kazuki Tsujimoto
173
+ * Michael Bishop
174
+ * Michael Elufimov
175
+ * NAKAMURA Usaku
176
+ * Ryan Davis
177
+ * Sam Grönblom
178
+ * Sam Phippen
179
+ * Sergio Wong
180
+ * Tay Ray Chuan
181
+ * grosser
182
+ * quix
183
+
184
+ Also, many thanks to Eric Hodel for assisting with getting this release
185
+ out the door.
186
+
187
+ -- Jim Weirich
@@ -2,6 +2,7 @@ require 'shellwords'
2
2
  require 'optparse'
3
3
 
4
4
  require 'rake/task_manager'
5
+ require 'rake/file_list'
5
6
  require 'rake/thread_pool'
6
7
  require 'rake/thread_history_display'
7
8
  require 'rake/win32'
@@ -205,7 +206,7 @@ module Rake
205
206
  def have_rakefile
206
207
  @rakefiles.each do |fn|
207
208
  if File.exist?(fn)
208
- others = Rake.glob(fn, File::FNM_CASEFOLD)
209
+ others = FileList.glob(fn, File::FNM_CASEFOLD)
209
210
  return others.size == 1 ? others.first : fn
210
211
  elsif fn == ''
211
212
  return fn
@@ -588,7 +589,7 @@ module Rake
588
589
  end
589
590
 
590
591
  def glob(path, &block)
591
- Rake.glob(path.gsub("\\", '/')).each(&block)
592
+ FileList.glob(path.gsub("\\", '/')).each(&block)
592
593
  end
593
594
  private :glob
594
595
 
@@ -5,6 +5,7 @@
5
5
 
6
6
  require 'date'
7
7
  require 'net/ftp'
8
+ require 'rake/file_list'
8
9
 
9
10
  module Rake # :nodoc:
10
11
 
@@ -127,8 +128,7 @@ module Rake # :nodoc:
127
128
  # Upload all files matching +wildcard+ to the uploader's root
128
129
  # path.
129
130
  def upload_files(wildcard)
130
- fail "OUCH"
131
- Rake.glob(wildcard).each do |fn|
131
+ FileList.glob(wildcard).each do |fn|
132
132
  upload(fn)
133
133
  end
134
134
  end
@@ -340,7 +340,7 @@ module Rake
340
340
 
341
341
  # Add matching glob patterns.
342
342
  def add_matching(pattern)
343
- Rake.glob(pattern).each do |fn|
343
+ FileList.glob(pattern).each do |fn|
344
344
  self << fn unless exclude?(fn)
345
345
  end
346
346
  end
@@ -383,6 +383,13 @@ module Rake
383
383
  def [](*args)
384
384
  new(*args)
385
385
  end
386
+
387
+ # Get a sorted list of files matching the pattern. This method
388
+ # should be prefered to Dir[pattern] and Dir.glob[pattern] because
389
+ # the files returned are guaranteed to be sorted.
390
+ def glob(pattern, *args)
391
+ Dir.glob(pattern, *args).sort
392
+ end
386
393
  end
387
394
  end
388
395
  end
@@ -8,6 +8,8 @@ require 'rake'
8
8
 
9
9
  task :phony
10
10
 
11
- def (Rake::Task[:phony]).timestamp
12
- Time.at 0
11
+ Rake::Task[:phony].tap do |task|
12
+ def task.timestamp # :nodoc:
13
+ Time.at 0
14
+ end
13
15
  end
@@ -32,13 +32,6 @@ module Rake
32
32
  application.options.rakelib << file
33
33
  end
34
34
  end
35
-
36
- # Get a sorted list of files matching the pattern. This method
37
- # should be prefered to Dir[pattern] and Dir.glob[pattern] because
38
- # the files returned are guaranteed to be sorted.
39
- def glob(pattern, *args)
40
- Dir.glob(pattern, *args).sort
41
- end
42
35
  end
43
36
 
44
37
  end
@@ -1,11 +1,12 @@
1
1
  require 'test/unit'
2
2
  require 'test/unit/assertions'
3
+ require 'rake/file_list'
3
4
 
4
5
  module Rake
5
6
  include Test::Unit::Assertions
6
7
 
7
8
  def run_tests(pattern='test/test*.rb', log_enabled=false)
8
- Rake.glob(pattern).each { |fn|
9
+ FileList.glob(pattern).each { |fn|
9
10
  $stderr.puts fn if log_enabled
10
11
  begin
11
12
  require fn
@@ -96,9 +96,12 @@ module Rake
96
96
  desc "Run tests" + (@name==:test ? "" : " for #{@name}")
97
97
  task @name do
98
98
  FileUtilsExt.verbose(@verbose) do
99
- ruby "#{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}" do |ok, status|
99
+ args = "#{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}"
100
+ ruby args do |ok, status|
100
101
  if !ok && status.respond_to?(:signaled?) && status.signaled?
101
102
  raise SignalException.new(status.termsig)
103
+ elsif !ok
104
+ fail "Command failed with status (#{status.exitstatus}): [ruby #{args}]"
102
105
  end
103
106
  end
104
107
  end
@@ -3,7 +3,7 @@ module Rake
3
3
  NUMBERS = [
4
4
  MAJOR = 10,
5
5
  MINOR = 0,
6
- BUILD = 0,
6
+ BUILD = 1,
7
7
  ]
8
8
  end
9
9
  VERSION = Version::NUMBERS.join('.')
@@ -519,4 +519,31 @@ task :default => :test
519
519
  end
520
520
  end
521
521
 
522
+ def rakefile_failing_test_task
523
+ rakefile <<-TEST_TASK
524
+ require 'rake/testtask'
525
+
526
+ task :default => :test
527
+ Rake::TestTask.new(:test) do |t|
528
+ t.test_files = ['a_test.rb']
529
+ end
530
+ TEST_TASK
531
+ open 'a_test.rb', 'w' do |io|
532
+ io << "require 'minitest/autorun'\n"
533
+ io << "class ExitTaskTest < MiniTest::Unit::TestCase\n"
534
+ io << " def test_exit\n"
535
+ io << " assert false, 'this should fail'\n"
536
+ io << " end\n"
537
+ io << "end\n"
538
+ end
539
+ end
540
+
541
+ def rakefile_stand_alone_filelist
542
+ open 'stand_alone_filelist.rb', 'w' do |io|
543
+ io << "require 'rake/file_list'\n"
544
+ io << "FL = Rake::FileList['*.rb']\n"
545
+ io << "puts FL\n"
546
+ end
547
+ end
548
+
522
549
  end
@@ -439,6 +439,21 @@ class TestRakeFunctional < Rake::TestCase
439
439
  end
440
440
  end
441
441
 
442
+ def test_failing_test_sets_exit_status
443
+ rakefile_failing_test_task
444
+ rake
445
+ assert_equal 1, @exit.exitstatus
446
+ end
447
+
448
+ def test_stand_alone_filelist
449
+ rakefile_stand_alone_filelist
450
+
451
+ run_ruby @ruby_options + ["stand_alone_filelist.rb"]
452
+
453
+ assert_match(/^stand_alone_filelist\.rb$/, @out)
454
+ assert_equal 0, @exit.exitstatus
455
+ end
456
+
442
457
  private
443
458
 
444
459
  # Run a shell Ruby command with command line options (using the
@@ -458,14 +473,16 @@ class TestRakeFunctional < Rake::TestCase
458
473
  def run_ruby(option_list)
459
474
  puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose
460
475
 
461
- inn, out, err = Open3.popen3(Gem.ruby, *option_list)
476
+ inn, out, err, wait = Open3.popen3(Gem.ruby, *option_list)
462
477
  inn.close
463
478
 
464
479
  @out = out.read
465
480
  @err = err.read
481
+ @exit = wait.value
466
482
 
467
483
  puts "OUTPUT: [#{@out}]" if @verbose
468
484
  puts "ERROR: [#{@err}]" if @verbose
485
+ puts "EXIT: [#{@exit.inspect}]" if @verbose
469
486
  puts "PWD: [#{Dir.pwd}]" if @verbose
470
487
  end
471
488
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 10.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-12 00:00:00.000000000 Z
12
+ date: 2012-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -65,7 +65,9 @@ extra_rdoc_files:
65
65
  - doc/release_notes/rake-0.9.2.2.rdoc
66
66
  - doc/release_notes/rake-0.9.2.rdoc
67
67
  - doc/release_notes/rake-0.9.3.rdoc
68
+ - doc/release_notes/rake-0.9.4.rdoc
68
69
  - doc/release_notes/rake-10.0.0.rdoc
70
+ - doc/release_notes/rake-10.0.1.rdoc
69
71
  files:
70
72
  - .gemtest
71
73
  - install.rb
@@ -203,7 +205,9 @@ files:
203
205
  - doc/release_notes/rake-0.9.2.2.rdoc
204
206
  - doc/release_notes/rake-0.9.2.rdoc
205
207
  - doc/release_notes/rake-0.9.3.rdoc
208
+ - doc/release_notes/rake-0.9.4.rdoc
206
209
  - doc/release_notes/rake-10.0.0.rdoc
210
+ - doc/release_notes/rake-10.0.1.rdoc
207
211
  homepage: http://rake.rubyforge.org
208
212
  licenses: []
209
213
  post_install_message: