summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-07-03 14:18:27 +0900
committergit <svn-admin@ruby-lang.org>2024-07-03 10:15:22 +0000
commit7a4314740709b8e2a4b65ab2af22422b2fb76a05 (patch)
tree993696273f894e74de07db834f9141b8463dc4b4 /lib
parent64fef3b870a8ed8147654531aef4c065d8a730c6 (diff)
[ruby/shellwords] Exclude unnecessary files from the packages
https://github.com/ruby/shellwords/commit/08c87a964e
Diffstat (limited to 'lib')
-rw-r--r--lib/shellwords.gemspec5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/shellwords.gemspec b/lib/shellwords.gemspec
index d60ab5f650..8d0c518ca5 100644
--- a/lib/shellwords.gemspec
+++ b/lib/shellwords.gemspec
@@ -21,8 +21,9 @@ 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`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ srcdir, gemspec_file = File.split(__FILE__)
+ spec.files = Dir.chdir(srcdir) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:(?:test|spec|features)/|\.git|Rake)}) || f == gemspec_file}
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }