Class: AcmeManager::Configuration
- Inherits:
-
Object
- Object
- AcmeManager::Configuration
- Defined in:
- lib/acme_manager/configuration.rb
Overview
All global configuration for AcmeManager client
Instance Attribute Summary collapse
-
#api_key ⇒ String
The API key used to authenticate with acme-manager is running.
-
#host ⇒ String
The hostname where acme-manager is running.
-
#log_level ⇒ Integer
Severity level to write logs at.
-
#log_path ⇒ IO
Where log output should be written to.
Instance Attribute Details
#api_key ⇒ String
Returns The API key used to authenticate with acme-manager is running. Set via accessor or by reading environment variable ACME_MANAGER_API_KEY.
19 20 21 22 |
# File 'lib/acme_manager/configuration.rb', line 19 def api_key @api_key || ENV['ACME_MANAGER_API_KEY'] || raise(Error, "`api_key` has not been configured. Set it using the " \ "`AcmeManager.configure` block or use the `ACME_MANAGER_API_KEY` environment variable") end |
#host ⇒ String
Returns The hostname where acme-manager is running. Set via accessor or by reading environment variable ACME_MANAGER_HOST.
10 11 12 13 |
# File 'lib/acme_manager/configuration.rb', line 10 def host @host || ENV['ACME_MANAGER_HOST'] || raise(Error, "`host` has not been configured. Set it using the " \ "`AcmeManager.configure` block or use the `ACME_MANAGER_HOST` environment variable") end |
#log_level ⇒ Integer
Returns Severity level to write logs at. Logger::WARNING by default.
30 31 32 |
# File 'lib/acme_manager/configuration.rb', line 30 def log_level @log_level || Logger::WARNING end |
#log_path ⇒ IO
Returns Where log output should be written to. STDOUT by default.
25 26 27 |
# File 'lib/acme_manager/configuration.rb', line 25 def log_path @log_path || STDOUT end |