Class: AcmeManager::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/acme_manager/configuration.rb

Overview

All global configuration for AcmeManager client

Instance Attribute Summary collapse

Instance Attribute Details

#api_keyString

Returns The API key used to authenticate with acme-manager is running. Set via accessor or by reading environment variable ACME_MANAGER_API_KEY.

Raises:



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

#hostString

Returns The hostname where acme-manager is running. Set via accessor or by reading environment variable ACME_MANAGER_HOST.

Raises:



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_levelInteger



30
31
32
# File 'lib/acme_manager/configuration.rb', line 30

def log_level
  @log_level || Logger::WARNING
end

#log_pathIO



25
26
27
# File 'lib/acme_manager/configuration.rb', line 25

def log_path
  @log_path || STDOUT
end