1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Fix template cleanup as well

https://github.com/rubygems/rubygems/commit/10cc79ee21
This commit is contained in:
David Rodríguez 2020-06-02 10:24:32 +02:00 committed by Hiroshi SHIBATA
parent e4d0cca24a
commit dd5b918cbe
Notes: git 2020-06-05 07:33:44 +09:00
2 changed files with 4 additions and 2 deletions

View file

@ -555,7 +555,7 @@ By default, this RubyGems will install gem as:
# 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

View file

@ -276,6 +276,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
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
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)