Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Custom FaradayMiddleware OAuth2 class name to avoid conflict with other gems implementing FaradayMiddleware OAuth2. #53

Merged
merged 1 commit into from Feb 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/faraday/oauth2.rb
Expand Up @@ -3,7 +3,7 @@
# @private
module FaradayMiddleware
# @private
class OAuth2 < Faraday::Middleware
class InstagramOAuth2 < Faraday::Middleware
def call(env)

if env[:method] == :get or env[:method] == :delete
Expand Down
2 changes: 1 addition & 1 deletion lib/instagram/connection.rb
Expand Up @@ -15,7 +15,7 @@ def connection(raw=false)
}

Faraday::Connection.new(options) do |connection|
connection.use FaradayMiddleware::OAuth2, client_id, access_token
connection.use FaradayMiddleware::InstagramOAuth2, client_id, access_token
connection.use Faraday::Request::UrlEncoded
connection.use FaradayMiddleware::Mashify unless raw
unless raw
Expand Down