diff options
author | Michael Herold <opensource@michaeljherold.com> | 2019-11-16 20:27:29 -0600 |
---|---|---|
committer | Michael Herold <opensource@michaeljherold.com> | 2019-11-17 11:49:53 -0600 |
commit | 565a1ed0de48c2ddca1f2a321e88739049c7922e (patch) | |
tree | f78c7672dee3ea0823aefd8aa1ed64645b5072fa | |
parent | 3692cddcd9c1a713a773b1ccc19b419e366b4dd2 (diff) | |
download | hashie-565a1ed0de48c2ddca1f2a321e88739049c7922e.tar.gz |
Exclude tests from the gem release
When you're installing a gem in a production environment, you want it to
install as fast it can. One of the ways you can speed up the
installation of the gem is by making it smaller. We currently ship the
test suite with the gem, increasing the size of the built gem
significantly.
By not shipping the test suite, we can shrink the size of the gem by
38%. Below are the measurements I took for that statement.
**The size of the gem with the test suite**
$ du -b hashie-4.0.1.gem
80384 hashie-4.0.1.gem
**The size of the gem without the test suite**
$ du -b hashie-4.0.1.gem
50176 hashie-4.0.1.gem
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | hashie.gemspec | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1408cb5..259fa31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ scheme are considered to be bugs. ### Miscellaneous +* [#981](https://github.com/hashie/hashie/pull/981): Exclude tests from the gem release to reduce installation size and improve installation speed - [@michaelherold](https://github.com/michaelherold). * Your contribution here. ## [4.0.0] - 2019-10-30 diff --git a/hashie.gemspec b/hashie.gemspec index 507f388..e3c8a8b 100644 --- a/hashie.gemspec +++ b/hashie.gemspec @@ -14,8 +14,6 @@ Gem::Specification.new do |gem| gem.files = %w[.yardopts CHANGELOG.md CONTRIBUTING.md LICENSE README.md UPGRADING.md] gem.files += %w[Rakefile hashie.gemspec] gem.files += Dir['lib/**/*.rb'] - gem.files += Dir['spec/**/*.rb'] - gem.test_files = Dir['spec/**/*.rb'] if gem.respond_to?(:metadata) gem.metadata = { |