Created
February 7, 2014 00:54
-
-
Save tylerhunt/8855577 to your computer and use it in GitHub Desktop.
Monkey-patch for Bundler's release Rake task to push to Gemfury instead of RubyGems.org.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org/' | |
gem 'gemfury', '~> 0.4.20' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/gem_tasks' | |
require 'gemfury' | |
require 'gemfury/command' | |
GEMFURY_ACCOUNT = '<Gemfury account>' | |
# Monkey patch the Bundler Rake task helpers to push the released gem to | |
# Gemfury instead of RubyGems.org. | |
module Bundler | |
class GemHelper | |
unless instance_methods.include?(:rubygem_push) | |
fail 'Rake task monkey patch misapplied' | |
end | |
def rubygem_push(path, account=GEMFURY_ACCOUNT) | |
::Gemfury::Command::App.start(['push', path, "--as=#{GEMFURY_ACCOUNT}"]) | |
Bundler.ui.confirm "Pushed #{name} #{version} to Gemfury as #{account}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What format does the < Gemfury account > value take?