Skip to content

Commit

Permalink
Explicitly list files and dirs included in gem (test_)files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dosas authored and chris1984 committed May 2, 2024
1 parent fa38b3f commit 4a7f4e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fog-vsphere.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down

0 comments on commit 4a7f4e7

Please sign in to comment.