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

simplify gemspec and ship less files #334

Merged
merged 1 commit into from
Feb 3, 2016
Merged

simplify gemspec and ship less files #334

merged 1 commit into from
Feb 3, 2016

Conversation

grosser
Copy link
Collaborator

@grosser grosser commented Jan 31, 2016

@@ -9,14 +6,11 @@ Gem::Specification.new do |spec|
spec.authors = ["Chris Wanstrath", "Scott Taylor", "Jeff Hodges", "Pat Nakajima", "Brian Donovan"]
spec.email = ["chris@ozmm.org"]
spec.description = %q{A fake filesystem. Use it in your tests.}
spec.summary = %q{A fake filesystem. Use it in your tests.}
spec.homepage = "http://github.com/defunkt/fakefs"
spec.summary = spec.description
Copy link
Contributor

Choose a reason for hiding this comment

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

Are both summary and description necessary? Would it be better to leave out one of them than simply duplicating?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

without description WARNING: no description specified
without summary ERROR: While executing gem ... (Gem::InvalidSpecificationException) missing value for attribute summary

so no :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I see

@bquorning
Copy link
Contributor

Looks good 👍

spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
spec.files = `git ls-files lib README.markdown LICENSE`.split($/)
Copy link
Contributor

Choose a reason for hiding this comment

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

Generally it is a good idea to also ship tests with a gem. Package maintainers of Linux distributions usually run tests as a part of the distro package building process.

See the Debian Ruby packaging team's notes on testing for an example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • all users will directly benefit from the smaller payload + smaller git size when vendored
  • Installing gems via packages is weird / uncommon -> very little impact
  • Most test suites do not run without proper bundling/setup so maintainers most likely cannot run them anyway
  • Lots of popular libraries do not sip test files -> if rails does not do it, we don't need to either

grosser added a commit that referenced this pull request Feb 3, 2016
simplify gemspec and ship less files
@grosser grosser merged commit e7cb709 into master Feb 3, 2016
@grosser grosser deleted the grosser/ship branch February 3, 2016 21:36
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