6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/certman/cli.rb', line 6
def request(domain)
pastel = Pastel.new
prompt = TTY::Prompt.new
return unless prompt.yes?(pastel.red("NOTICE! Your selected region is *#{Aws.config[:region]}*. \
Certman create certificate on *#{Aws.config[:region]}*. OK?"))
client = Certman::Client.new(domain, options)
return unless prompt.yes?(pastel.red("NOTICE! Certman use *#{client.region_by_hash}* S3/SES. OK?"))
return unless prompt.yes?(pastel.red("NOTICE! When requesting, Certman apend Receipt Rule to current Active \
Receipt Rule Set. OK?"))
Signal.trap(:INT) do
puts ''
puts pastel.red('Rollback start.')
client.rollback
end
cert_arn = client.request
puts 'Done.'
puts ''
puts "certificate_arn: #{pastel.cyan(cert_arn)}"
puts ''
end
|