Class: LetsencryptWebfaction::DomainValidator::Validation

Inherits:
Object
  • Object
show all
Defined in:
lib/letsencrypt_webfaction/domain_validator.rb

Instance Method Summary collapse

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



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