github-pages-health-check 1.10.0 → 1.11.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: ad338ea604a8549ea8d86009de6cdd7d8c578eb81d14d2f2ebf96b5fc7791cbe
4
- data.tar.gz: 1241ab1285cf8d4e15cc9e56ee701b40241eede4740ce4090deb055c3b460ef0
3
+ metadata.gz: 0efaa0f152ba42dc46cb2318b8449419caea4b842a9af8a6fb8a9aae21b8bf1f
4
+ data.tar.gz: 0761afbdb3743f66dd8d5145b530819181326b152959f487dfdb8bc7441c9980
5
5
  SHA512:
6
- metadata.gz: aff974999ece850cf655e4cd1234806ddc8974c30e3b70eb1c3d8095d716c4be27ba23d343436bf28fd04f6ac3c9da0de676d079e25b0fc6d68b2e848b289c08
7
- data.tar.gz: 44d14037c06a29e2be93da02040464894eedb72fa33b704a96dff152d31e438863e10fad54c69877182267e0f53949ee4d64e3e414a3748785c915e14f73cadf
6
+ metadata.gz: e8f23616476a3645b10082d875aaa7f468860ce689fd8330f788f187f1a06c775727c26ffa613c0ea1be431d41cf2b928ddf8f4c920fd717775f65cfe9f17222
7
+ data.tar.gz: ce4b1d0a6f096d382b67df7e0228add9f0f2fed378f8190b3d6a446c69bfd4a46af23cc13969b5f38cf6422902605887c2c2076ff40c0255813f0549c56d97e1
@@ -80,13 +80,13 @@ module GitHubPages
80
80
  ].freeze
81
81
 
82
82
  HASH_METHODS = %i[
83
- host uri dns_resolves? proxied? cloudflare_ip? fastly_ip?
84
- old_ip_address? a_record? cname_record? mx_records_present?
85
- valid_domain? apex_domain? should_be_a_record?
83
+ host uri nameservers dns_resolves? proxied? cloudflare_ip?
84
+ fastly_ip? old_ip_address? a_record? cname_record?
85
+ mx_records_present? valid_domain? apex_domain? should_be_a_record?
86
86
  cname_to_github_user_domain? cname_to_pages_dot_github_dot_com?
87
87
  cname_to_fastly? pointed_to_github_pages_ip? pages_domain?
88
- served_by_pages? valid? reason valid_domain?
89
- https? enforces_https? https_error https_eligible? caa_error
88
+ served_by_pages? valid? reason valid_domain? https?
89
+ enforces_https? https_error https_eligible? caa_error
90
90
  ].freeze
91
91
 
92
92
  def self.redundant(host)
@@ -362,7 +362,7 @@ module GitHubPages
362
362
  # Can an HTTPS certificate be issued for this domain?
363
363
  def https_eligible?
364
364
  (cname_to_github_user_domain? || pointed_to_new_primary_ips?) &&
365
- caa.lets_encrypt_allowed?
365
+ !aaaa_record_present? && caa.lets_encrypt_allowed?
366
366
  end
367
367
 
368
368
  # Any errors querying CAA records
@@ -27,7 +27,7 @@ module GitHubPages
27
27
  private
28
28
 
29
29
  def checks
30
- @checks ||= %i[default authoritative].map do |ns|
30
+ @checks ||= %i[default authoritative public].map do |ns|
31
31
  GitHubPages::HealthCheck::Domain.new(domain, :nameservers => ns)
32
32
  end
33
33
  end
@@ -35,6 +35,10 @@ module GitHubPages
35
35
  def check_with_default_nameservers
36
36
  @check_with_default_nameservers ||= checks.find { |c| c.nameservers == :default }
37
37
  end
38
+
39
+ def check_with_public_nameservers
40
+ @check_with_public_nameservers ||= checks.find { |c| c.nameservers == :public }
41
+ end
38
42
  end
39
43
  end
40
44
  end
@@ -8,6 +8,10 @@ module GitHubPages
8
8
  :query_timeout => 5,
9
9
  :dnssec => false
10
10
  }.freeze
11
+ PUBLIC_NAMESERVERS = %w(
12
+ 8.8.8.8
13
+ 1.1.1.1
14
+ ).freeze
11
15
 
12
16
  class << self
13
17
  def default_resolver
@@ -40,6 +44,10 @@ module GitHubPages
40
44
  Dnsruby::Resolver.new(DEFAULT_RESOLVER_OPTIONS.merge(
41
45
  :nameservers => authoritative_nameservers
42
46
  ))
47
+ when :public
48
+ Dnsruby::Resolver.new(DEFAULT_RESOLVER_OPTIONS.merge(
49
+ :nameservers => PUBLIC_NAMESERVERS
50
+ ))
43
51
  when Array
44
52
  Dnsruby::Resolver.new(DEFAULT_RESOLVER_OPTIONS.merge(
45
53
  :nameservers => nameservers
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitHubPages
4
4
  module HealthCheck
5
- VERSION = "1.10.0".freeze
5
+ VERSION = "1.11.0".freeze
6
6
  end
7
7
  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: 1.10.0
4
+ version: 1.11.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-05-16 00:00:00.000000000 Z
11
+ date: 2018-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable