From df7a1377e6283ca8645dbf1f0577ebc194337f50 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 25 May 2022 18:56:42 +0900 Subject: [PATCH] [ruby/timeout] Update spec files not to include unused files [ci skip] https://github.com/ruby/timeout/commit/01c44b591f --- lib/timeout/timeout.gemspec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/timeout/timeout.gemspec b/lib/timeout/timeout.gemspec index 3dc37f8768..b0a68122cb 100644 --- a/lib/timeout/timeout.gemspec +++ b/lib/timeout/timeout.gemspec @@ -21,8 +21,10 @@ Gem::Specification.new do |spec| spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = spec.homepage - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z 2>/dev/null`.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 = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }