1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Refactor duplicate metadata logic

https://github.com/rubygems/rubygems/commit/1e5ef177ac
This commit is contained in:
Thomas McDonald 2020-04-28 17:44:45 +02:00 committed by Hiroshi SHIBATA
parent 856f2f31ff
commit 22030fe508
Notes: git 2020-05-08 14:14:24 +09:00

View file

@ -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