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

ruby-changes:61532

From: David <ko1@a...>
Date: Fri, 5 Jun 2020 07:34:12 +0900 (JST)
Subject: [ruby-changes:61532] e4d0cca24a (master): [rubygems/rubygems] Fix installing template files with dots

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

From e4d0cca24ae07d7b9797c384a9b6d82983f269e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Tue, 2 Jun 2020 10:19:41 +0200
Subject: [rubygems/rubygems] Fix installing template files with dots

https://github.com/rubygems/rubygems/commit/a82a77251d

diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 2f86964..fe2f201 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: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/setup_command.rb#L547
 
   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 9ebe2a3..02e7c24 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 https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L28
       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 https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L186
 
       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
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

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