From db0b398f64b721c9a24d906f7a43606aecc2a6a9 Mon Sep 17 00:00:00 2001 From: Craig Zeise Date: Fri, 5 Dec 2025 14:29:11 -0600 Subject: [PATCH 1/2] Remove Gemfiles from packaged gem --- lint_roller.gemspec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lint_roller.gemspec b/lint_roller.gemspec index 36408fb..a42fafc 100644 --- a/lint_roller.gemspec +++ b/lint_roller.gemspec @@ -19,7 +19,10 @@ 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 Gemfile] + ) end end spec.bindir = "exe" From 465004306d4daac7d4e07df7aa01662fedfe2541 Mon Sep 17 00:00:00 2001 From: Craig Zeise Date: Fri, 5 Dec 2025 15:28:26 -0600 Subject: [PATCH 2/2] Whitelist files, added extra_rdoc_files, and test_files --- lint_roller.gemspec | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lint_roller.gemspec b/lint_roller.gemspec index a42fafc..8f7eee2 100644 --- a/lint_roller.gemspec +++ b/lint_roller.gemspec @@ -15,17 +15,9 @@ Gem::Specification.new do |spec| spec.metadata["source_code_uri"] = spec.homepage spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md" - # Specify which files should be added to the gem when it is released. - # 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 Gemfile] - ) - end - end - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] + + spec.files = Dir["lib/**/*"] + spec.extra_rdoc_files = ["README.md", "LICENSE.txt", "CHANGELOG.md"] + spec.test_files = Dir["test/**/*"] end