Sha256: cba5fe1e53ffa82a4df27d36066447c57171308f438ee2b99f4110ea81019ed8
Contents?: true
Size: 582 Bytes
Versions: 2
Compression:
Stored size: 582 Bytes
Contents
# encoding: utf-8 module ProxyPacRb class ProxyPacTemplate private attr_reader :path public def initialize(path) @path = path end def path @path + '.in' end def content read_proxy_pac(path) end private def read_proxy_pac(path) uri = Addressable::URI.parse(path) uri.path = ::File.expand_path(uri.path) if uri.host.nil? ENV.delete 'HTTP_PROXY' ENV.delete 'HTTPS_PROXY' ENV.delete 'http_proxy' ENV.delete 'https_proxy' open(uri, proxy: false).read end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
proxy_pac_rb-0.3.8 | lib/proxy_pac_rb/proxy_pac_template |
proxy_pac_rb-0.3.7 | lib/proxy_pac_rb/proxy_pac_template |