Module: Cacert
- Defined in:
- lib/cacert.rb,
lib/cacert/version.rb
Constant Summary collapse
- VERSION =
"0.8.0"
Class Method Summary collapse
-
.pem ⇒ Object
Returns the path of the embedded cacert.pem SSL certificates file.
-
.set_in_env ⇒ Object
Sets the SSL_CERT_FILE environment variable to the location of the cacert.pem file.
-
.share_dir ⇒ Object
Returns the directory containing the cacert.pem file.
-
.source ⇒ Object
The link which cacert.pem can be downloaded from.
Class Method Details
.pem ⇒ Object
Returns the path of the embedded cacert.pem SSL certificates file.
10 11 12 |
# File 'lib/cacert.rb', line 10 def self.pem File.join(share_dir, 'cacert.pem') end |
.set_in_env ⇒ Object
Sets the SSL_CERT_FILE environment variable to the location of the cacert.pem file.
15 16 17 |
# File 'lib/cacert.rb', line 15 def self.set_in_env ENV['SSL_CERT_FILE'] = self.pem.to_s end |
.share_dir ⇒ Object
Returns the directory containing the cacert.pem file.
5 6 7 |
# File 'lib/cacert.rb', line 5 def self.share_dir File.('../share', __dir__) end |
.source ⇒ Object
The link which cacert.pem can be downloaded from.
20 21 22 |
# File 'lib/cacert.rb', line 20 def self.source "https://curl.haxx.se/ca/cacert.pem" end |