diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-02 10:24:32 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-05 07:32:42 +0900 |
commit | dd5b918cbead5fdb641118aa4e4d90e013f90df1 (patch) | |
tree | eaffeeeabe03c000b03c20509017388323f7a006 | |
parent | e4d0cca24ae07d7b9797c384a9b6d82983f269e4 (diff) |
[rubygems/rubygems] Fix template cleanup as well
https://github.com/rubygems/rubygems/commit/10cc79ee21
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
-rw-r--r-- | lib/rubygems/commands/setup_command.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_setup_command.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index fe2f201f3a..a82b6a44aa 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: # 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 02e7c24f29..e0711482f5 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 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) |