Created
May 7, 2012 13:37
-
-
Save nseo/2627811 to your computer and use it in GitHub Desktop.
Bundler with HTTP_PROXY/NO_PROXY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- lib/bundler/vendor/net/http/persistent.rb.orig 2012-05-07 06:19:19.629713946 -0700 | |
+++ lib/bundler/vendor/net/http/persistent.rb 2012-05-07 06:38:32.601764475 -0700 | |
@@ -2,6 +2,7 @@ | |
require 'net/http/faster' | |
require 'uri' | |
require 'cgi' # for escaping | |
+require 'http_configuration' | |
## | |
# Persistent connections for Net::HTTP | |
@@ -155,6 +156,9 @@ | |
def initialize name = nil, proxy = nil | |
@name = name | |
+ if no_proxy = ENV['NO_PROXY'] || ENV['no_proxy'] | |
+ Net::HTTP::Configuration.set_global :no_proxy => no_proxy | |
+ end | |
@proxy_uri = case proxy | |
when :ENV then proxy_from_env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment