git-deployment icon indicating copy to clipboard operation
git-deployment copied to clipboard

Build gem based on latest code - can anyone help?

Open apinstein opened this issue 14 years ago • 4 comments

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!

apinstein avatar Nov 08 '11 16:11 apinstein

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.

mariovisic avatar Nov 30 '11 10:11 mariovisic

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

jspooner avatar Jan 24 '12 16:01 jspooner

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.

jrochkind avatar Apr 05 '12 22:04 jrochkind

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

  • bundler gem capistrano-gitflow
  • copy things out of Jeweler::Tasks in Rakefile to the generated capistrano-gitflow/capistrano-gitflow.gemspec
  • move generated capistrano-gitflow Gemfile, Rakefile, capistrano-gitflow.gemspec into the repository
  • commit, merge, and then do the rake release dance

technicalpickles avatar Aug 17 '15 13:08 technicalpickles