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

Should the Gemfile be included in the release? #141

Closed
assistcontrol opened this issue Feb 17, 2018 · 4 comments
Closed

Should the Gemfile be included in the release? #141

assistcontrol opened this issue Feb 17, 2018 · 4 comments

Comments

@assistcontrol
Copy link

Most gems seem to include the Gemfile in the gem tarball. This makes it possible to do ex. bundle install. Could roda include the Gemfile in the roda.gemspec too?

@jeremyevans
Copy link
Owner

I'm not in favor of including Gemfile in the gem, as it adds to the size and very few people would use it. If you want to install the development dependencies, you should use the --development argument to gem install when installing the gem.

@assistcontrol
Copy link
Author

Understood. FWIW that doesn't work with FreeBSD or other systems that package gems. There the gem tarball is fetched directly, and without the Gemfile development dependencies must be hardcoded in the port's Makefile.

@jeremyevans
Copy link
Owner

If you can parse the dependency information out of the Gemfile, you can parse it out of the gem metadata:

tar xf roda-*.gem
gunzip metadata.gz
ruby -ryaml -e 'p YAML.load(File.read("metadata"))'

Also, Roda's Gemfile just includes the gemspec, and the gemspec is not included in the gem, so the Gemfile would not work if the gemspec wasn't also included. If we shipped the Gemfile without the gemspec, you would get:

$ bundle install --local

[!] There was an error parsing `Gemfile`: There are no gemspecs at /path/to/roda. Bundler cannot continue.

 #  from /data/code/roda/Gemfile:2
 #  -------------------------------------------
 #  source 'https://rubygems.org'
 >  gemspec
 #  -------------------------------------------

@assistcontrol
Copy link
Author

Ahh got it. Thanks for the explanation!

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

No branches or pull requests

2 participants