Skip to content

Don't ship tests in the gem - #877

Merged
taketo1113 merged 1 commit into
javan:mainfrom
sampokuokkanen:gemspec-without-tests
Oct 21, 2026
Merged

taketo1113 merged 1 commit into
javan:mainfrom
sampokuokkanen:gemspec-without-tests

Conversation

@sampokuokkanen

Copy link
Copy Markdown
Contributor

The gem currently packs everything git ls-files lists, including test/ (about 90 KB unpacked; 40 KB → 28 KB packed), which isn't needed at runtime and ends up in every installation, e.g. production Docker images.

This keeps the gemspec in its Bundler-template shape (per #804) and does what the template does: test/ is rejected from spec.files. spec.test_files is removed, as RubyGems ignores it and the template no longer has it.

test_files seems to be deprecated: rubygems/guides#90

Bundler's gem template leaves test/ out of spec.files; the tests aren't
needed at runtime. spec.test_files is ignored by RubyGems, so it goes too.
@taketo1113
taketo1113 merged commit f8ead97 into javan:main Oct 21, 2026
67 checks passed
@taketo1113

Copy link
Copy Markdown
Collaborator

Nice catch! Thank you.

@taketo1113

Copy link
Copy Markdown
Collaborator

I have released v1.1.4. Please check it out.
https://github.com/javan/whenever/releases/tag/v1.1.4

@sampokuokkanen

Copy link
Copy Markdown
Contributor Author

Thanks! I confirmed that the package size has gone down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants