percy-common 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/percy/common/version.rb +1 -1
- data/lib/percy/network_helpers.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7080fcc4fac57a2f39b2443e4ca8473a30baa536c7d90a62990e24d01d49a1c
|
4
|
+
data.tar.gz: 8116d7e1e95c04d9dc9a6966050aad2e70b8e89a293df6e50940f4c2d75bf673
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 497b402af66b77a76d2254b9f433e112d283318c75d0a9d08b545b75ba5d6f33a49a7756cf8dbc53902a02e282e07c597ad37a2eab680d23e9f4a4987aaca4e9
|
7
|
+
data.tar.gz: d78b7f18fbbec3d1e8b72a6b4e3536a31995d6823d94848b99c75cdebe418ae773c11c2d8a371267ae0e2a2e841877150b9ab8f477ba9482bd29332760c8882b
|
data/lib/percy/common/version.rb
CHANGED
@@ -28,10 +28,10 @@ module Percy
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
def self.verify_healthcheck(url:, expected_body: 'ok', retry_wait_seconds: 0.5)
|
31
|
+
def self.verify_healthcheck(url:, expected_body: 'ok', retry_wait_seconds: 0.5, proxy: nil)
|
32
32
|
10.times do
|
33
33
|
begin
|
34
|
-
response = Excon.get(url)
|
34
|
+
response = Excon.get(url, proxy: proxy)
|
35
35
|
return true if response.body == expected_body
|
36
36
|
rescue Excon::Error::Socket, Excon::Error::Timeout
|
37
37
|
sleep retry_wait_seconds
|
@@ -40,10 +40,12 @@ module Percy
|
|
40
40
|
raise ServerDown, "Healthcheck failed for #{url}"
|
41
41
|
end
|
42
42
|
|
43
|
-
def self.verify_http_server_up(hostname, port: nil,
|
43
|
+
def self.verify_http_server_up(hostname, port: nil,
|
44
|
+
path: nil, retry_wait_seconds: 0.25, proxy: nil)
|
44
45
|
10.times do
|
45
46
|
begin
|
46
|
-
|
47
|
+
url = "http://#{hostname}#{port.nil? ? '' : ':' + port.to_s}#{path || ''}"
|
48
|
+
Excon.get(url, proxy: proxy)
|
47
49
|
return true
|
48
50
|
rescue Excon::Error::Socket, Excon::Error::Timeout
|
49
51
|
sleep retry_wait_seconds
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: percy-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perceptual Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dogstatsd-ruby
|