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

ruby-changes:61535

From: David <ko1@a...>
Date: Fri, 5 Jun 2020 07:34:15 +0900 (JST)
Subject: [ruby-changes:61535] dd5b918cbe (master): [rubygems/rubygems] Fix template cleanup as well

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

From dd5b918cbead5fdb641118aa4e4d90e013f90df1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Tue, 2 Jun 2020 10:24:32 +0200
Subject: [rubygems/rubygems] Fix template cleanup as well

https://github.com/rubygems/rubygems/commit/10cc79ee21

diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index fe2f201..a82b6a4 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -555,7 +555,7 @@ By default, this RubyGems will install gem as: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/setup_command.rb#L555
   # for cleanup old bundler files
   def template_files_in(dir)
     Dir.chdir dir do
-      Dir[File.join('templates', '**', '{*,.*}')].
+      Dir.glob(File.join('templates', '**', '*'), File::FNM_DOTMATCH).
         select{|f| !File.directory?(f)}
     end
   end
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 02e7c24..e071148 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -276,6 +276,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L276
     lib_rubygems          = File.join lib, 'rubygems'
     lib_bundler           = File.join lib, 'bundler'
     lib_rubygems_defaults = File.join lib_rubygems, 'defaults'
+    lib_bundler_templates = File.join lib_bundler, 'templates'
 
     securerandom_rb = File.join lib, 'securerandom.rb'
 
@@ -287,8 +288,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L288
     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'
+    old_bundler_ci     = File.join lib_bundler_templates, '.lecacy_ci', 'config.yml'
 
-    files_that_go   = [old_gauntlet_rubygems_rb, 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, old_bundler_ci]
     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/

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