From 93f0749a64ae4511bd38358dee238140489526b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 3 Mar 2023 12:15:27 +0100 Subject: [PATCH] [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 --- lib/bundler/templates/newgem/newgem.gemspec.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"