lib/puppetfile-resolver/util.rb in puppetfile-resolver-0.6.2 vs lib/puppetfile-resolver/util.rb in puppetfile-resolver-0.6.3
- old
+ new
@@ -27,10 +27,10 @@
# @param [nil, String, URI] proxy The URI of the proxy server to use. Defaults to nil (No proxy server)
# @return [Net::HTTPResponse] the response of the request
def self.net_http_get(uri, proxy = nil)
uri = URI.parse(uri) unless uri.is_a?(URI)
- http_options = { :use_ssl => uri.class == URI::HTTPS }
+ http_options = { :use_ssl => uri.instance_of?(URI::HTTPS) }
# Because on Windows Ruby doesn't use the Windows certificate store which has up-to date
# CA certs, we can't depend on someone setting the environment variable correctly. So use our
# static CA PEM file if SSL_CERT_FILE is not set.
http_options[:ca_file] = PuppetfileResolver::Util.static_ca_cert_file if ENV['SSL_CERT_FILE'].nil?