summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/commands/push_command.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/rubygems/commands/push_command.rb b/lib/rubygems/commands/push_command.rb
index 0c121cb553..dadd397a2a 100644
--- a/lib/rubygems/commands/push_command.rb
+++ b/lib/rubygems/commands/push_command.rb
@@ -70,13 +70,7 @@ The push command will use ~/.gem/credentials to authenticate to a server, but yo
def send_gem(name)
args = [:post, "api/v1/gems"]
- gem_data = Gem::Package.new(name)
-
- push_host = nil
-
- if gem_data.spec.metadata.has_key?('allowed_push_host')
- push_host = gem_data.spec.metadata['allowed_push_host']
- end
+ _, push_host = get_hosts_for(name)
@host ||= push_host