lib/tumblr/connection.rb in tumblr_client-0.6.1 vs lib/tumblr/connection.rb in tumblr_client-0.6.5

- old
+ new

@@ -1,7 +1,7 @@ require 'faraday' -require 'faraday_stack' +require 'faraday_middleware' require 'tumblr/request/oauth' module Tumblr module Connection def connection(options={}) @@ -11,12 +11,12 @@ :user_agent => "Tumblr v1.0" }, :url => "http://api.tumblr.com/" } Faraday.new("http://api.tumblr.com/", default_options.merge(options)) do |builder| - builder.use FaradayStack::ResponseJSON, content_type: "application/json" builder.use Tumblr::Request::TumblrOAuth, Tumblr::credentials if not Tumblr::credentials.empty? builder.use Faraday::Request::UrlEncoded + builder.use FaradayMiddleware::ParseJson, :content_type => "application/json" builder.use Faraday::Adapter::NetHttp end end end end