github-pages-health-check 1.11.1 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 679ba9ffc25dcc84048349056269a107b8b06238593b546e4bc896fa30521d1d
|
4
|
+
data.tar.gz: 4ecaddefc7f3d1451fa481faae3b088799077603dc8e3d8793400d7434002a72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89c5a7975632bee55c646c48093d56c319a5bf7ca9503adc2b05526691d053a5c8ac883b1608d83032193bd3da454091c4edc8f6f5401d528dfca8fc7c49b2b6
|
7
|
+
data.tar.gz: 0736ad8c4d6bb5ad484d90de791a66c806a79ac9cbeeda9c3923a7e3b7a417b144de200b7952dfe81eb0d609f2676a924cb94fb19edfebdc885e9d1f6745927d
|
@@ -33,7 +33,10 @@ module GitHubPages
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def records
|
36
|
-
|
36
|
+
unicode_host = Addressable::IDNA.to_unicode(host)
|
37
|
+
@records ||= begin
|
38
|
+
get_caa_records(host) | get_caa_records(PublicSuffix.domain(unicode_host))
|
39
|
+
end
|
37
40
|
end
|
38
41
|
|
39
42
|
private
|
@@ -100,7 +100,7 @@ module GitHubPages
|
|
100
100
|
|
101
101
|
@host = normalize_host(host)
|
102
102
|
@nameservers = nameservers
|
103
|
-
@resolver = GitHubPages::HealthCheck::Resolver.new(host,
|
103
|
+
@resolver = GitHubPages::HealthCheck::Resolver.new(self.host,
|
104
104
|
:nameservers => nameservers)
|
105
105
|
end
|
106
106
|
|
@@ -147,7 +147,8 @@ module GitHubPages
|
|
147
147
|
# Used as an escape hatch to prevent false positives on DNS checkes
|
148
148
|
def valid_domain?
|
149
149
|
return @valid if defined? @valid
|
150
|
-
|
150
|
+
unicode_host = Addressable::IDNA.to_unicode(host)
|
151
|
+
@valid = PublicSuffix.valid?(unicode_host, :default_rule => nil)
|
151
152
|
end
|
152
153
|
|
153
154
|
# Is this domain an apex domain, meaning a CNAME would be innapropriate
|
@@ -160,7 +161,8 @@ module GitHubPages
|
|
160
161
|
# It's aware of multi-step top-level domain names:
|
161
162
|
# E.g. PublicSuffix.domain("blog.digital.gov.uk") # => "digital.gov.uk"
|
162
163
|
# For apex-level domain names, DNS providers do not support CNAME records.
|
163
|
-
|
164
|
+
unicode_host = Addressable::IDNA.to_unicode(host)
|
165
|
+
PublicSuffix.domain(unicode_host) == unicode_host
|
164
166
|
end
|
165
167
|
|
166
168
|
# Should the domain use an A record?
|
@@ -421,8 +423,8 @@ module GitHubPages
|
|
421
423
|
# Return the hostname.
|
422
424
|
def normalize_host(domain)
|
423
425
|
domain = domain.strip.chomp(".")
|
424
|
-
host = Addressable::URI.parse(domain).
|
425
|
-
host ||= Addressable::URI.parse("http://#{domain}").
|
426
|
+
host = Addressable::URI.parse(domain).normalized_host
|
427
|
+
host ||= Addressable::URI.parse("http://#{domain}").normalized_host
|
426
428
|
host unless host.to_s.empty?
|
427
429
|
rescue Addressable::URI::InvalidURIError
|
428
430
|
nil
|
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: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|