diff options
-rw-r--r-- | ext/win32ole/win32ole.gemspec | 8 |
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"] |