Module: GitHubPages::HealthCheck

Defined in:
lib/github-pages-health-check.rb,
lib/github-pages-health-check/cdn.rb,
lib/github-pages-health-check/site.rb,
lib/github-pages-health-check/error.rb,
lib/github-pages-health-check/domain.rb,
lib/github-pages-health-check/errors.rb,
lib/github-pages-health-check/printer.rb,
lib/github-pages-health-check/version.rb,
lib/github-pages-health-check/checkable.rb,
lib/github-pages-health-check/repository.rb,
lib/github-pages-health-check/cdns/fastly.rb,
lib/github-pages-health-check/cdns/cloudflare.rb,
lib/github-pages-health-check/errors/build_error.rb,
lib/github-pages-health-check/errors/invalid_dns_error.rb,
lib/github-pages-health-check/errors/deprecated_ip_error.rb,
lib/github-pages-health-check/errors/invalid_cname_error.rb,
lib/github-pages-health-check/errors/invalid_domain_error.rb,
lib/github-pages-health-check/errors/invalid_a_record_error.rb,
lib/github-pages-health-check/errors/invalid_repository_error.rb,
lib/github-pages-health-check/errors/not_served_by_pages_error.rb,
lib/github-pages-health-check/errors/missing_access_token_error.rb

Defined Under Namespace

Modules: Errors Classes: CDN, Checkable, CloudFlare, Domain, Error, Fastly, Printer, Repository, Site

Constant Summary collapse

TIMEOUT =

DNS and HTTP timeout, in seconds

5
TYPHOEUS_OPTIONS =
{
  :followlocation  => true,
  :timeout         => TIMEOUT,
  :accept_encoding => "gzip",
  :method          => :head,
  :headers         => {
    "User-Agent"   => "Mozilla/5.0 (compatible; GitHub Pages Health Check/#{VERSION}; +https://github.com/github/pages-health-check)"
  }
}
VERSION =
"1.2.0"

Class Method Summary collapse

Class Method Details

.check(repository_or_domain, access_token: nil) ⇒ Object



54
55
56
# File 'lib/github-pages-health-check.rb', line 54

def self.check(repository_or_domain, access_token: nil)
  Site.new repository_or_domain, access_token: access_token
end

.without_warnings(&block) ⇒ Object

surpress warn-level feedback due to unsupported record types



47
48
49
50
51
52
# File 'lib/github-pages-health-check.rb', line 47

def self.without_warnings(&block)
  warn_level, $VERBOSE = $VERBOSE, nil
  result = block.call
  $VERBOSE = warn_level
  result
end