Skip to content

Commit

Permalink
Remove development and test files from the gem package (#503)
Browse files Browse the repository at this point in the history
There are several files in the gem package that aren't useful for
downstream projects. Removing these files reduces the gem package
size from 34K to 24K!
  • Loading branch information
orien authored Feb 21, 2023
1 parent 7f620b4 commit 26ddc43
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cells.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ Gem::Specification.new do |spec|
spec.metadata['source_code_uri'] = spec.homepage
spec.metadata['wiki_uri'] = "#{spec.homepage}/wiki"

spec.files = `git ls-files`.split("\n")
spec.test_files = `git ls-files -- {test}/*`.split("\n")
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |file|
file.start_with?(*%w[.git Gemfile Rakefile TODO test])
end
end
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.2.10'

Expand Down

0 comments on commit 26ddc43

Please sign in to comment.