Skip to content

Commit

Permalink
Only pass proxy to Faraday if explicitly set
Browse files Browse the repository at this point in the history
Allows Faraday to fall back to ENV['http_proxy']
Closes #157
  • Loading branch information
pengwynn committed Oct 15, 2012
1 parent 1426822 commit 55a18f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/octokit/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down

0 comments on commit 55a18f0

Please sign in to comment.