Class: Certman::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/certman/cli.rb

Instance Method Summary collapse

Instance Method Details

#delete(domain) ⇒ Object



17
18
19
20
21
# File 'lib/certman/cli.rb', line 17

def delete(domain)
  Certman::Client.new(domain).delete_certificate
  puts 'Done.'
  puts ''
end

#request(domain) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/certman/cli.rb', line 4

def request(domain)
  pastel = Pastel.new
  prompt = TTY::Prompt.new
  return unless prompt.yes?(pastel.red('NOTICE! Certman support *us-east-1* only, now. OK?'))
  return unless prompt.yes?(pastel.red('NOTICE! When requesting, Certman replace Active Receipt Rule Set. OK?'))
  cert_arn = Certman::Client.new(domain).request_certificate
  puts 'Done.'
  puts ''
  puts "certificate_arn: #{pastel.cyan(cert_arn)}"
  puts ''
end