lib/mrkt/concerns/connection.rb in mrkt-0.9.0 vs lib/mrkt/concerns/connection.rb in mrkt-0.10.0

- old
+ new

@@ -9,19 +9,16 @@ def init_connection Faraday.new(url: "https://#{@host}") do |conn| conn.request :multipart conn.request :url_encoded - if @debug - conn.response :logger, @logger, (@log_options || {}) - end - + conn.response :logger, @logger, (@log_options || {}) if @debug conn.response :mkto, content_type: /\bjson$/ conn.options.timeout = @options[:read_timeout] if @options.key?(:read_timeout) conn.options.open_timeout = @options[:open_timeout] if @options.key?(:open_timeout) - conn.adapter Faraday.default_adapter + conn.adapter @options.fetch(:adapter, Faraday.default_adapter) end end end end