Browse files

Only pass proxy to Faraday if explicitly set

Allows Faraday to fall back to ENV['http_proxy']
Closes #157
  • Loading branch information...
1 parent 1426822 commit 55a18f0e842b1118f9a2afe2dd95b99fa361ffac @pengwynn pengwynn committed Oct 15, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/octokit/connection.rb
View
3 lib/octokit/connection.rb
@@ -13,11 +13,12 @@ def connection(authenticate=true, raw=false, version=3, force_urlencoded=false)
end
options = {
- :proxy => proxy,
:ssl => { :verify => false },
:url => url,
}
+ options[:proxy] = proxy unless proxy.nil?
+
options.merge!(:params => {:access_token => oauth_token}) if oauthed? && !authenticated?
options.merge!(:params => unauthed_rate_limit_params) if !oauthed? && !authenticated? && unauthed_rate_limited?

0 comments on commit 55a18f0

Please sign in to comment.