vigetlabs/garb — pull request #109 by KentonWhite (2011-12-20 21:36:28+00:00)
Title: Support for OAuth2::Response

Google API now supports OAuth2. The OAuth2 gem uses Faraday wrapped by its own OAuth2::Response class. This class behaves differently than Net::HTTP that the OAuth gem depends on. The key difference is that OAuth2::Response exposes a method OAuth2::Response#status that returns the status code for the request.

Modified Garb::Request::Data##send_request to check for Net::HTTPSuccess or status = 200 on the response. If neither are present, raise ClientError and return the body of the response.