class LetsencryptWebfaction::DomainValidator::Validation
Public Class Methods
new(domain, challenge)
click to toggle source
# File lib/letsencrypt_webfaction/domain_validator.rb, line 69 def initialize(domain, challenge) @domain = domain @challenge = challenge end
Public Instance Methods
print_error()
click to toggle source
# File lib/letsencrypt_webfaction/domain_validator.rb, line 74 def print_error # rubocop:disable Metrics/MethodLength case @challenge.status when 'valid' $stderr.puts "#{@domain}: Success" when 'invalid' $stderr.puts "#{@domain}: #{@challenge.error['detail']}" $stderr.puts "Make sure that you can access #{url}" when 'pending' $stderr.puts "#{@domain}: Still pending, but timed out" else $stderr.puts "#{@domain}: Unexpected authorization status #{@challenge.status}" end end
url()
click to toggle source
# File lib/letsencrypt_webfaction/domain_validator.rb, line 88 def url "http://#{@domain}/#{@challenge.filename}" end