rake 0.9.1 → 0.9.2

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.

data/RRR CHANGED
@@ -3,7 +3,6 @@ class Zippy
3
3
  task :a
4
4
  task :b
5
5
  file "x"
6
- cp "x", "y"
7
6
  end
8
7
  end
9
8
 
@@ -431,7 +431,7 @@ each other.
431
431
 
432
432
  For example:
433
433
 
434
- namespace "main"
434
+ namespace "main" do
435
435
  task :build do
436
436
  # Build the main program
437
437
  end
@@ -0,0 +1,49 @@
1
+ = Rake 0.9.2 Released
2
+
3
+ Rake version 0.9.2 has a few small fixes. See below for details.
4
+
5
+ == Changes
6
+
7
+ * Support for Ruby 1.8.6 was fixed.
8
+ * Global DSL warnings now honor --no-deprecate
9
+
10
+ == What is Rake
11
+
12
+ Rake is a build tool similar to the make program in many ways. But
13
+ instead of cryptic make recipes, Rake uses standard Ruby code to
14
+ declare tasks and dependencies. You have the full power of a modern
15
+ scripting language built right into your build tool.
16
+
17
+ == Availability
18
+
19
+ The easiest way to get and install rake is via RubyGems ...
20
+
21
+ gem install rake (you may need root/admin privileges)
22
+
23
+ Otherwise, you can get it from the more traditional places:
24
+
25
+ Home Page:: http://rake.rubyforge.org/
26
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
27
+ GitHub:: git://github.com/jimweirich/rake.git
28
+
29
+ == Thanks
30
+
31
+ As usual, it was input from users that drove a alot of these changes. The
32
+ following people either contributed patches, made suggestions or made
33
+ otherwise helpful comments. Thanks to ...
34
+
35
+ * James M. Lawrence (quix)
36
+ * Roger Pack
37
+ * Cezary Baginski
38
+ * Sean Scot August Moon
39
+ * R.T. Lechow
40
+ * Alex Chaffee
41
+ * James Tucker
42
+ * Matthias Lüdtke
43
+ * Santiago Pastorino
44
+
45
+ Also, bit thanks to Eric Hodel for assisting with getting this release
46
+ out the door (where "assisting" includes, but is not by any means
47
+ limited to, "pushing" me to get it done).
48
+
49
+ -- Jim Weirich
@@ -140,18 +140,23 @@ module Rake
140
140
  end
141
141
 
142
142
  module DeprecatedObjectDSL
143
- dsl = Object.new.extend DSL
143
+ Commands = Object.new.extend DSL
144
144
  DSL.private_instance_methods(false).each do |name|
