From 54b5c322f14c7abc4396db47388306e2476f3a7f Mon Sep 17 00:00:00 2001 From: Gareth Jones <3151613+G-Rath@users.noreply.github.com> Date: Fri, 20 Mar 2026 07:02:07 +1300 Subject: [PATCH 1/2] fix: exclude some files from published gem --- erb.gemspec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erb.gemspec b/erb.gemspec index 3793e5d..c97df3e 100644 --- a/erb.gemspec +++ b/erb.gemspec @@ -20,8 +20,10 @@ Gem::Specification.new do |spec| spec.metadata['source_code_uri'] = spec.homepage spec.metadata['changelog_uri'] = "https://github.com/ruby/erb/blob/v#{spec.version}/NEWS.md" - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + spec.files = Dir.chdir(__dir__) do + `git ls-files -z`.split("\x0").reject do |f| + (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)}) + end end spec.bindir = 'libexec' spec.executables = ['erb'] From dc7bf9bdf491b12bfa20035663251c4d3f609757 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 19 Mar 2026 11:58:03 -0700 Subject: [PATCH 2/2] Include gemspec and stop mentioning CI we don't use --- erb.gemspec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erb.gemspec b/erb.gemspec index c97df3e..70113a2 100644 --- a/erb.gemspec +++ b/erb.gemspec @@ -21,9 +21,7 @@ Gem::Specification.new do |spec| spec.metadata['changelog_uri'] = "https://github.com/ruby/erb/blob/v#{spec.version}/NEWS.md" spec.files = Dir.chdir(__dir__) do - `git ls-files -z`.split("\x0").reject do |f| - (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)}) - end + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|\.git|\.github)/}) } end spec.bindir = 'libexec' spec.executables = ['erb']