github-pages-health-check 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/cloudflare-ips.txt +1 -0
- data/lib/github-pages-health-check.rb +20 -1
- data/lib/github-pages-health-check/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a76a2726cf101e5e0b31295968533bc118eca9b
|
4
|
+
data.tar.gz: 78b1175bfb6c4de74c3a8a4303ab25a644805d86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d121a12f58aabe94583eac1561bd76e87805ce0712aada99c31d84918c02717a46a226191b8a409adecb23f55c5007d7f23e7929099f34f3a5966b7e1dfd076
|
7
|
+
data.tar.gz: c25ace49dcb5c559791dc471b5ef847f0fb4a9b3d2a7718b21c489fbee01ec31e9bce61001fac55646932562b10f5bcdbe919a2dcd9681988fe52e7751c0905e
|
data/config/cloudflare-ips.txt
CHANGED
@@ -47,7 +47,7 @@ class GitHubPages
|
|
47
47
|
}
|
48
48
|
|
49
49
|
def initialize(domain)
|
50
|
-
@domain = domain
|
50
|
+
@domain = host_from_uri(domain)
|
51
51
|
end
|
52
52
|
|
53
53
|
def cloudflare_ip?
|
@@ -260,5 +260,24 @@ class GitHubPages
|
|
260
260
|
def uri
|
261
261
|
@uri ||= Addressable::URI.new(:host => domain, :scheme => scheme, :path => "/").normalize
|
262
262
|
end
|
263
|
+
|
264
|
+
# Parse the URI. Accept either domain names or full URI's.
|
265
|
+
# Used by the initializer so we can be more flexible with inputs.
|
266
|
+
#
|
267
|
+
# domain - a URI or domain name.
|
268
|
+
#
|
269
|
+
# Examples
|
270
|
+
#
|
271
|
+
# host_from_uri("benbalter.github.com")
|
272
|
+
# # => 'benbalter.github.com'
|
273
|
+
# host_from_uri("https://benbalter.github.com")
|
274
|
+
# # => 'benbalter.github.com'
|
275
|
+
# host_from_uri("benbalter.github.com/help-me-im-a-path/")
|
276
|
+
# # => 'benbalter.github.com'
|
277
|
+
#
|
278
|
+
# Return the hostname.
|
279
|
+
def host_from_uri(domain)
|
280
|
+
Addressable::URI.parse(domain).host || Addressable::URI.parse("http://#{domain}").host
|
281
|
+
end
|
263
282
|
end
|
264
283
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-pages-health-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-dns
|
@@ -159,9 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.5.
|
162
|
+
rubygems_version: 2.5.2
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: Checks your GitHub Pages site for commons DNS configuration issues
|
166
166
|
test_files: []
|
167
|
-
has_rdoc:
|