From f57aae26d33820d7df7120e82990fd950afc4845 Mon Sep 17 00:00:00 2001 From: Dmytro Shteflyuk Date: Thu, 12 Sep 2024 07:01:13 -0400 Subject: [PATCH] Remove tests files and other config-related files from the gem packages --- bundler-audit.gemspec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundler-audit.gemspec b/bundler-audit.gemspec index 2905f3e0..c3472d60 100644 --- a/bundler-audit.gemspec +++ b/bundler-audit.gemspec @@ -21,7 +21,9 @@ Gem::Specification.new do |gem| glob = lambda { |patterns| gem.files & Dir[*patterns] } - gem.files = `git ls-files`.split($/) + gem.files = `git ls-files`.split($/).reject do |f| + f.match(%r{^(\.|gemspec.yml|Gemfile|spec/)}) + end gem.files = glob[gemspec['files']] if gemspec['files'] gem.executables = gemspec.fetch('executables') do