Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::GemcutterUtilities#request_with_otp
request_with_otp(method, uri, &block)
lib/rubygems/gemcutter_utilities.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/rubygems/gemcutter_utilities.rb, line 249
def request_with_otp(method, uri, &block)
request_method = Gem::Net::HTTP.const_get method.to_s.capitalize
Gem::RemoteFetcher.fetcher.request(uri, request_method) do |req|
req["OTP"] = otp if otp
block.call(req)
end
ensure
options[:otp] = nil if webauthn_enabled?
end
No documentation available
See also
#pretty_host
#rubygems_api_request
#otp
#set_api_key
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0