Class: Acmesmith::ChallengeResponders::ManualDns

Inherits:
Base
  • Object
show all
Defined in:
lib/acmesmith/challenge_responders/manual_dns.rb

Defined Under Namespace

Classes: AmbiguousHostedZones, HostedZoneNotFound

Instance Method Summary collapse

Methods inherited from Base

#applicable?, #cap_respond_all?, #cleanup_all, #respond_all

Constructor Details

#initialize(options = {}) ⇒ ManualDns

Returns a new instance of ManualDns.



14
15
# File 'lib/acmesmith/challenge_responders/manual_dns.rb', line 14

def initialize(options={})
end

Instance Method Details

#cleanup(domain, challenge) ⇒ Object



32
33
34
35
36
# File 'lib/acmesmith/challenge_responders/manual_dns.rb', line 32

def cleanup(domain, challenge)
  domain = canonical_fqdn(domain)
  record_name = "#{challenge.record_name}.#{domain}"
  puts "=> It's now okay to delete DNS record for #{record_name}"
end

#respond(domain, challenge) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/acmesmith/challenge_responders/manual_dns.rb', line 17

def respond(domain, challenge)
  puts "=> Responding challenge dns-01 for #{domain}"
  puts

  domain = canonical_fqdn(domain)
  record_name = "#{challenge.record_name}.#{domain}"
  record_type = challenge.record_type
  record_content = "\"#{challenge.record_content}\""

  puts "#{record_name}. 5 IN #{record_type} #{record_content}"

  puts "(Hit enter when DNS record get ready)"
  $stdin.gets
end

#support?(type) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/acmesmith/challenge_responders/manual_dns.rb', line 9

def support?(type)
  # Acme::Client::Resources::Challenges::DNS01
  type == 'dns-01'
end