Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "+ Introduce a deprecate_quiet that respects $VERBOSE. Use in …

…Gem::Specifications"

This reverts commit 11a57b0.

Conflicts:

	lib/rubygems/specification.rb
  • Loading branch information...
commit 1edfa40051422064d3a0be25db81543c585f6e3b 1 parent 7382dc8
@evanphx evanphx authored
View
4 bin/gem
@@ -18,9 +18,7 @@ end
args = ARGV.clone
begin
- Gem.running do
- Gem::GemRunner.new.run args
- end
+ Gem::GemRunner.new.run args
rescue Gem::SystemExitException => e
exit e.exit_code
end
View
16 lib/rubygems.rb
@@ -1078,22 +1078,6 @@ def self.load_env_plugins
load_plugin_files files
end
- ##
- # Indicates if Gem::Runner is executing commands
-
- def self.running
- @running ||= false
- if block_given?
- begin
- @running = true
- yield
- ensure
- @running = false
- end
- end
- @running
- end
-
class << self
##
View
16 lib/rubygems/deprecate.rb
@@ -47,7 +47,7 @@ def skip_during
# telling the user of +repl+ (unless +repl+ is :none) and the
# year/month that it is planned to go away.
- def deprecate name, repl, year, month, loud = true
+ def deprecate name, repl, year, month
class_eval {
old = "_deprecated_#{name}"
alias_method old, name
@@ -59,20 +59,12 @@ def deprecate name, repl, year, month, loud = true
". It will be removed on or after %4d-%02d-01." % [year, month],
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
]
- warn "#{msg.join}." if (loud || Gem.running) && !Gem::Deprecate.skip
+ warn "#{msg.join}." unless Gem::Deprecate.skip
send old, *args, &block
end
}
end
- ##
- # Like deprecate, except with the always set to false. In rubygems this
- # effectively means warnings will only be put out if skip is falsish.
-
- def deprecate_quiet name, repl, year, month
- deprecate name, repl, year, month, $VERBOSE
- end
-
- module_function :deprecate, :deprecate_quiet, :skip_during
+ module_function :deprecate, :skip_during
end
-end
+end
View
30 lib/rubygems/specification.rb
@@ -2235,20 +2235,20 @@ def yaml_initialize(tag, vals) # :nodoc:
extend Gem::Deprecate
- deprecate_quiet :test_suite_file, :test_file, 2011, 10
- deprecate_quiet :test_suite_file=, :test_file=, 2011, 10
- deprecate_quiet :loaded, :activated, 2011, 10
- deprecate_quiet :loaded?, :activated?, 2011, 10
- deprecate_quiet :loaded=, :activated=, 2011, 10
- deprecate_quiet :installation_path, :base_dir, 2011, 10
- deprecate_quiet :cache_gem, :cache_file, 2011, 10
+ deprecate :test_suite_file, :test_file, 2011, 10
+ deprecate :test_suite_file=, :test_file=, 2011, 10
+ deprecate :loaded, :activated, 2011, 10
+ deprecate :loaded?, :activated?, 2011, 10
+ deprecate :loaded=, :activated=, 2011, 10
+ deprecate :installation_path, :base_dir, 2011, 10
+ deprecate :cache_gem, :cache_file, 2011, 10
# TODO:
- # deprecate_quiet :has_rdoc, :none, 2011, 10
- # deprecate_quiet :has_rdoc?, :none, 2011, 10
- # deprecate_quiet :has_rdoc=, :none, 2011, 10
- # deprecate_quiet :default_executable, :none, 2011, 10
- # deprecate_quiet :default_executable=, :none, 2011, 10
- # deprecate_quiet :spec_name, :spec_file, 2011, 10
- # deprecate_quiet :file_name, :cache_file, 2011, 10
- # deprecate_quiet :full_gem_path, :cache_file, 2011, 10
+ # deprecate :has_rdoc, :none, 2011, 10
+ # deprecate :has_rdoc?, :none, 2011, 10
+ # deprecate :has_rdoc=, :none, 2011, 10
+ # deprecate :default_executable, :none, 2011, 10
+ # deprecate :default_executable=, :none, 2011, 10
+ # deprecate :spec_name, :spec_file, 2011, 10
+ # deprecate :file_name, :cache_file, 2011, 10
+ # deprecate :full_gem_path, :cache_file, 2011, 10
end
View
8 test/rubygems/test_gem.rb
@@ -1076,14 +1076,6 @@ def test_load_env_plugins
assert_equal :loaded, TEST_PLUGIN_EXCEPTION rescue nil
end
- def test_running
- assert !Gem.running
- Gem.running do
- assert Gem.running
- end
- assert !Gem.running
- end
-
def with_plugin(path)
test_plugin_path = File.expand_path("test/rubygems/plugin/#{path}",
@@project_dir)
Please sign in to comment.
Something went wrong with that request. Please try again.