percy-common 3.1.6 → 3.1.7.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.buildkite/pipeline.yml +29 -0
- data/.rubocop.yml +2 -0
- data/Dockerfile +10 -0
- data/Makefile +11 -0
- data/docker-compose.override.yml +6 -0
- data/docker-compose.yml +5 -0
- data/lib/percy/common/version.rb +1 -1
- data/lib/percy/network_helpers.rb +5 -4
- data/percy-common.gemspec +4 -1
- metadata +26 -8
- data/.circleci/config.yml +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5510790f591aeace8c944c4e446f12b96acd75e03e7f3db46f934bbb6155ce96
|
4
|
+
data.tar.gz: f583984c2e9a55a30ee7d8e174e3f9960249ae3a4dcfd82c7d56ebff08be0f3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d940e562e60a38824ec0d2f0a15ea70ccc58530e46c3251f4b55855e361680dfbd5842e94d7f8a60a9de3998a9803742cfb46ce67e165b758c2772748ce72f9
|
7
|
+
data.tar.gz: ecae37aa8356a1c0c26fd0c325e156e0fa408d89dea371daf48988424eb7d3894829e91167b07eca00ead11b690968cfd457b663921248e04265887f30113c39
|
@@ -0,0 +1,29 @@
|
|
1
|
+
agents: &agents
|
2
|
+
os: 'linux_small'
|
3
|
+
|
4
|
+
command: &command
|
5
|
+
- make test
|
6
|
+
|
7
|
+
steps:
|
8
|
+
- label: ':rubocop: Lint'
|
9
|
+
agents: *agents
|
10
|
+
command:
|
11
|
+
- make lint
|
12
|
+
|
13
|
+
- label: ':rspec: Test Ruby 2.6'
|
14
|
+
env:
|
15
|
+
BASE_IMAGE: 'ruby:2.6-alpine'
|
16
|
+
agents: *agents
|
17
|
+
command: *command
|
18
|
+
|
19
|
+
- label: ':rspec: Test Ruby 2.7'
|
20
|
+
env:
|
21
|
+
BASE_IMAGE: 'ruby:2.7-alpine'
|
22
|
+
agents: *agents
|
23
|
+
command: *command
|
24
|
+
|
25
|
+
- label: ':rspec: Test Ruby 3.0'
|
26
|
+
env:
|
27
|
+
BASE_IMAGE: 'ruby:3.0-alpine'
|
28
|
+
agents: *agents
|
29
|
+
command: *command
|
data/.rubocop.yml
CHANGED
data/Dockerfile
ADDED
data/Makefile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# setup default base image
|
2
|
+
BASE_IMAGE ?= ruby:2.6-alpine
|
3
|
+
|
4
|
+
build:
|
5
|
+
docker-compose build --build-arg BASE_IMAGE="$(BASE_IMAGE)"
|
6
|
+
|
7
|
+
lint: build
|
8
|
+
docker-compose run app sh -c 'bundle exec rubocop'
|
9
|
+
|
10
|
+
test: build
|
11
|
+
docker-compose run app sh -c 'bundle exec rspec'
|
data/docker-compose.yml
ADDED
data/lib/percy/common/version.rb
CHANGED
@@ -28,10 +28,11 @@ module Percy
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
def self.verify_healthcheck(url:, expected_body: 'ok', retry_wait_seconds: 0.5, proxy: nil
|
31
|
+
def self.verify_healthcheck(url:, expected_body: 'ok', retry_wait_seconds: 0.5, proxy: nil,
|
32
|
+
headers: {})
|
32
33
|
10.times do
|
33
34
|
begin
|
34
|
-
response = Excon.get(url, proxy: proxy)
|
35
|
+
response = Excon.get(url, proxy: proxy, headers: headers)
|
35
36
|
return true if response.body == expected_body
|
36
37
|
rescue Excon::Error::Socket, Excon::Error::Timeout
|
37
38
|
sleep retry_wait_seconds
|
@@ -41,11 +42,11 @@ module Percy
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def self.verify_http_server_up(hostname, port: nil,
|
44
|
-
path: nil, retry_wait_seconds: 0.25, proxy: nil)
|
45
|
+
path: nil, retry_wait_seconds: 0.25, proxy: nil, headers: {})
|
45
46
|
10.times do
|
46
47
|
begin
|
47
48
|
url = "http://#{hostname}#{port.nil? ? '' : ':' + port.to_s}#{path || ''}"
|
48
|
-
Excon.get(url, proxy: proxy)
|
49
|
+
Excon.get(url, proxy: proxy, headers: headers)
|
49
50
|
return true
|
50
51
|
rescue Excon::Error::Socket, Excon::Error::Timeout
|
51
52
|
sleep retry_wait_seconds
|
data/percy-common.gemspec
CHANGED
@@ -15,15 +15,18 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
16
|
f.match(/^(test|spec|features)\//)
|
17
17
|
end
|
18
|
+
|
19
|
+
spec.required_ruby_version = '>= 2.6'
|
18
20
|
spec.require_paths = ['lib']
|
19
21
|
|
20
22
|
spec.add_dependency 'dogstatsd-ruby', '>= 4.4', '< 4.9'
|
21
23
|
spec.add_dependency 'excon', '~> 0.57'
|
22
24
|
spec.add_dependency 'redis', '>= 4.1.3', '< 5.0.0'
|
23
25
|
|
24
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
26
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
27
|
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
26
28
|
spec.add_development_dependency 'percy-style', '~> 0.7.0'
|
27
29
|
spec.add_development_dependency 'rake', '~> 13.0'
|
28
30
|
spec.add_development_dependency 'rspec', '~> 3.2'
|
31
|
+
spec.add_development_dependency 'webrick', '~> 1.0'
|
29
32
|
end
|
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.7.pre.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perceptual Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dogstatsd-ruby
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 2.
|
73
|
+
version: '2.0'
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: 2.
|
80
|
+
version: '2.0'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: guard-rspec
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,6 +134,20 @@ dependencies:
|
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '3.2'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: webrick
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '1.0'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '1.0'
|
137
151
|
description: ''
|
138
152
|
email:
|
139
153
|
- team@percy.io
|
@@ -141,17 +155,21 @@ executables: []
|
|
141
155
|
extensions: []
|
142
156
|
extra_rdoc_files: []
|
143
157
|
files:
|
144
|
-
- ".
|
158
|
+
- ".buildkite/pipeline.yml"
|
145
159
|
- ".gitignore"
|
146
160
|
- ".rspec"
|
147
161
|
- ".rubocop.yml"
|
148
162
|
- ".rubocop_todo.yml"
|
163
|
+
- Dockerfile
|
149
164
|
- Gemfile
|
150
165
|
- Guardfile
|
151
166
|
- LICENSE
|
167
|
+
- Makefile
|
152
168
|
- README.md
|
153
169
|
- RELEASING.md
|
154
170
|
- Rakefile
|
171
|
+
- docker-compose.override.yml
|
172
|
+
- docker-compose.yml
|
155
173
|
- lib/percy/common.rb
|
156
174
|
- lib/percy/common/engine.rb
|
157
175
|
- lib/percy/common/version.rb
|
@@ -174,12 +192,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
192
|
requirements:
|
175
193
|
- - ">="
|
176
194
|
- !ruby/object:Gem::Version
|
177
|
-
version: '
|
195
|
+
version: '2.6'
|
178
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
197
|
requirements:
|
180
|
-
- - "
|
198
|
+
- - ">"
|
181
199
|
- !ruby/object:Gem::Version
|
182
|
-
version:
|
200
|
+
version: 1.3.1
|
183
201
|
requirements: []
|
184
202
|
rubygems_version: 3.1.2
|
185
203
|
signing_key:
|
data/.circleci/config.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
|
3
|
-
jobs:
|
4
|
-
ruby_25:
|
5
|
-
docker:
|
6
|
-
- image: circleci/ruby:2.5-node-browsers
|
7
|
-
steps:
|
8
|
-
- checkout
|
9
|
-
- run: gem update --system
|
10
|
-
- run: gem install bundler
|
11
|
-
- run: bundle install
|
12
|
-
- run: bundle exec rubocop -D
|
13
|
-
|
14
|
-
workflows:
|
15
|
-
version: 2
|
16
|
-
test:
|
17
|
-
jobs:
|
18
|
-
- ruby_25
|