github-pages-health-check 0.6.0 → 0.6.1

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
  SHA1:
3
- metadata.gz: dc104a3e85a562941afc89753b65de400d5a6246
4
- data.tar.gz: 10fb769dbd57e8b8278844f868aa4971d40d01eb
3
+ metadata.gz: 6a76a2726cf101e5e0b31295968533bc118eca9b
4
+ data.tar.gz: 78b1175bfb6c4de74c3a8a4303ab25a644805d86
5
5
  SHA512:
6
- metadata.gz: 32a30fe370423c66e54c3562c0be938ccd9f619c6dc3103cfa3d03a757ee70514db57fef3a4e0ae43f484a30031adfeee334336d5cfaf1ba1cf029abc7b68a23
7
- data.tar.gz: 071289ad2331dfaf1aaf2e52a96dbf6fe15083e97b5ffc6c27f1b49a3d05213c6e11831a7c765366a22cdce0af5d0f97ea6cc243220b66aac7ebd7833902a642
6
+ metadata.gz: 4d121a12f58aabe94583eac1561bd76e87805ce0712aada99c31d84918c02717a46a226191b8a409adecb23f55c5007d7f23e7929099f34f3a5966b7e1dfd076
7
+ data.tar.gz: c25ace49dcb5c559791dc471b5ef847f0fb4a9b3d2a7718b21c489fbee01ec31e9bce61001fac55646932562b10f5bcdbe919a2dcd9681988fe52e7751c0905e
@@ -3,6 +3,7 @@
3
3
  103.31.4.0/22
4
4
  104.16.0.0/12
5
5
  108.162.192.0/18
6
+ 131.0.72.0/22
6
7
  141.101.64.0/18
7
8
  162.158.0.0/15
8
9
  172.64.0.0/13
@@ -47,7 +47,7 @@ class GitHubPages
47
47
  }
48
48
 
49
49
  def initialize(domain)
50
- @domain = domain
50
+ @domain = host_from_uri(domain)
51
51
  end
52
52
 
53
53
  def cloudflare_ip?
@@ -260,5 +260,24 @@ class GitHubPages
260
260
  def uri
261
261
  @uri ||= Addressable::URI.new(:host => domain, :scheme => scheme, :path => "/").normalize
262
262
  end
263
+
264
+ # Parse the URI. Accept either domain names or full URI's.
265
+ # Used by the initializer so we can be more flexible with inputs.
266
+ #
267
+ # domain - a URI or domain name.
268
+ #
269
+ # Examples
270
+ #
271
+ # host_from_uri("benbalter.github.com")
272
+ # # => 'benbalter.github.com'
273
+ # host_from_uri("https://benbalter.github.com")
274
+ # # => 'benbalter.github.com'
275
+ # host_from_uri("benbalter.github.com/help-me-im-a-path/")
276
+ # # => 'benbalter.github.com'
277
+ #
278
+ # Return the hostname.
279
+ def host_from_uri(domain)
280
+ Addressable::URI.parse(domain).host || Addressable::URI.parse("http://#{domain}").host
281
+ end
263
282
  end
264
283
  end
@@ -1,5 +1,5 @@
1
1
  class GitHubPages
2
2
  class HealthCheck
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  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: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-13 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-dns
@@ -159,9 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  requirements: []
161
161
  rubyforge_project:
162
- rubygems_version: 2.5.1
162
+ rubygems_version: 2.5.2
163
163
  signing_key:
164
164
  specification_version: 4
165
165
  summary: Checks your GitHub Pages site for commons DNS configuration issues
166
166
  test_files: []
167
- has_rdoc: