Closed benhamill closed 12 years ago
The reason the development dependencies are listed in the Gemfile
are to prevent them from being installed with the gem. If someone needs to open up the gem for development, they would run bundle install
. I do list some development dependencies in the gemspec
, like yard
(so YARD documentation gets generated upon install) and bundler
.
Maybe I'm misunderstanding something, but... I thought that the point of the add_development_dependency
method was that, unlike add_dependency
, it won't cause a normal user to install it when they gem install
. Is that wrong?
Ah ha, you are correct. There is a --development
option to install the additional dependencies. I say go for it.
OK. So here's a first stab. I wasn't confident about what the includes
blocks were about in Gemfile.erb
, so I left them. I'd love a little teaching on what those are. And whether I should remove them. Let me know if I'd stepped off the path here or whatever. Thanks. :smile:
Merged into master and hopefully can release this in the next patch version. Made additional minor simplifications, seems to generate fully working bundlered gems. Thanks! :)
Released in 0.9.4!
It's my understanding that, for a gem, your
Gemfile
should always look like this (in its entirety):If there are dependencies (even just development ones), you should then declare those in your gemspec. Yehuda talked about it in a blog post.
How would y'all feel if I put together a pull request moving the dev dependencies from the generated
Gemfile
into the gemspec?