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

Remove redundant files from gem distribution #810

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

pirj
Copy link
Member

@pirj pirj commented Aug 18, 2019

It's hard to tell why spec files were shipped with a gem, but that doesn't seem to be necessary.

Shipping of Gemfile (that is intended to be used for local development), and especially gemspec file is unnecessary as well.

Rakefile is not useful except for local RuboCop-RSpec development.

There doesn't seem to be any mention of test_files option in gem specification reference,
most probably it's a legacy option.


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • [-] Added an entry to the changelog if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

It's hard to tell why spec files were shipped with a gem, but that
doesn't seem to be necessary.

Shipping of Gemfile (that is intended to be used for local development),
and especially gemspec file is unnecessary as well.

Rakefile is not useful except for local RuboCop-RSpec development.

There doesn't seem to be any mention of `test_files` option in gem
specification reference
(https://guides.rubygems.org/specification-reference/#extra_rdoc_files),
most probably it's a legacy option.
]
spec.test_files = spec.files.grep(%r{^spec/})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found this https://github.com/rubygems/rubygems/blob/77942c17384ed4a3f194f50d6e8dc64ffedca90c/History.txt#L1466

And also this back from 2014 rubygems/guides#90 (comment)

In relation to why the setting of this option still works is:

Starting in RubyGems 2.0, a Specification can hold arbitrary metadata.

@bquorning bquorning merged commit 89e1bd2 into rubocop:master Aug 18, 2019
@pirj pirj deleted the drop-specs-from-gem branch August 18, 2019 20:54
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