Class: LetsencryptWebfaction::DomainValidator::Validation
- Inherits:
-
Object
- Object
- LetsencryptWebfaction::DomainValidator::Validation
- Defined in:
- lib/letsencrypt_webfaction/domain_validator.rb
Instance Method Summary collapse
-
#initialize(domain, challenge) ⇒ Validation
constructor
A new instance of Validation.
- #print_error ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(domain, challenge) ⇒ Validation
Returns a new instance of Validation.
57 58 59 60 |
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 57 def initialize(domain, challenge) @domain = domain @challenge = challenge end |
Instance Method Details
#print_error ⇒ Object
62 63 64 65 66 67 68 69 |
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 62 def print_error if @challenge.verify_status == 'valid' $stderr.puts "#{@domain}: Success" else $stderr.puts "#{@domain}: #{@challenge.error['detail']}" $stderr.puts "Make sure that you can access #{url}" end end |
#url ⇒ Object
71 72 73 |
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 71 def url "http://#{@domain}/#{@challenge.filename}" end |