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.



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



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

#urlObject



72
73
74
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 72

def url
  "http://#{@domain}/#{@challenge.filename}"
end