diff options
author | Thomas McDonald <[email protected]> | 2020-04-28 17:44:45 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-05-08 14:13:29 +0900 |
commit | 22030fe508603652c3c3e975f3927859dc4fa85c (patch) | |
tree | 7ae649a2d2ef6942c3cc628ef5f03e0ed1d71196 /lib/rubygems/commands/push_command.rb | |
parent | 856f2f31ffebd070405821dd41fca9c67fd5cced (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/rubygems/commands/push_command.rb')
-rw-r--r-- | lib/rubygems/commands/push_command.rb | 8 |
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 |