lib/tijuana_client/client.rb in tijuana_client-0.2.2 vs lib/tijuana_client/client.rb in tijuana_client-0.2.3
- old
+ new
@@ -42,11 +42,13 @@
def setup
connection.stack do |builder|
builder.use Faraday::Request::Multipart
builder.use Faraday::Request::UrlEncoded
- builder.use Vertebrae::Request::BasicAuth, connection.configuration.authentication if connection.configuration.authenticated?
+ if connection.configuration.authenticated?
+ builder.use Faraday::Request::BasicAuthentication, connection.configuration.username, connection.configuration.password
+ end
builder.use Faraday::Response::Logger if ENV['DEBUG']
builder.use TijuanaClient::ErrorMiddleware
builder.adapter connection.configuration.adapter
@@ -61,6 +63,6 @@
else
return params
end
end
end
-end
\ No newline at end of file
+end