diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-02 10:19:41 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-05 07:32:42 +0900 |
commit | e4d0cca24ae07d7b9797c384a9b6d82983f269e4 (patch) | |
tree | b5db46c840269d1449c934261383b39ec9e2ff28 | |
parent | 1f9e684c7755c2b65a68565807f4547f1692b616 (diff) |
[rubygems/rubygems] Fix installing template files with dots
https://github.com/rubygems/rubygems/commit/a82a77251d
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 | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index 2f86964b45..fe2f201f3a 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -547,7 +547,7 @@ By default, this RubyGems will install gem as: def bundler_template_files Dir.chdir "bundler/lib" do - Dir[File.join('bundler', 'templates', '**', '{*,.*}')]. + Dir.glob(File.join('bundler', '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 9ebe2a37e8..02e7c24f29 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -28,6 +28,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase bundler/exe/bundle bundler/lib/bundler.rb bundler/lib/bundler/b.rb + bundler/lib/bundler/templates/.circleci/config.yml + bundler/lib/bundler/templates/.travis.yml bundler/man/bundle-b.1 bundler/man/bundle-b.1.txt bundler/man/gemfile.5 @@ -184,6 +186,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase assert_path_exists File.join(dir, 'bundler.rb') assert_path_exists File.join(dir, 'bundler/b.rb') + + assert_path_exists File.join(dir, 'bundler/templates/.circleci/config.yml') + assert_path_exists File.join(dir, 'bundler/templates/.travis.yml') end end |