github-pages-health-check 1.17.8 → 1.17.9

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: b93b42aca0a60b8bd7d5df583585ec14e09c171077bf389e0d53699e935a344c
4
- data.tar.gz: 9616ee04e0a5c2e80e2a1f32b66e401a39f98f31ba30317ffcb8e98c810994ca
3
+ metadata.gz: 4c5eb1174f9f171c28477d1971a3272da065cf3af53241759fd7e2f9f19fa513
4
+ data.tar.gz: 9a5b9221d8fc8dae3834f960203f8cfd0342e0796051165e3b79bb9a31c305a4
5
5
  SHA512:
6
- metadata.gz: 911c9d7e94f6a943a6789bc701b7bdf3ff1aa74b4ed0083d18304b40e903b0056175ea5c8990b1ef091156543cf651efcb3a38d80b7bb6721725b1b40c87ade1
7
- data.tar.gz: 5dbcdd645e5f05c758126c1ce6dda0338a41ae6404f152ef18de7e2b6b37308446dd5b06cbf4f154d57a0c5eca87a1623debe3760aada69639b9d85193de6298
6
+ metadata.gz: 8e5fe1e4172bb296dd1a3814914d2949fe4c4d50f7cb384dbfb0adad7d364f99913ae7c040d90bb362cf8bdbe37b7e7db01deace5773ce73c78d70879da23b07
7
+ data.tar.gz: ee584b59c168c47c194af89b9ed79c6911573acb277fd65fb4dbbaa4f227fce56779a5a88af5c676b537011daacf16ec6190f388f27ef47b37fb9f25fd3557b3
data/.rubocop.yml CHANGED
@@ -52,7 +52,7 @@ Style/ClassAndModuleChildren:
52
52
  Enabled: false # module X<\n>module Y is just as good as module X::Y.
53
53
 
54
54
  Layout/LineLength:
55
- Max: 90
55
+ Max: 120
56
56
  Severity: warning
57
57
  Exclude:
58
58
  - github-pages-health-check.gemspec
@@ -89,7 +89,7 @@ module GitHubPages
89
89
 
90
90
  HASH_METHODS = %i[
91
91
  host uri nameservers dns_resolves? proxied? cloudflare_ip?
92
- fastly_ip? old_ip_address? a_record? aaaa_record? aaaa_record_present?
92
+ fastly_ip? old_ip_address? a_record? aaaa_record? a_record_present? aaaa_record_present?
93
93
  cname_record? mx_records_present? valid_domain? apex_domain?
94
94
  should_be_a_record? cname_to_github_user_domain?
95
95
  cname_to_pages_dot_github_dot_com? cname_to_fastly?
@@ -138,14 +138,13 @@ module GitHubPages
138
138
  def invalid_aaaa_record?
139
139
  return @invalid_aaaa_record if defined? @invalid_aaaa_record
140
140
 
141
- @invalid_aaaa_record =
142
- (valid_domain? && aaaa_record_present? && !should_be_a_record?)
141
+ @invalid_aaaa_record = (valid_domain? && aaaa_record_present? && !should_be_a_record?)
143
142
  end
144
143
 
145
144
  def invalid_a_record?
146
145
  return @invalid_a_record if defined? @invalid_a_record
147
146
 
148
- @invalid_a_record = (valid_domain? && a_record? && !should_be_a_record?)
147
+ @invalid_a_record = (valid_domain? && a_record_present? && !should_be_a_record?)
149
148
  end
150
149
 
151
150
  def invalid_cname?
@@ -369,10 +368,18 @@ module GitHubPages
369
368
  @is_aaaa_record = Dnsruby::Types::AAAA == dns.first.type
370
369
  end
371
370
 
371
+ # Does this domain has an A record setup (not necessarily as the first record)?
372
+ def a_record_present?
373
+ return unless dns?
374
+
375
+ dns.any? { |answer| answer.type == Dnsruby::Types::A && answer.name.to_s == host }
376
+ end
377
+
378
+ # Does this domain has an AAAA record setup (not necessarily as the first record)?
372
379
  def aaaa_record_present?
373
380
  return unless dns?
374
381
 
375
- dns.any? { |answer| answer.type == Dnsruby::Types::AAAA }
382
+ dns.any? { |answer| answer.type == Dnsruby::Types::AAAA && answer.name.to_s == host }
376
383
  end
377
384
 
378
385
  # Is this domain's first response a CNAME record?
@@ -8,9 +8,9 @@ module GitHubPages
8
8
 
9
9
  def message
10
10
  <<-MSG
11
- Your site's DNS settings are using a custom subdomain, #{domain.host},
12
- that's set up with an AAAA record. GitHub Pages currently does not support
13
- IPv6.
11
+ Your site's DNS settings are using a custom subdomain, #{domain.host},
12
+ that's set up as an AAAA record. We recommend you change this to a CNAME
13
+ record pointing at #{username}.github.io.
14
14
  MSG
15
15
  end
16
16
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitHubPages
4
4
  module HealthCheck
5
- VERSION = "1.17.8"
5
+ VERSION = "1.17.9"
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.17.8
4
+ version: 1.17.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-10 00:00:00.000000000 Z
11
+ date: 2021-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable