[ruby/win32ole] Refine pathspecs for spec.files

https://github.com/ruby/win32ole/commit/8d443417a9
This commit is contained in:
Nobuyoshi Nakada 2024-03-23 21:53:24 +09:00 committed by git
parent 14fba5a784
commit 43fe89d921

View File

@ -23,11 +23,11 @@ Gem::Specification.new do |spec|
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
cmd = %W[git ls-files -z --
:^#{File.basename(__FILE__)}
:^/bin/ :^/test/ :^/rakelib/ :^/.git* :^Gemfile* :^Rakefile*
pathspecs = %W[
:(exclude,literal)#{File.basename(__FILE__)}
:^/bin/ :^/test/ :^/rakelib/ :^/.git* :^/Gemfile* :^/Rakefile*
]
spec.files = IO.popen(cmd, chdir: __dir__, err: IO::NULL, exception: false, &:read).split("\x0")
spec.files = IO.popen(%w[git ls-files -z --] + pathspecs, chdir: __dir__, err: IO::NULL, exception: false, &:read).split("\x0")
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]