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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c5eb1174f9f171c28477d1971a3272da065cf3af53241759fd7e2f9f19fa513
4
- data.tar.gz: 9a5b9221d8fc8dae3834f960203f8cfd0342e0796051165e3b79bb9a31c305a4
3
+ metadata.gz: 4f74ea156f562095369eeeb9563d5b6eb97c83d511d7d8514d65020f23fc9d62
4
+ data.tar.gz: 2bcc302f901b883e8072da97bb5ba60746301403be1f881416fd01bce33ccbc2
5
5
  SHA512:
6
- metadata.gz: 8e5fe1e4172bb296dd1a3814914d2949fe4c4d50f7cb384dbfb0adad7d364f99913ae7c040d90bb362cf8bdbe37b7e7db01deace5773ce73c78d70879da23b07
7
- data.tar.gz: ee584b59c168c47c194af89b9ed79c6911573acb277fd65fb4dbbaa4f227fce56779a5a88af5c676b537011daacf16ec6190f388f27ef47b37fb9f25fd3557b3
6
+ metadata.gz: 94689f476ee4833e682d4cf32ff59698673641b6e218bc106cd0d23c5703bd3f1e66d8550286d7c7e6bb7f47c5b94bc037e2ac4df91b33c5dcd58da6c17e5706
7
+ data.tar.gz: 36abc15449e5e6b71f1da35140df12310ecb0f9faac587aabfa90636eca9fa2778e1a657792afebe39c68bd7ba172058aaae0c8402d33409d7c1043da1fb2818
@@ -4,6 +4,8 @@
4
4
  103.245.222.0/23
5
5
  103.245.224.0/24
6
6
  104.156.80.0/20
7
+ 140.248.64.0/18
8
+ 140.248.128.0/17
7
9
  146.75.0.0/17
8
10
  151.101.0.0/16
9
11
  157.52.64.0/18
@@ -482,12 +482,12 @@ module GitHubPages
482
482
  def response
483
483
  return @response if defined? @response
484
484
 
485
- @response = Typhoeus.head(uri, TYPHOEUS_OPTIONS)
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"], TYPHOEUS_OPTIONS)
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 = TYPHOEUS_OPTIONS.merge(:followlocation => false)
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 = TYPHOEUS_OPTIONS.merge(:followlocation => false)
504
+ options = GitHubPages::HealthCheck.typhoeus_options.merge(:followlocation => false)
505
505
  @https_response ||= Typhoeus.head(uri(:scheme => "https"), options)
506
506
  end
507
507
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitHubPages
4
4
  module HealthCheck
5
- VERSION = "1.17.9"
5
+ VERSION = "1.18.0"
6
6
  end
7
7
  end
@@ -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
- echo "Whoops, there's already a '${tag}' tag."
36
- exit 1
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.17.9
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: 2021-10-01 00:00:00.000000000 Z
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.9
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