Skip to content

Commit

Permalink
Omit test/ dir from built .gem
Browse files Browse the repository at this point in the history
test_files is deprecated.  It was causing all tests to
be shipped in the .gem file, which is useless bloat:
rubygems/guides#90

Compressed kubeclient-4.9.1.gem was 78KB, now down to 33KB.
Unpacked size 757KB -> 184KB.
  • Loading branch information
cben committed May 11, 2021
1 parent cb20e10 commit a796093
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kubeclient.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/abonas/kubeclient'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0")
git_files = `git ls-files -z`.split("\x0")
spec.files = git_files.grep_v(%r{^(test|spec|features)/})
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.test_files = []
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.2.0'

Expand Down

0 comments on commit a796093

Please sign in to comment.