summaryrefslogtreecommitdiff
path: root/lib/bundler/gem_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/gem_helper.rb')
-rw-r--r--lib/bundler/gem_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index d468194538..99d4194edf 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -94,7 +94,7 @@ module Bundler
if Pathname.new("~/.gem/credentials").expand_path.exist?
allowed_push_host = nil
gem_command = "gem push '#{path}'"
- if spec.respond_to?(:metadata)
+ if @gemspec.respond_to?(:metadata)
allowed_push_host = @gemspec.metadata["allowed_push_host"]
gem_command << " --host #{allowed_push_host}" if allowed_push_host
end