mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel
namespace by Commands. Remove unused variable and debugging statement in tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
da6eec340e
commit
5caef67a6f
7 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Sat Aug 13 01:56:11 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel
|
||||||
|
namespace by Commands. Remove unused variable and debugging
|
||||||
|
statement in tests.
|
||||||
|
|
||||||
Fri Aug 12 11:39:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Fri Aug 12 11:39:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* configure.in: Desbribe "no" configure option for site_ruby
|
* configure.in: Desbribe "no" configure option for site_ruby
|
||||||
|
|
|
@ -348,6 +348,7 @@ module Rake
|
||||||
],
|
],
|
||||||
['--rakelibdir', '--rakelib', '-R RAKELIBDIR',
|
['--rakelibdir', '--rakelib', '-R RAKELIBDIR',
|
||||||
"Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')",
|
"Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')",
|
||||||
|
# HACK Use File::PATH_SEPARATOR
|
||||||
lambda { |value| options.rakelib = value.split(':') }
|
lambda { |value| options.rakelib = value.split(':') }
|
||||||
],
|
],
|
||||||
['--require', '-r MODULE', "Require MODULE before executing rakefile.",
|
['--require', '-r MODULE', "Require MODULE before executing rakefile.",
|
||||||
|
|
|
@ -144,10 +144,12 @@ module Rake
|
||||||
Rake.application.add_import(fn)
|
Rake.application.add_import(fn)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
DeprecatedCommands = Object.new.extend(DSL)
|
||||||
|
|
||||||
module DeprecatedObjectDSL # :nodoc:
|
module DeprecatedObjectDSL # :nodoc:
|
||||||
Commands = Object.new.extend DSL
|
|
||||||
DSL.private_instance_methods(false).each do |name|
|
DSL.private_instance_methods(false).each do |name|
|
||||||
line = __LINE__+1
|
line = __LINE__+1
|
||||||
class_eval %{
|
class_eval %{
|
||||||
|
@ -160,8 +162,8 @@ module Rake
|
||||||
end
|
end
|
||||||
$stderr.puts "WARNING: DSL method \#{self.class}##{name} called at \#{caller.first}"
|
$stderr.puts "WARNING: DSL method \#{self.class}##{name} called at \#{caller.first}"
|
||||||
end
|
end
|
||||||
Rake::DeprecatedObjectDSL::Commands.send(:#{name}, *args, &block)
|
Rake::DeprecatedCommands.send(:#{name}, *args, &block)
|
||||||
end
|
end
|
||||||
private :#{name}
|
private :#{name}
|
||||||
}, __FILE__, line
|
}, __FILE__, line
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Rake
|
module Rake
|
||||||
VERSION = '0.9.2.1'
|
VERSION = '0.9.2.2'
|
||||||
|
|
||||||
module Version # :nodoc: all
|
module Version # :nodoc: all
|
||||||
MAJOR, MINOR, BUILD = VERSION.split '.'
|
MAJOR, MINOR, BUILD = VERSION.split '.'
|
||||||
|
|
|
@ -282,7 +282,6 @@ end
|
||||||
task :prep => :clean do
|
task :prep => :clean do
|
||||||
mkdir_p 'src'
|
mkdir_p 'src'
|
||||||
N.times do |n|
|
N.times do |n|
|
||||||
puts "DBG: Touching src/foo#{n}"
|
|
||||||
touch "src/foo#{n}"
|
touch "src/foo#{n}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,6 +56,10 @@ class TestRakeDsl < Rake::TestCase
|
||||||
assert_match(/test_rake_dsl\.rb:\d+/, err)
|
assert_match(/test_rake_dsl\.rb:\d+/, err)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_no_commands_constant
|
||||||
|
assert ! defined?(Commands), "should not define Commands"
|
||||||
|
end
|
||||||
|
|
||||||
def test_deprecated_object_dsl_with_suppressed_warnings
|
def test_deprecated_object_dsl_with_suppressed_warnings
|
||||||
Rake.application.options.ignore_deprecate = true
|
Rake.application.options.ignore_deprecate = true
|
||||||
out, err = capture_io do
|
out, err = capture_io do
|
||||||
|
|
|
@ -436,7 +436,7 @@ class TestRakeFunctional < Rake::TestCase
|
||||||
def run_ruby(option_list)
|
def run_ruby(option_list)
|
||||||
puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose
|
puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose
|
||||||
|
|
||||||
inn, out, err, wait = Open3.popen3(Gem.ruby, *option_list)
|
inn, out, err = Open3.popen3(Gem.ruby, *option_list)
|
||||||
inn.close
|
inn.close
|
||||||
|
|
||||||
@out = out.read
|
@out = out.read
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue