I really like using [Jeweler] 1 to create and manage gems, but its default
behavior is to publish your gem to [rubygems.org] 2 whenever you run rake release. This is great for generally useful libraries that you want to
open-source, but not as great when you want to use gems as shared libraries for
internal use only (whether because the code contains business secrets or just
because it's not something that would be useful to the community at large.)
After a bit of poking around, I figured out how to use Jeweler to manage
your versioning, gemspec and git tagging without pushing the result to
rubygems.org when running the release task. It turns out to be both obvious and
trivial. Just add the following line to the end of your gem project's
Rakefile:
Rake::Task[:release].prerequisites.delete('gemcutter:release')
Comments
Comments are powered by Giscus via GitHub Discussions. You must have a GitHub account to comment.