github-pages-health-check 1.3.4 → 1.3.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
  SHA1:
3
- metadata.gz: a8b7ed8d3490c6ecd2740ea458a90dccbc12bfb8
4
- data.tar.gz: 68c03ecb1b5856c86995b8d8d82bb686d15069f8
3
+ metadata.gz: b8d31fe25fd17ca13f9dc6bb1a4e88f34a63c3c8
4
+ data.tar.gz: eb169ed3f78979a574c43b1b505f37f461ae66ad
5
5
  SHA512:
6
- metadata.gz: 59a0b25c3a8ba99bc397e61706c93f71969c440d7f416e19a09fbd28543576d9d4ec081f702b3671a3f77dff9aad40e6e546ccd29a67e5e6faf3608df408d8db
7
- data.tar.gz: e797acc06f80fb3f7295327e99fe70d7b29c458cc595f98069852b405bbbdba2c8e5484b514b228bdf3893780baec87e91280592cfd43d923068a0b06ce3f845
6
+ metadata.gz: d2030101e9a9b8fe2e4f125f4411268a1000b53946483af7695d478773e67bf9d6116b109fb69d8b881eac890e25a9b133d92125d38d8f1f389e96e8bffc5485
7
+ data.tar.gz: 9bcceb7eb18ee3ab8e7ec7eabc07307a090f29b8bb08e5229cdde2e3a49b6a02b055c033d21ec39e61260e9e105b22a6b1993105a10d0d1cc5cd8767ccad09e2
@@ -1,3 +1,5 @@
1
+ dist: trusty
2
+ sudo: required
1
3
  language: ruby
2
4
  script: "script/cibuild"
3
5
  before_install: bundle update
@@ -4,6 +4,13 @@ module GitHubPages
4
4
  # Instance of the Fastly CDN for checking IP ownership
5
5
  # Specifically not namespaced to avoid a breaking change
6
6
  class Fastly < CDN
7
+ # Fastly maps used by GitHub Pages.
8
+ HOSTNAMES = %w(
9
+ github.map.fastly.net
10
+ github.map.fastly.net.
11
+ sni.github.map.fastly.net
12
+ sni.github.map.fastly.net.
13
+ )
7
14
  end
8
15
  end
9
16
  end
@@ -192,7 +192,7 @@ module GitHubPages
192
192
 
193
193
  # Is the host our Fastly CNAME?
194
194
  def fastly?
195
- !!host.match(/\Agithub\.map\.fastly\.net\.?\z/i)
195
+ !!host.match(/\A#{Regexp.union(Fastly::HOSTNAMES)}\z/i)
196
196
  end
197
197
 
198
198
  # Does the domain resolve to a CloudFlare-owned IP
@@ -390,7 +390,8 @@ module GitHubPages
390
390
  def cdn_ip?(cdn)
391
391
  return unless dns?
392
392
  dns.all? do |answer|
393
- answer.class == Net::DNS::RR::A && cdn.controls_ip?(answer.address)
393
+ next true unless answer.class == Net::DNS::RR::A
394
+ cdn.controls_ip?(answer.address)
394
395
  end
395
396
  end
396
397
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module GitHubPages
3
3
  module HealthCheck
4
- VERSION = "1.3.4".freeze
4
+ VERSION = "1.3.5".freeze
5
5
  end
6
6
  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.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-14 00:00:00.000000000 Z
11
+ date: 2017-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-dns