Class: LetsencryptStandalone::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/letsencrypt_standalone/base.rb

Direct Known Subclasses

Certificate, Client, Config, Domain

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.logger(log_destination: STDOUT) ⇒ Object



7
8
9
10
11
# File 'lib/letsencrypt_standalone/base.rb', line 7

def logger(log_destination: STDOUT)
  @@logger = Logger.new(log_destination)
  @@logger.level = Logger::INFO
  @@logger
end

Instance Method Details

#endpoint_urlObject



18
19
20
# File 'lib/letsencrypt_standalone/base.rb', line 18

def endpoint_url
  ENV['LE_ENVIRONMENT'] == 'staging' ? STAGE_URL : PROD_URL
end

#loggerObject



14
15
16
# File 'lib/letsencrypt_standalone/base.rb', line 14

def logger
  @@logger
end

#output_dirObject



22
23
24
# File 'lib/letsencrypt_standalone/base.rb', line 22

def output_dir
  File.join(path, ssl_subdir)
end

#pathObject



30
31
32
# File 'lib/letsencrypt_standalone/base.rb', line 30

def path
  @path ||= LetsencryptStandalone::Config.config[:path]
end

#ssl_subdirObject



26
27
28
# File 'lib/letsencrypt_standalone/base.rb', line 26

def ssl_subdir
  @ssl_subdir ||= LetsencryptStandalone::Config.ssl_subdir
end