diff options
Diffstat (limited to 'lib/rubygems/commands/push_command.rb')
-rw-r--r-- | lib/rubygems/commands/push_command.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/rubygems/commands/push_command.rb b/lib/rubygems/commands/push_command.rb index 7fd1119ff9..41e6c7ec30 100644 --- a/lib/rubygems/commands/push_command.rb +++ b/lib/rubygems/commands/push_command.rb @@ -119,22 +119,18 @@ You can upgrade or downgrade to the latest release version with: response = send_push_request(name, args) - if need_otp? response - response = send_push_request(name, args, true) - end - with_response response end private - def send_push_request(name, args, use_otp = false) + def send_push_request(name, args) rubygems_api_request(*args) do |request| request.body = Gem.read_binary name request.add_field "Content-Length", request.body.size request.add_field "Content-Type", "application/octet-stream" request.add_field "Authorization", api_key - request.add_field "OTP", options[:otp] if use_otp + request.add_field "OTP", options[:otp] if options[:otp] end end |