Checks your GitHub Pages site for common DNS configuration issues
Перейти к файлу
James Dennes 4c41c5462f Add pointed_to_github_pages_ip? and github_pages_ip? 2015-04-14 13:35:26 +02:00
config update cloudflare IPs 2015-03-06 10:38:01 -05:00
lib Add pointed_to_github_pages_ip? and github_pages_ip? 2015-04-14 13:35:26 +02:00
script add script/release 2015-03-06 10:43:36 -05:00
spec Fix tpyo 2014-11-20 17:26:02 -08:00
vendor/cache add gem-release 2014-10-28 09:46:46 -04:00
.gitignore vendor 💎s 2014-08-26 17:51:26 -04:00
.rspec spike out basic structure 2014-07-24 13:32:12 -04:00
.ruby-version spike out basic structure 2014-07-24 13:32:12 -04:00
.travis.yml correct travis key 2014-10-31 10:53:57 -04:00
Gemfile spike out basic structure 2014-07-24 13:32:12 -04:00
LICENSE.md Add MIT License 2014-10-27 11:46:35 -04:00
README.md add badges 2014-10-31 10:47:39 -04:00
github-pages-health-check.gemspec include not_served_by_pages in gemspec 2014-11-17 09:16:30 -05:00

README.md

GitHub Pages Health Check

Checks your GitHub Pages site for common DNS configuration issues

Build Status Gem Version

Installation

gem install github-pages-health-check

Usage

Basic Usage

> check = GitHubPages::HealthCheck.new("choosealicense.com")
=> #<GitHubPages::HealthCheck @domain="choosealicense.com" valid?=true>
> check.valid?
=> true

An invalid domain

> check = GitHubPages::HealthCheck.new("foo.github.com")
> check.valid?
=> false
> check.valid!
=> GitHubPages::HealthCheck::InvalidCNAME

Retrieving specific checks

> check.should_be_a_record?
=> true
> check.a_record?
=> true

Getting checks in bulk

> check.to_hash
=> {
 :cloudflare_ip?=>false,
 :old_ip_address?=>false,
 :a_record?=>true,
 :cname_record?=>false,
 :valid_domain?=>true,
 :apex_domain?=>true,
 :should_be_a_record?=>true,
 :pointed_to_github_user_domain?=>false,
 :pages_domain?=>false,
 :valid?=>true
}
> require 'json'
> check.to_json
=> "{\"cloudflare_ip?\":false,\"old_ip_address?\":false,\"a_record?\":true,\"cname_record?\":false,\"valid_domain?\":true,\"apex_domain?\":true,\"should_be_a_record?\":true,\"pointed_to_github_user_domain?\":false,\"pages_domain?\":false,\"valid?\":true}"

Getting the reason a domain is invalid

> check = GitHubPages::HealthCheck.new "developer.facebook.com"
> check.valid?
=> false
> check.reason
=> #<GitHubPages::HealthCheck::InvalidCNAME>
> check.reason.message
=> "CNAME does not point to GitHub Pages"