From 4a7f4e7f96b41190a5b6733112a84f8af8aabb6d Mon Sep 17 00:00:00 2001 From: dosas Date: Thu, 2 May 2024 11:35:32 +0200 Subject: [PATCH] Explicitly list files and dirs included in gem (test_)files with the catch all approach there were a lot of files included that do not need to be in the gem. I.e. Jenkinsfile all dot files and dirs related to CI configuration and rubocop linting ... This causes problems whe i.e. building rpm packages where all of these files need to be explicitly excluded. --- fog-vsphere.gemspec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fog-vsphere.gemspec b/fog-vsphere.gemspec index fae3818..ef86114 100644 --- a/fog-vsphere.gemspec +++ b/fog-vsphere.gemspec @@ -14,8 +14,9 @@ Gem::Specification.new do |spec| spec.homepage = 'https://github.com/fog/fog-vsphere' spec.license = 'MIT' - spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(tests?|spec|features)/}) } - spec.test_files = spec.files.grep(%r{^tests\/}) + spec.files = Dir['lib/**/*'] + + ['LICENSE.md', 'Rakefile', 'README.md', 'CHANGELOG.md', 'CONTRIBUTORS.md'] + spec.test_files = Dir['tests/**/*'] spec.require_paths = ['lib']