lib/peddler/client.rb in peddler-1.2.0 vs lib/peddler/client.rb in peddler-1.3.0
- old
+ new
@@ -23,11 +23,11 @@
# The body of the HTTP request
# @return [String]
attr_reader :body
- alias_method :configure, :tap
+ alias configure tap
def_delegators :marketplace, :host, :encoding
params(
'SellerId' => -> { merchant_id },
@@ -55,12 +55,12 @@
def version(version = nil)
version ? @version = version : @version
end
# Sets an error handler
- # @yieldparam request [Excon::Request]
- # @yieldparam response [Excon::Response]
+ # @yieldparam [Excon::Request] request
+ # @yieldparam [Excon::Response] response
def on_error(&blk)
@error_handler = blk
end
private
@@ -75,11 +75,11 @@
@error_handler = proc { fail }
# Creates a new client instance
#
- # @param opts [Hash]
+ # @param [Hash] opts
# @option opts [String] :primary_marketplace_id
# @option opts [String] :merchant_id
# @option opts [String] :aws_access_key_id
# @option opts [String] :aws_secret_access_key
# @option opts [String] :auth_token
@@ -153,12 +153,12 @@
def headers
@headers ||= {}
end
# Sets an error handler
- # @yieldparam request [Excon::Request]
- # @yieldparam response [Excon::Response]
+ # @yieldparam [Excon::Request] request
+ # @yieldparam [Excon::Response] response
def on_error(&blk)
@error_handler = blk
end
# @api private
@@ -222,10 +222,10 @@
e
end
def deprecate_error_handler_arguments(e)
if error_handler.parameters.size == 2
- warn "[DEPRECATION] Error handler now expects exception as argument."
+ warn '[DEPRECATION] Error handler now expects exception as argument.'
[e.request, e.response]
else
[e]
end
end