Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit spec files when building gem #1307

Merged
merged 4 commits into from
May 3, 2020
Merged

Conversation

dduugg
Copy link
Contributor

@dduugg dduugg commented Feb 3, 2020

Description

This reduces the gem size by ~20% (902k->738k) by omitting spec files (there may be further space optimizations in this style, this PR doesn't attempt to be comprehensive). This is inspired by the default implementation when creating a gem via bundle gem, which is:

`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }

I've also cleaned up .rubocop.yml to resolve local plugin errors. (Let me know if I've overstepped the PR scope and i'll cut it.)

Completed Tasks

  • I have read the Contributing Guide.
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 93.427% when pulling d4e05ed on dduugg:omit-spec-files into 872b3ac on lsegal:master.

@lsegal lsegal merged commit 76d63f5 into lsegal:master May 3, 2020
@lsegal
Copy link
Owner

lsegal commented May 3, 2020

Thanks for the fix!

lsegal added a commit that referenced this pull request May 3, 2020
@dduugg dduugg deleted the omit-spec-files branch August 25, 2022 00:27
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.

3 participants