Sha256: a0bcd9c039dc2ff83de7ed5fcc6e2ba4b8ca88d6e2cbac8e520f4aa7d654ae9c

Contents?: true

Size: 582 Bytes

Versions: 6

Compression:

Stored size: 582 Bytes

Contents

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(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
    "https://curl.haxx.se/ca/cacert.pem"
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cacert-0.8.0 lib/cacert.rb
cacert-0.7.0 lib/cacert.rb
cacert-0.6.0 lib/cacert.rb
cacert-0.5.0 lib/cacert.rb
cacert-0.4.0 lib/cacert.rb
cacert-0.3.0 lib/cacert.rb