lib/cacert.rb in cacert-0.2.0 vs lib/cacert.rb in cacert-0.3.0

- old
+ new

@@ -1,18 +1,24 @@ require "cacert/version" module Cacert + # Returns the directory containing the cacert.pem file. + def self.share_dir + File.expand_path('../share', __dir__) + end # Returns the path of the embedded cacert.pem SSL certificates file. def self.pem - File.join(File.dirname(__FILE__), '..', 'share', 'cacert.pem') + File.join(share_dir, 'cacert.pem') end + # Sets the SSL_CERT_FILE environment variable to the location of the cacert.pem file. def self.set_in_env ENV['SSL_CERT_FILE'] = self.pem.to_s end + # The link which cacert.pem can be downloaded from. def self.source - "http://curl.haxx.se/ca/cacert.pem" + "https://curl.haxx.se/ca/cacert.pem" end end