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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eddf531fb91fbf22f998671ea14c366a2878ae73cbef43358455c49e268bb84c
4
- data.tar.gz: ebb9c132cf0bfeacce25b0a0a2ac98e4f59e8143794b5610ac03086aab0c876e
3
+ metadata.gz: a7080fcc4fac57a2f39b2443e4ca8473a30baa536c7d90a62990e24d01d49a1c
4
+ data.tar.gz: 8116d7e1e95c04d9dc9a6966050aad2e70b8e89a293df6e50940f4c2d75bf673
5
5
  SHA512:
6
- metadata.gz: d1adb262f5d174c4d41d2c219dcb7f4b721844a400fbc677aa18d4f934e52bb4b3804f9ac1d6f85398fbe1cb7f5ddff0feaad77c84d9ad201d5ed8d927a755ad
7
- data.tar.gz: 01c8e92f0a037101399430bc861729f26fe0a5e97202a1db2d154a421cd0b003113ff611a9757ef04f3777bfbf5fa38f175ce571e1f460cb795d4dfc31b3c757
6
+ metadata.gz: 497b402af66b77a76d2254b9f433e112d283318c75d0a9d08b545b75ba5d6f33a49a7756cf8dbc53902a02e282e07c597ad37a2eab680d23e9f4a4987aaca4e9
7
+ data.tar.gz: d78b7f18fbbec3d1e8b72a6b4e3536a31995d6823d94848b99c75cdebe418ae773c11c2d8a371267ae0e2a2e841877150b9ab8f477ba9482bd29332760c8882b
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  module Common
3
- VERSION = '3.1.5'.freeze
3
+ VERSION = '3.1.6'.freeze
4
4
  end
5
5
  end
@@ -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, path: nil, retry_wait_seconds: 0.25)
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
- Excon.get("http://#{hostname}#{port.nil? ? '' : ':' + port.to_s}#{path || ''}")
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.5
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: 2020-07-30 00:00:00.000000000 Z
11
+ date: 2022-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dogstatsd-ruby