Skip to content

Commit

Permalink
Merge pull request #25 from nobu/spec.files
Browse files Browse the repository at this point in the history
Refine pathspecs for `spec.files`
  • Loading branch information
nobu authored Mar 23, 2024
2 parents b979e88 + 8d44341 commit b5a078b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions win32ole.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit b5a078b

Please sign in to comment.