summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-03-23 18:22:17 +0900
committergit <svn-admin@ruby-lang.org>2024-03-23 10:34:57 +0000
commit14fba5a78499a3a797ec5f27fe697ffa763955f5 (patch)
tree15e0b295eebde6e9443d8f009187adaaaca22b19 /ext/win32ole
parenta8075caa4e7681ca274d474cdc15fbeee9ad9d2a (diff)
[ruby/win32ole] Exclude unused files from packages
https://github.com/ruby/win32ole/commit/f4aff99dda
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/win32ole.gemspec8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole.gemspec b/ext/win32ole/win32ole.gemspec
index 9c137a5d70..e9abb576ff 100644
--- a/ext/win32ole/win32ole.gemspec
+++ b/ext/win32ole/win32ole.gemspec
@@ -23,9 +23,11 @@ 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)/}) }
- end
+ cmd = %W[git ls-files -z --
+ :^#{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.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]