lib/github_api/connection.rb in github_api-0.1.1 vs lib/github_api/connection.rb in github_api-0.1.2

- old
+ new

@@ -4,10 +4,11 @@ require 'github_api/response' require 'github_api/response/mashify' require 'github_api/response/jsonize' require 'github_api/response/raise_error' require 'github_api/request/oauth2' +require 'github_api/request/basic_auth' module Github module Connection # Available resources @@ -71,20 +72,20 @@ builder.use Faraday::Request::Multipart builder.use Faraday::Request::UrlEncoded builder.use Faraday::Response::Logger builder.use Github::Request::OAuth2, oauth_token if oauth_token? + builder.use Github::Request::BasicAuth, login, password if login? && password? unless options[:raw] builder.use Github::Response::Mashify builder.use Github::Response::Jsonize end builder.use Github::Response::RaiseError builder.adapter adapter end end - end end # Connection end # Github