diff options
author | Orien Madgwick <497874+orien@users.noreply.github.com> | 2023-02-05 13:58:54 +1100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-03-02 17:05:04 +0000 |
commit | 573522bd8481db8d0cb042810b95bd573bd5fb23 (patch) | |
tree | 9ab56156cfb77252bbeb8c50a4fd632ed3e82872 /lib/bundler/templates/newgem/newgem.gemspec.tt | |
parent | ce476cdfb7d6ffbff3d6f179da22f16d18d2f12a (diff) |
[rubygems/rubygems] Simplify the gem package file filter in the gemspec template
The regular expression is difficult to understand at a glance.
Let's replace it with a much simpler string comparison.
https://github.com/rubygems/rubygems/commit/a3745aa03f
Diffstat (limited to 'lib/bundler/templates/newgem/newgem.gemspec.tt')
-rw-r--r-- | lib/bundler/templates/newgem/newgem.gemspec.tt | 2 |
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 69c86ea27b..ee1c31522c 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.match(%r{\A(?:(?: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" |