Skip to content

Commit

Permalink
Merge pull request #361 from pocke/Omit_test_files_from_published_gem…
Browse files Browse the repository at this point in the history
…_package

Omit test files from published gem package
  • Loading branch information
winebarrel committed Jul 23, 2021
2 parents 1d321c9 + 1d28b33 commit 9c8f559
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ridgepole.gemspec
Expand Up @@ -14,9 +14,12 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/ridgepole/ridgepole'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0")
spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject do |f|
f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
end
end
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.required_ruby_version = Gem::Requirement.new('>= 2.2.7') # rubocop:disable Gemspec/RequiredRubyVersion
Expand Down

0 comments on commit 9c8f559

Please sign in to comment.