lib/httpx/timeout.rb in httpx-0.6.3 vs lib/httpx/timeout.rb in httpx-0.6.4
- old
+ new
@@ -8,11 +8,11 @@
OPERATION_TIMEOUT = 60
def self.new(opts = {})
return opts if opts.is_a?(Timeout)
- super
+ super(**opts)
end
attr_reader :connect_timeout, :operation_timeout, :total_timeout
def initialize(connect_timeout: CONNECT_TIMEOUT,
@@ -23,11 +23,13 @@
@operation_timeout = operation_timeout
@total_timeout = total_timeout
return unless loop_timeout
+ # :nocov:
warn ":loop_timeout is deprecated, use :operation_timeout instead"
@operation_timeout = loop_timeout
+ # :nocov:
end
def ==(other)
if other.is_a?(Timeout)
@connect_timeout == other.instance_variable_get(:@connect_timeout) &&