ruby-ore / ore

Mine beautiful RubyGems from Ore
MIT License
241 stars 29 forks source link

Generated Gemfile Too Full? #17

Closed benhamill closed 12 years ago

benhamill commented 12 years ago

It's my understanding that, for a gem, your Gemfile should always look like this (in its entirety):

source :rubygems

gemspec

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?

postmodern commented 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.

benhamill commented 12 years ago

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?

postmodern commented 12 years ago

Ah ha, you are correct. There is a --development option to install the additional dependencies. I say go for it.

benhamill commented 12 years ago

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:

postmodern commented 12 years ago

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! :)

postmodern commented 11 years ago

Released in 0.9.4!