Module: AcmeManager
- Defined in:
- lib/acme_manager.rb,
lib/acme_manager/request.rb,
lib/acme_manager/version.rb,
lib/acme_manager/certificate.rb,
lib/acme_manager/configuration.rb,
lib/acme_manager/issue_request.rb,
lib/acme_manager/middleware/forward_verification_challenge.rb
Defined Under Namespace
Modules: Middleware Classes: Certificate, Configuration, Error, IssueRequest, Request
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.config ⇒ Configuration
The current configuration (or new if uninitialized).
-
.configure {|Current| ... } ⇒ Configuration
Pass a block to configure the AcmeManager client.
-
.issue(name) ⇒ IssueRequest
Instruct the acme-manager to issue a new certificate.
-
.list ⇒ Array<Certificate>
Get a list of certificates currently managed by the acme-manager.
- .logger ⇒ Object
-
.logger=(new_logger) ⇒ Object
Allow a custom logger to be set instead of configuring our own.
Class Method Details
.config ⇒ Configuration
Returns The current configuration (or new if uninitialized).
11 12 13 |
# File 'lib/acme_manager.rb', line 11 def self.config @config ||= Configuration.new end |
.configure {|Current| ... } ⇒ Configuration
Pass a block to configure the AcmeManager client
20 21 22 23 |
# File 'lib/acme_manager.rb', line 20 def self.configure yield config config end |
.issue(name) ⇒ IssueRequest
Instruct the acme-manager to issue a new certificate
37 38 39 |
# File 'lib/acme_manager.rb', line 37 def self.issue(name) IssueRequest.make(name) end |
.list ⇒ Array<Certificate>
Get a list of certificates currently managed by the acme-manager
28 29 30 |
# File 'lib/acme_manager.rb', line 28 def self.list Certificate.all end |
.logger ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/acme_manager.rb', line 41 def self.logger @logger ||= begin logger = Logger.new(config.log_path) logger.level = config.log_level logger end end |
.logger=(new_logger) ⇒ Object
Allow a custom logger to be set instead of configuring our own
52 53 54 |
# File 'lib/acme_manager.rb', line 52 def self.logger=(new_logger) @logger = new_logger end |