class GitHubPages::HealthCheck::RedundantCheck

Constants

TIMEOUT

Attributes

domain[R]

Public Class Methods

new(domain) click to toggle source
# File lib/github-pages-health-check/redundant_check.rb, line 12
def initialize(domain)
  @domain = domain
end

Public Instance Methods

check() click to toggle source
# File lib/github-pages-health-check/redundant_check.rb, line 16
def check
  @check ||= (checks.find(&:valid?) || check_with_default_nameservers)
end
https_eligible?() click to toggle source
# File lib/github-pages-health-check/redundant_check.rb, line 23
def https_eligible?
  checks.any?(&:https_eligible?)
end

Private Instance Methods

check_with_default_nameservers() click to toggle source
# File lib/github-pages-health-check/redundant_check.rb, line 35
def check_with_default_nameservers
  @check_with_default_nameservers ||= checks.find { |c| c.nameservers == :default }
end
check_with_public_nameservers() click to toggle source
# File lib/github-pages-health-check/redundant_check.rb, line 39
def check_with_public_nameservers
  @check_with_public_nameservers ||= checks.find { |c| c.nameservers == :public }
end
checks() click to toggle source
# File lib/github-pages-health-check/redundant_check.rb, line 29
def checks
  @checks ||= %i[default authoritative public].map do |ns|
    GitHubPages::HealthCheck::Domain.new(domain, :nameservers => ns)
  end
end