summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas McDonald <thomasm@palantir.com>2020-04-28 17:44:45 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 14:13:29 +0900
commit22030fe508603652c3c3e975f3927859dc4fa85c (patch)
tree7ae649a2d2ef6942c3cc628ef5f03e0ed1d71196 /lib
parent856f2f31ffebd070405821dd41fca9c67fd5cced (diff)
[rubygems/rubygems] Refactor duplicate metadata logic
https://github.com/rubygems/rubygems/commit/1e5ef177ac
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3092
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