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.
58 59 60 61 |
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 58 def initialize(domain, challenge) @domain = domain @challenge = challenge end |
Instance Method Details
#print_error ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 63 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
72 73 74 |
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 72 def url "http://#{@domain}/#{@challenge.filename}" end |