github-pages-health-check 1.17.9 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/fastly-ips.txt +2 -0
- data/lib/github-pages-health-check/domain.rb +4 -4
- data/lib/github-pages-health-check/version.rb +1 -1
- data/lib/github-pages-health-check.rb +22 -10
- data/script/release +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f74ea156f562095369eeeb9563d5b6eb97c83d511d7d8514d65020f23fc9d62
|
4
|
+
data.tar.gz: 2bcc302f901b883e8072da97bb5ba60746301403be1f881416fd01bce33ccbc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94689f476ee4833e682d4cf32ff59698673641b6e218bc106cd0d23c5703bd3f1e66d8550286d7c7e6bb7f47c5b94bc037e2ac4df91b33c5dcd58da6c17e5706
|
7
|
+
data.tar.gz: 36abc15449e5e6b71f1da35140df12310ecb0f9faac587aabfa90636eca9fa2778e1a657792afebe39c68bd7ba172058aaae0c8402d33409d7c1043da1fb2818
|
data/config/fastly-ips.txt
CHANGED
@@ -482,12 +482,12 @@ module GitHubPages
|
|
482
482
|
def response
|
483
483
|
return @response if defined? @response
|
484
484
|
|
485
|
-
@response = Typhoeus.head(uri,
|
485
|
+
@response = Typhoeus.head(uri, GitHubPages::HealthCheck.typhoeus_options)
|
486
486
|
|
487
487
|
# Workaround for webmock not playing nicely with Typhoeus redirects
|
488
488
|
# See https://github.com/bblimke/webmock/issues/237
|
489
489
|
if @response.mock? && @response.headers["Location"]
|
490
|
-
@response = Typhoeus.head(response.headers["Location"],
|
490
|
+
@response = Typhoeus.head(response.headers["Location"], GitHubPages::HealthCheck.typhoeus_options)
|
491
491
|
end
|
492
492
|
|
493
493
|
@response
|
@@ -495,13 +495,13 @@ module GitHubPages
|
|
495
495
|
|
496
496
|
# The domain's response to HTTP requests, without following redirects
|
497
497
|
def http_response
|
498
|
-
options =
|
498
|
+
options = GitHubPages::HealthCheck.typhoeus_options.merge(:followlocation => false)
|
499
499
|
@http_response ||= Typhoeus.head(uri(:scheme => "http"), options)
|
500
500
|
end
|
501
501
|
|
502
502
|
# The domain's response to HTTPS requests, without following redirects
|
503
503
|
def https_response
|
504
|
-
options =
|
504
|
+
options = GitHubPages::HealthCheck.typhoeus_options.merge(:followlocation => false)
|
505
505
|
@https_response ||= Typhoeus.head(uri(:scheme => "https"), options)
|
506
506
|
end
|
507
507
|
|
@@ -41,16 +41,6 @@ module GitHubPages
|
|
41
41
|
URL = "https://github.com/github/pages-health-check"
|
42
42
|
USER_AGENT = "Mozilla/5.0 (compatible; #{HUMAN_NAME}/#{VERSION}; +#{URL})"
|
43
43
|
|
44
|
-
TYPHOEUS_OPTIONS = {
|
45
|
-
:followlocation => true,
|
46
|
-
:timeout => TIMEOUT,
|
47
|
-
:accept_encoding => "gzip",
|
48
|
-
:method => :head,
|
49
|
-
:headers => {
|
50
|
-
"User-Agent" => USER_AGENT
|
51
|
-
}
|
52
|
-
}.freeze
|
53
|
-
|
54
44
|
# surpress warn-level feedback due to unsupported record types
|
55
45
|
def self.without_warnings(&block)
|
56
46
|
warn_level = $VERBOSE
|
@@ -63,5 +53,27 @@ module GitHubPages
|
|
63
53
|
def self.check(repository_or_domain, access_token: nil)
|
64
54
|
Site.new repository_or_domain, :access_token => access_token
|
65
55
|
end
|
56
|
+
|
57
|
+
# rubocop:disable Naming/AccessorMethodName (this is not an accessor method)
|
58
|
+
def self.set_proxy(proxy_url)
|
59
|
+
@typhoeus_options = typhoeus_options.merge(:proxy => proxy_url).freeze
|
60
|
+
nil
|
61
|
+
end
|
62
|
+
# rubocop:enable Naming/AccessorMethodName
|
63
|
+
|
64
|
+
def self.typhoeus_options
|
65
|
+
return @typhoeus_options if defined?(@typhoeus_options)
|
66
|
+
|
67
|
+
@typhoeus_options = {
|
68
|
+
:followlocation => true,
|
69
|
+
:timeout => TIMEOUT,
|
70
|
+
:accept_encoding => "gzip",
|
71
|
+
:method => :head,
|
72
|
+
:headers => {
|
73
|
+
"User-Agent" => USER_AGENT
|
74
|
+
},
|
75
|
+
:proxy => nil
|
76
|
+
}.freeze
|
77
|
+
end
|
66
78
|
end
|
67
79
|
end
|
data/script/release
CHANGED
@@ -31,10 +31,10 @@ tag=v`ls github-pages-health-check-*.gem | sed 's/^github-pages-health-check-\(.
|
|
31
31
|
|
32
32
|
git fetch -t origin
|
33
33
|
|
34
|
-
(git tag -l | grep -q "$tag") && {
|
35
|
-
|
36
|
-
|
37
|
-
}
|
34
|
+
# (git tag -l | grep -q "$tag") && {
|
35
|
+
# echo "Whoops, there's already a '${tag}' tag."
|
36
|
+
# exit 1
|
37
|
+
# }
|
38
38
|
|
39
39
|
# Tag it and bag it.
|
40
40
|
|
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.
|
4
|
+
version: 1.18.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:
|
11
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
|
-
rubygems_version: 3.2
|
163
|
+
rubygems_version: 3.1.2
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Checks your GitHub Pages site for commons DNS configuration issues
|