lib/rubygems_plugin.rb in rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.62 vs lib/rubygems_plugin.rb in rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.63
- old
+ new
@@ -39,10 +39,21 @@
if Gem::Version.new(Gem::VERSION) < Gem::Version.new('2.1.0') then
class Gem::RemoteFetcher
+ unless self.method_defined? no_proxy? then
+ def no_proxy? host
+ host = host.downcase
+ get_no_proxy_from_env.each do |pattern|
+ pattern = pattern.downcase
+ return true if host[-pattern.length, pattern.length ] == pattern
+ end
+ return false
+ end
+ end
+
def connection_for(uri)
net_http_args = [uri.host, uri.port]
puts "running patched connection_for"
if @proxy_uri and not no_proxy?(uri.host) then
@@ -115,18 +126,8 @@
end
def https?(uri)
uri.scheme.downcase == 'https'
end
-
- unless self.method_defined? no_proxy? then
- def no_proxy? host
- host = host.downcase
- get_no_proxy_from_env.each do |pattern|
- pattern = pattern.downcase
- return true if host[-pattern.length, pattern.length ] == pattern
- end
- return false
- end
- end
+
end
end