summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/setup_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb4
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)