1314151617181920212223242526272829303132333435 | # File 'lib/github_api/middleware.rb', line 13defself.default(options={})api=options[:api]procdo|builder|builder.useGithub::Request::Jsonizebuilder.useFaraday::Request::Multipartbuilder.useFaraday::Request::UrlEncodedbuilder.useGithub::Request::OAuth2,api.oauth_tokenifapi.oauth_token?builder.useGithub::Request::BasicAuth,api.authenticationifapi.basic_authed?builder.useGithub::Response::FollowRedirectsifapi.follow_redirectsbuilder.useFaraday::Response::LoggerifENV['DEBUG']unlessoptions[:raw]builder.useGithub::Response::Mashifybuilder.useGithub::Response::Jsonizebuilder.useGithub::Response::AtomParserendifapi.stackapi.stack.call(builder)endbuilder.useGithub::Response::RaiseErrorbuilder.adapteroptions[:adapter]endend |