summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTangRufus <[email protected]>2025-05-30 09:35:13 +0100
committerHiroshi SHIBATA <[email protected]>2025-06-03 08:06:39 +0900
commit204e3c58e11d1bd0e7a07f3692955aa7b7a20828 (patch)
tree17f89435531019081a4de2196cf9b79337bf7088 /lib
parent9024caa1d6095d1764ba2352122d7cbd798a28f9 (diff)
[rubygems/rubygems] Only ignore `.gitignore` when generating gems with git
https://github.com/rubygems/rubygems/commit/aec5a7887d
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/gem.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index d0a61826be..b77441f367 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -74,7 +74,7 @@ module Bundler
required_ruby_version: required_ruby_version,
rust_builder_required_rubygems_version: rust_builder_required_rubygems_version,
minitest_constant_name: minitest_constant_name,
- ignore_paths: %w[bin/ .gitignore],
+ ignore_paths: %w[bin/],
}
ensure_safe_gem_name(name, constant_array)
@@ -103,7 +103,10 @@ module Bundler
config[:ignore_paths] << "gems.locked"
end
- templates.merge!("gitignore.tt" => ".gitignore") if use_git
+ if use_git
+ templates.merge!("gitignore.tt" => ".gitignore")
+ config[:ignore_paths] << ".gitignore"
+ end
if test_framework = ask_and_set_test_framework
config[:test] = test_framework