summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-25 14:03:51 +0900
committergit <svn-admin@ruby-lang.org>2024-02-25 05:04:12 +0000
commit7356067b73f9f1a4c8a06546611ec242af1fa192 (patch)
tree12a046b4ad90396e96c6d083fb10549bd340b9b6
parent012a0b91252da7b3b23e679dd50a1571a59f5a21 (diff)
[ruby/tmpdir] Update gemspec according to the recent bundler template
https://github.com/ruby/tmpdir/commit/4ef7bc4f2a
-rw-r--r--lib/tmpdir.gemspec7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/tmpdir.gemspec b/lib/tmpdir.gemspec
index a7463105fa..15fbd1d4c8 100644
--- a/lib/tmpdir.gemspec
+++ b/lib/tmpdir.gemspec
@@ -15,8 +15,11 @@ Gem::Specification.new do |spec|
# 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(File.expand_path('..', __FILE__)) do
- `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ spec.files = Dir.chdir(__dir__) do
+ `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject do |f|
+ (File.expand_path(f) == __FILE__) ||
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git Gemfile])
+ end
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }