diff options
author | Martin Englund <martin@englund.nu> | 2015-08-28 13:37:48 -0700 |
---|---|---|
committer | Martin Englund <martin@englund.nu> | 2015-08-28 13:37:48 -0700 |
commit | 7e0373df9af012fbf7c534171bc18d8aeda42510 (patch) | |
tree | a076b95881282cb7c06392567a5aff017cf01bfc /lib/bundler/gem_helper.rb | |
parent | fa9c4e2343ebeaaa4e0eb62c41327eba37cca9ee (diff) | |
download | bundler-7e0373df9af012fbf7c534171bc18d8aeda42510.tar.gz |
make it able to specify gem host with GEM_HOST env
Diffstat (limited to 'lib/bundler/gem_helper.rb')
-rw-r--r-- | lib/bundler/gem_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index ab7bcc27..de1e3fa5 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -92,7 +92,9 @@ module Bundler def rubygem_push(path) if Pathname.new("~/.gem/credentials").expand_path.exist? - sh("gem push '#{path}'") + gem_command = "gem push '#{path}'" + gem_command << " --host #{ENV['GEM_HOST']}" if ENV['GEM_HOST'] + sh(gem_command) Bundler.ui.confirm "Pushed #{name} #{version} to rubygems.org." else raise "Your rubygems.org credentials aren't set. Run `gem push` to set them." |