145
- define_method name do |*args, &block|
146
- unless @rake_dsl_warning
147
- $stderr.puts "WARNING: Global access to Rake DSL methods is deprecated. Please Include"
148
- $stderr.puts " ... Rake::DSL into classes and modules which use the Rake DSL methods."
149
- @rake_dsl_warning = true
150
- end
151
- $stderr.puts "WARNING: DSL method #{self.class}##{name} called at #{caller.first}"
152
- dsl.send(name, *args, &block)
153
- end
154
- private name
145
+ line = __LINE__+1
146
+ class_eval %{
147
+ def #{name}(*args, &block)
148
+ unless Rake.application.options.ignore_deprecate
149
+ unless @rake_dsl_warning
150
+ $stderr.puts "WARNING: Global access to Rake DSL methods is deprecated. Please include"
151
+ $stderr.puts " ... Rake::DSL into classes and modules which use the Rake DSL methods."
152
+ @rake_dsl_warning = true
153
+ end
154
+ $stderr.puts "WARNING: DSL method \#{self.class}##{name} called at \#{caller.first}"
155
+ end
156
+ Rake::DeprecatedObjectDSL::Commands.send(:#{name}, *args, &block)
157
+ end
158
+ private :#{name}
159
+ }, __FILE__, line
155
160
  end
156
161
  end
157
162
 
@@ -3,7 +3,7 @@ module Rake
3
3
  NUMBERS = [
4
4
  MAJOR = 0,
5
5
  MINOR = 9,
6
- BUILD = 1,
6
+ BUILD = 2,
7
7
  ]
8
8
  end
9
9
  VERSION = Version::NUMBERS.join('.')
@@ -0,0 +1 @@
1
+ task :default
@@ -2,6 +2,11 @@ require File.expand_path('../helper', __FILE__)
2
2
 
3
3
  class TestRakeDsl < Rake::TestCase
4
4
 
5
+ def setup
6
+ super
7
+ Rake::Task.clear
8
+ end
9
+
5
10
  def test_namespace_command
6
11
  namespace "n" do
7
12
  task "t"
@@ -50,4 +55,19 @@ class TestRakeDsl < Rake::TestCase
50
55
  assert_match(/Foo\#file/, err)
51
56
  assert_match(/test_rake_dsl\.rb:\d+/, err)
52
57
  end
58
+
59
+ def test_deprecated_object_dsl_with_suppressed_warnings
60
+ Rake.application.options.ignore_deprecate = true
61
+ out, err = capture_io do
62
+ Foo.new
63
+ Rake.application.invoke_task :foo_deprecated_a
64
+ end
65
+ assert_equal("ba", out)
66
+ refute_match(/deprecated/, err)
67
+ refute_match(/Foo\#task/, err)
68
+ refute_match(/Foo\#file/, err)
69
+ refute_match(/test_rake_dsl\.rb:\d+/, err)
70
+ ensure
71
+ Rake.application.options.ignore_deprecate = false
72
+ end
53
73
  end
@@ -131,8 +131,8 @@ class TestRakeFunctional < Rake::TestCase
131
131
  end
132
132
 
133
133
  def test_by_default_rakelib_files_are_included
134
- in_environment('RAKE_SYSTEM' => 'test/data/sys') do
135
- rake '-T', 'extra'
134
+ in_environment('RAKE_SYSTEM' => 'test/data/sys', "PWD" => 'test/data/extra') do
135
+ rake '-T', 'extra', '--trace'
136
136
  end
137
137
  assert_match %r{extra:extra}, @out
138
138
  end
@@ -145,7 +145,7 @@ class TestRakeFunctional < Rake::TestCase
145
145
  end
146
146
 
147
147
  def test_no_system
148
- in_environment('RAKE_SYSTEM' => 'test/data/sys') do
148
+ in_environment('RAKE_SYSTEM' => 'test/data/sys', "PWD" => "test/data/extra") do
149
149
  rake '-G', "sys1"
150
150
  end
151
151
  assert_match %r{^Don't know how to build task}, @err # emacs wart: '
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rake
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.1
5
+ version: 0.9.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jim Weirich
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-01 00:00:00 Z
13
+ date: 2011-06-05 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -80,6 +80,7 @@ extra_rdoc_files:
80
80
  - doc/release_notes/rake-0.8.7.rdoc
81
81
  - doc/release_notes/rake-0.9.0.rdoc
82
82
  - doc/release_notes/rake-0.9.1.rdoc
83
+ - doc/release_notes/rake-0.9.2.rdoc
83
84
  files:
84
85
  - .gemtest
85
86
  - install.rb
@@ -194,6 +195,7 @@ files:
194
195
  - test/data/default/Rakefile
195
196
  - test/data/deprecated_import/Rakefile
196
197
  - test/data/dryrun/Rakefile
198
+ - test/data/extra/Rakefile
197
199
  - test/data/file_creation_task/Rakefile
198
200
  - test/data/imports/Rakefile
199
201
  - test/data/multidesc/Rakefile
@@ -232,6 +234,7 @@ files:
232
234
  - doc/release_notes/rake-0.8.7.rdoc
233
235
  - doc/release_notes/rake-0.9.0.rdoc
234
236
  - doc/release_notes/rake-0.9.1.rdoc
237
+ - doc/release_notes/rake-0.9.2.rdoc
235
238
  homepage: http://rake.rubyforge.org
236
239
  licenses: []
237
240