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

ruby-changes:61128

From: David <ko1@a...>
Date: Fri, 8 May 2020 14:14:54 +0900 (JST)
Subject: [ruby-changes:61128] 0e195c82c1 (master): [rubygems/rubygems] Remove old `gauntlet_rubygems` file on rubygems upgrade

https://git.ruby-lang.org/ruby.git/commit/?id=0e195c82c1

From 0e195c82c172465b15495da1cddaf1fee31c26ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Mon, 4 May 2020 13:08:29 +0200
Subject: [rubygems/rubygems] Remove old `gauntlet_rubygems` file on rubygems
 upgrade

The file was removed at
https://github.com/rubygems/rubygems/commit/65b709b095b8354ac2620d1a5d7d537e539f6498,
shipped with rubygems 2.6.5.

https://github.com/rubygems/rubygems/commit/739159a120

diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 8368e3a..055f329 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -604,6 +604,9 @@ abort "#{deprecation_message}" https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/setup_command.rb#L604
 
       to_remove = old_lib_files - lib_files
 
+      gauntlet_rubygems = File.join(lib_dir, 'gauntlet_rubygems.rb')
+      to_remove << gauntlet_rubygems if File.exist? gauntlet_rubygems
+
       to_remove.delete_if do |file|
         file.start_with? 'defaults'
       end
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index e0a6c0c..9ebe2a3 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -277,11 +277,13 @@ class TestGemCommandsSetupCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L277
     engine_defaults_rb = File.join lib_rubygems_defaults, 'jruby.rb'
     os_defaults_rb     = File.join lib_rubygems_defaults, 'operating_system.rb'
 
+    old_gauntlet_rubygems_rb = File.join lib, 'gauntlet_rubygems.rb'
+
     old_builder_rb     = File.join lib_rubygems, 'builder.rb'
     old_format_rb      = File.join lib_rubygems, 'format.rb'
     old_bundler_c_rb   = File.join lib_bundler,  'c.rb'
 
-    files_that_go   = [old_builder_rb, old_format_rb, old_bundler_c_rb]
+    files_that_go   = [old_gauntlet_rubygems_rb, old_builder_rb, old_format_rb, old_bundler_c_rb]
     files_that_stay = [securerandom_rb, engine_defaults_rb, os_defaults_rb]
 
     create_dummy_files(files_that_go + files_that_stay)
-- 
cgit v0.10.2


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

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