github-pages-health-check 1.18.4 → 1.18.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e2a387d18201b5732790cea5c70f84c736eb04433cb66cf8715b7afd263bbb7
4
- data.tar.gz: c9ccd398d02d8d6a2f4b372bf022cb75688178951cca0fc0f0616cf7078c4fc0
3
+ metadata.gz: be8f2f5afcacf1c6155e28bc3b0019f0096f2b2ff1bd6c5c86c8e3fc0336a86f
4
+ data.tar.gz: c68fa1d0c592ec2357331bb30f9ff7435348777d6872c0915ae1fea6dbb03e9d
5
5
  SHA512:
6
- metadata.gz: 20d385527764b7326b390244b38e44b2aa426748244d51e64feef83200111053efc3fe52a9cf55e0f523df27ddeaf2a24e1df15ae702a1948e2fcede15ba254d
7
- data.tar.gz: 55bee6916048119777f9321cfe29a496317d855e6e428b185244c97b6ee1d77b23d16ca63be53e145a3467a94cf62858bace2c48ed0aade07c38d90000c1c274
6
+ metadata.gz: 77b2fcb2d737a1c28a8469333934335509664b169ab9a2483a5ab287ecd9ec43ef9ffc797d4cc2b2afd68929c7bc7a92ed897e8c3c832ad45b857c990c59359b
7
+ data.tar.gz: 1a6c44c4d002607840493af318bd7c8b3b6cf9fb5c34ea7e1ad67e9a2aff6b05900254eb6876bdff7aaf1c71527c7a86ff541a166e5112c323b7bf9d6b9b549f
@@ -245,13 +245,17 @@ module GitHubPages
245
245
 
246
246
  # Check if the CNAME points to a Domain that points to pages
247
247
  # e.g. CNAME -> Domain -> Pages
248
+ # rubocop:disable Metrics/AbcSize
248
249
  def cname_to_domain_to_pages?
250
+ return false unless dns?
251
+
249
252
  a_record_to_pages = dns.select { |d| d.type == Dnsruby::Types::A && d.name.to_s == host }.first
250
253
 
251
254
  return false unless a_record_to_pages && cname? && !cname_to_pages_dot_github_dot_com? && @www_cname
252
255
 
253
256
  CURRENT_IP_ADDRESSES.include?(a_record_to_pages.address.to_s.downcase)
254
257
  end
258
+ # rubocop:enable Metrics/AbcSize
255
259
 
256
260
  # Is the given domain a CNAME to pages.github.(io|com)
257
261
  # instead of being CNAME'd to the user's subdomain?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitHubPages
4
4
  module HealthCheck
5
- VERSION = "1.18.4"
5
+ VERSION = "1.18.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-pages-health-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.4
4
+ version: 1.18.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.