[前][次][番号順一覧][スレッド一覧]

ruby-changes:61066

From: bronzdoc <ko1@a...>
Date: Fri, 8 May 2020 07:39:37 +0900 (JST)
Subject: [ruby-changes:61066] 7db538a7c9 (master): [rubygems/rubygems] Rename version horizon deprecation methods

https://git.ruby-lang.org/ruby.git/commit/?id=7db538a7c9

From 7db538a7c92bcbcccb97d2ffcf505bee4d85e7d3 Mon Sep 17 00:00:00 2001
From: bronzdoc <lsagastume1990@g...>
Date: Sun, 19 Apr 2020 07:41:54 -0600
Subject: [rubygems/rubygems] Rename version horizon deprecation methods

https://github.com/rubygems/rubygems/commit/6afd914fda

diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index c9dff07..816fc8c 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"
+    rubygems_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 ed245f1..7a26b55 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
+  rubygems_deprecate_command
 
   include Gem::QueryUtils
 
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index 082a6ce..f7add4e 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
+  rubygems_deprecate :find_gems_with_sources
 
   def in_background(what) # :nodoc:
     fork_happened = false
diff --git a/lib/rubygems/deprecate.rb b/lib/rubygems/deprecate.rb
index 815d9dc..5f2140c 100644
--- a/lib/rubygems/deprecate.rb
+++ b/lib/rubygems/deprecate.rb
@@ -51,7 +51,7 @@ module Gem::Deprecate https://github.com/ruby/ruby/blob/trunk/lib/rubygems/deprecate.rb#L51
   # telling the user of +repl+ (unless +repl+ is :none) and the
   # Rubygems version that it is planned to go away.
 
-  def deprecate(name, replacement=:none)
+  def rubygems_deprecate(name, replacement=:none)
     class_eval do
       old = "_deprecated_#{name}"
       alias_method old, name
@@ -70,7 +70,7 @@ module Gem::Deprecate https://github.com/ruby/ruby/blob/trunk/lib/rubygems/deprecate.rb#L70
   end
 
   # Deprecation method to deprecate Rubygems commands
-  def deprecate_command
+  def rubygems_deprecate_command
     class_eval do
       define_method "deprecated?" do
         true
@@ -86,6 +86,6 @@ module Gem::Deprecate https://github.com/ruby/ruby/blob/trunk/lib/rubygems/deprecate.rb#L86
     end
   end
 
-  module_function :deprecate, :deprecate_command, :skip_during
+  module_function :rubygems_deprecate, :rubygems_deprecate_command, :skip_during
 
 end
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index eb63029..241f541 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
+  rubygems_deprecate :unpack
 
   ##
   # The location of the spec file that is installed.
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index ac44f73..18e3f2d 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=
+  rubygems_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=
+  rubygems_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
+  rubygems_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
+  rubygems_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=
+  rubygems_deprecate :has_rdoc=
 
   alias :has_rdoc? :has_rdoc # :nodoc:
-  deprecate :has_rdoc?
+  rubygems_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 15b501d..27f7243 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
+    rubygems_deprecate :foo, :bar
 
   end
 
@@ -73,12 +73,12 @@ class TestDeprecate < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_deprecate.rb#L73
     assert_match(/in Rubygems [0-9]+/, err)
   end
 
-  def test_deprecate_command
+  def test_rubygems_deprecate_command
     require 'rubygems/command'
     foo_command = Class.new(Gem::Command) do
       extend Gem::Deprecate
 
-      deprecate_command
+      rubygems_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 497ff1e..867592a 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
+      rubygems_deprecate_command
 
       def execute
         say "pew pew!"
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]