Created
July 28, 2009 10:29
-
-
Save masaki/157083 to your computer and use it in GitHub Desktop.
RubyGems with HTTP_PROXY/NO_PROXY
This file contains hidden or 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
--- rubygems/remote_fetcher.rb.orig 2009-07-28 19:01:30.000000000 +0900 | |
+++ rubygems/remote_fetcher.rb 2009-07-28 19:05:47.000000000 +0900 | |
@@ -4,6 +4,7 @@ | |
require 'uri' | |
require 'rubygems' | |
+require 'http_configuration' | |
## | |
# RemoteFetcher handles the details of fetching gems and gem information from | |
@@ -57,6 +58,9 @@ | |
def initialize(proxy = nil) | |
Socket.do_not_reverse_lookup = true | |
+ if no_proxy = ENV['NO_PROXY'] || ENV['no_proxy'] | |
+ Net::HTTP::Configuration.set_global :no_proxy => no_proxy | |
+ end | |
@connections = {} | |
@requests = Hash.new 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment