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.



56
57
58
59
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 56

def initialize(domain, challenge)
  @domain = domain
  @challenge = challenge
end

Instance Method Details



61
62
63
64
65
66
67
68
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 61

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



70
71
72
# File 'lib/letsencrypt_webfaction/domain_validator.rb', line 70

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