apinstein / git-deployment

Capistrano recipe for a deployment workflow based on git tags
116 stars 43 forks source link

Build gem based on latest code - can anyone help? #3

Open apinstein opened 12 years ago

apinstein commented 12 years ago

Josh originally set this up with Jeweler. I don't know if that's the best/right way to do a gem in Ruby these days.

Can someone who knows please update the code for current best-practices in Ruby and help me build the gem?

Thanks!

mariovisic commented 12 years ago

You can keep jeweler if it's working for you. Bundler can also generate a raw skeleton for a gem, just run bundle gem. Perhaps try it out and then look at the gemspec and other files it creates.

jspooner commented 12 years ago

If your using bundler just add the project as a git source. See http://gembundler.com/git.html

jrochkind commented 12 years ago

This is a topic that seems to have it's partisans on different fronts. I like using the rake tasks provided by bundler for gem releasing myself. Rip out all the jeweler stuff, add one line (I could look up) requiring bundler's rake tasks into your Rakefile, then it's just "rake release".

You have to make sure the gemspec is up-to-date before doing a 'rake release', for instance up-to-date with it's file list. You can do that by making the file list dynamic ruby code (bundler's generator actually does a shell out to git file list; rail's generator does a ruby Dir glob instead), or by doing it manually or whatever.

technicalpickles commented 9 years ago

I'd just use bundler, as it's a bit simpler and more maintained. The easiest way to switch over is: