Class: LetsencryptHeroku::Process::PrepareConfig
- Inherits:
-
Object
- Object
- LetsencryptHeroku::Process::PrepareConfig
show all
- Includes:
- Tools
- Defined in:
- lib/letsencrypt_heroku/process/prepare_config.rb
Instance Method Summary
collapse
Methods included from Tools
#banner, #error, #execute, #log, #output
Instance Method Details
5
6
7
8
9
10
11
12
13
|
# File 'lib/letsencrypt_heroku/process/prepare_config.rb', line 5
def perform(context)
config = context.config
config.domains = config.domains.to_s.split
config.heroku_certificate_app ||= config.heroku_app
config.heroku_challenge_app ||= config.heroku_app
validate_config(config)
context
end
|
#validate_config(config) ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'lib/letsencrypt_heroku/process/prepare_config.rb', line 15
def validate_config(config)
if config.domains.empty?
error('Please provide `domains`')
end
unless config.heroku_certificate_app && config.heroku_challenge_app
error('Please provide `heroku_app`')
end
end
|