Skip to content

Commit

Permalink
Remove Gem::Specification#test_files= to reduce gem package size
Browse files Browse the repository at this point in the history
`Gem::Specification#test_files=` is no longer recommended.
rubygems/guides#90

And it increases gem package size because the option adds test files to
the package.

So I think we should avoid using `test_files=` option.

---

It reduces 4.7MB package size on my local.

before

```bash
$ du graphiql-rails-1.7.0/ --summarize
6.7M    graphiql-rails-1.7.0/
```

after

```bash
$ du graphiql-rails-1.7.0/ --summarize
2.0M    graphiql-rails-1.7.0/
```
  • Loading branch information
pocke committed Sep 25, 2020
1 parent 5770e77 commit 29dd157
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion graphiql-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 2.1.0' # bc optional keyword args

s.files = Dir["{app,config,lib}/**/*"]
s.test_files = Dir["test/**/*"]

s.add_runtime_dependency "railties"
s.add_runtime_dependency "sprockets-rails"
Expand Down

0 comments on commit 29dd157

Please sign in to comment.