lib/excon/middlewares/expects.rb in excon-0.62.0 vs lib/excon/middlewares/expects.rb in excon-0.63.0

- old
+ new

@@ -1,8 +1,14 @@ # frozen_string_literal: true module Excon module Middleware class Expects < Excon::Middleware::Base + def self.valid_parameter_keys + [ + :expects + ] + end + def response_call(datum) if datum.has_key?(:expects) && ![*datum[:expects]].include?(datum[:response][:status]) raise( Excon::Errors.status_error( datum.reject {|key,value| key == :response},