ruby-changes:61075
From: bronzdoc <ko1@a...>
Date: Fri, 8 May 2020 07:39:42 +0900 (JST)
Subject: [ruby-changes:61075] ff37dd7e9e (master): [rubygems/rubygems] Modify files to use new version horizon deprecations
https://git.ruby-lang.org/ruby.git/commit/?id=ff37dd7e9e From ff37dd7e9e80e7b8882f24b0e56c69674fb7bdb0 Mon Sep 17 00:00:00 2001 From: bronzdoc <lsagastume1990@g...> Date: Sat, 28 Mar 2020 18:11:40 -0600 Subject: [rubygems/rubygems] Modify files to use new version horizon deprecations https://github.com/rubygems/rubygems/commit/4fe5bb5bf3 diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index a4bd11c..c9dff07 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -41,7 +41,7 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L41 class << self extend Gem::Deprecate - deprecate :default_specifications_dir, "Gem.default_specifications_dir", 2020, 02 + deprecate :default_specifications_dir, "Gem.default_specifications_dir" end diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb index 9d7f1b2..ed245f1 100644 --- a/lib/rubygems/commands/query_command.rb +++ b/lib/rubygems/commands/query_command.rb @@ -6,7 +6,7 @@ require 'rubygems/deprecate' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/query_command.rb#L6 class Gem::Commands::QueryCommand < Gem::Command extend Gem::Deprecate - deprecate_command(2020, 12) + deprecate_command include Gem::QueryUtils diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb index fe89b00..082a6ce 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb @@ -195,7 +195,7 @@ class Gem::DependencyInstaller https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency_installer.rb#L195 set end - deprecate :find_gems_with_sources, :none, 2020, 12 + deprecate :find_gems_with_sources def in_background(what) # :nodoc: fork_happened = false diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index abb7048..eb63029 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -422,7 +422,7 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L422 @gem_dir = directory extract_files end - deprecate :unpack, :none, 2020, 04 + deprecate :unpack ## # The location of the spec file that is installed. diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 6c37555..ac44f73 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -720,7 +720,7 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L720 # Deprecated: You must now specify the executable name to Gem.bin_path. attr_writer :default_executable - deprecate :default_executable=, :none, 2018, 12 + deprecate :default_executable= ## # Allows deinstallation of gems with legacy platforms. @@ -733,7 +733,7 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L733 # Formerly used to set rubyforge project. attr_writer :rubyforge_project - deprecate :rubyforge_project=, :none, 2019, 12 + deprecate :rubyforge_project= ## # The Gem::Specification version of this gemspec. @@ -1725,7 +1725,7 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1725 end result end - deprecate :default_executable, :none, 2018, 12 + deprecate :default_executable ## # The default value for specification attribute +name+ @@ -1928,7 +1928,7 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1928 def has_rdoc # :nodoc: true end - deprecate :has_rdoc, :none, 2018, 12 + deprecate :has_rdoc ## # Deprecated and ignored. @@ -1938,10 +1938,10 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1938 def has_rdoc=(ignored) # :nodoc: @has_rdoc = true end - deprecate :has_rdoc=, :none, 2018, 12 + deprecate :has_rdoc= alias :has_rdoc? :has_rdoc # :nodoc: - deprecate :has_rdoc?, :none, 2018, 12 + deprecate :has_rdoc? ## # True if this gem has files in test_files diff --git a/test/rubygems/test_deprecate.rb b/test/rubygems/test_deprecate.rb index 6d36b67..15b501d 100644 --- a/test/rubygems/test_deprecate.rb +++ b/test/rubygems/test_deprecate.rb @@ -50,7 +50,7 @@ class TestDeprecate < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_deprecate.rb#L50 def bar @message = "bar" end - deprecate :foo, :bar, 2099, 3 + deprecate :foo, :bar end @@ -70,7 +70,7 @@ class TestDeprecate < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_deprecate.rb#L70 assert_equal "", out assert_match(/Thing#foo is deprecated; use bar instead\./, err) - assert_match(/on or after 2099-03-01/, err) + assert_match(/in Rubygems [0-9]+/, err) end def test_deprecate_command @@ -78,7 +78,7 @@ class TestDeprecate < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_deprecate.rb#L78 foo_command = Class.new(Gem::Command) do extend Gem::Deprecate - deprecate_command(2099, 4) + deprecate_command def execute puts "pew pew!" diff --git a/test/rubygems/test_gem_command_manager.rb b/test/rubygems/test_gem_command_manager.rb index c6aaff2..497ff1e 100644 --- a/test/rubygems/test_gem_command_manager.rb +++ b/test/rubygems/test_gem_command_manager.rb @@ -281,7 +281,7 @@ class TestGemCommandManager < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_command_manager.rb#L281 foo_command = Class.new(Gem::Command) do extend Gem::Deprecate - deprecate_command(2099, 4) + deprecate_command def execute say "pew pew!" @@ -296,7 +296,7 @@ class TestGemCommandManager < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_command_manager.rb#L296 end assert_equal "pew pew!\n", @ui.output - assert_equal("WARNING: foo command is deprecated. It will be removed on or after 2099-04-01.\n", @ui.error) + assert_match(/WARNING: foo command is deprecated. It will be removed in Rubygems [0-9]+/, @ui.error) ensure Gem::Commands.send(:remove_const, :FooCommand) end diff --git a/test/rubygems/test_gem_gem_runner.rb b/test/rubygems/test_gem_gem_runner.rb index 5e4eda0..c4917b0 100644 --- a/test/rubygems/test_gem_gem_runner.rb +++ b/test/rubygems/test_gem_gem_runner.rb @@ -76,7 +76,7 @@ class TestGemGemRunner < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_gem_runner.rb#L76 assert_nil @runner.run(args) end - assert_equal "WARNING: query command is deprecated. It will be removed on or after 2020-12-01.\n", @ui.error + assert_match /WARNING: query command is deprecated. It will be removed in Rubygems [0-9]+/, @ui.error end def test_info_succeeds -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/