Skip to content

Commit

Permalink
[ruby/tmpdir] Update gemspec according to the recent bundler template
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and matzbot committed Feb 25, 2024
1 parent 012a0b9 commit 7356067
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/tmpdir.gemspec
Expand Up @@ -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) }
Expand Down

0 comments on commit 7356067

Please sign in to comment.