lib/faraday/retry/middleware.rb in faraday-retry-2.2.0 vs lib/faraday/retry/middleware.rb in faraday-retry-2.2.1
- old
+ new
@@ -93,12 +93,12 @@
# each successive retry's interval amount by in order to provide backoff
# @option options [Array] :exceptions ([ Errno::ETIMEDOUT,
# 'Timeout::Error', Faraday::TimeoutError, Faraday::RetriableResponse])
# The list of exceptions to handle. Exceptions can be given as
# Class, Module, or String.
- # @option options [Array] :methods (the idempotent HTTP methods
- # in IDEMPOTENT_METHODS) A list of HTTP methods to retry without
+ # @option options [Array<Symbol>] :methods (the idempotent HTTP methods
+ # in IDEMPOTENT_METHODS) A list of HTTP methods, as symbols, to retry without
# calling retry_if. Pass an empty Array to call retry_if
# for all exceptions.
# @option options [Block] :retry_if (false) block that will receive
# the env object and the exception raised
# and should decide if the code should retry still the action or
@@ -207,14 +207,14 @@
@options.methods.include?(env[:method]) ||
@options.retry_if.call(env, exception)
end
def rewind_files(body)
- return unless defined?(UploadIO)
+ return unless defined?(Faraday::UploadIO)
return unless body.is_a?(Hash)
body.each do |_, value|
- value.rewind if value.is_a?(UploadIO)
+ value.rewind if value.is_a?(Faraday::UploadIO)
end
end
# RFC for RateLimit Header Fields for HTTP:
# https://www.ietf.org/archive/id/draft-ietf-httpapi-ratelimit-headers-05.html#name-fields-definition