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:
parent
856f2f31ff
commit
22030fe508
Notes:
git
2020-05-08 14:14:24 +09:00
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue