summaryrefslogtreecommitdiff
path: root/lib/bundler/templates/newgem/newgem.gemspec.tt
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-03-03 12:15:27 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-03-07 16:51:36 +0900
commit93f0749a64ae4511bd38358dee238140489526b5 (patch)
tree5eed3a00eb6ebd464baf55e4613b45010b069163 /lib/bundler/templates/newgem/newgem.gemspec.tt
parent72591eb73f589f135d7c1c1e07a98d3820001213 (diff)
[rubygems/rubygems] Fix gemspec file filter
Explicitly match directory separator to not match files in repo root accidentally. https://github.com/rubygems/rubygems/commit/b936805ea9 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'lib/bundler/templates/newgem/newgem.gemspec.tt')
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index ee1c31522c..da81f046d4 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |f|
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin test spec features .git .circleci appveyor])
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
end
end
spec.bindir = "exe"