baza.rb 0.14.2 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +25 -26
- data/lib/baza-rb/version.rb +1 -1
- data/lib/baza-rb.rb +15 -3
- data/pact.json +14 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95c2592ece77b7cd583876c9e59e182b782f2ea7bde62d6bf8eeca5b8c1698bb
|
|
4
|
+
data.tar.gz: 645790f7dd14d726ccbb93420988b1393a58937a6e399cf3aaaab24a9ade1526
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2c409181614ee9f56da06b11061dc573f263e6f224130a5278847818645b052fe3b00be57448da61e4256ac8e9a4cc7bce425993f9522e513603641e370150a
|
|
7
|
+
data.tar.gz: 5a18ecae4d599ef36f9fe6c273a53cd40d1235402574bd79196cc5f3bd95c5c4831d9163ed133c9ce6ad843697d6353bd19b6a2034370715365248f68addd75b
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -17,7 +17,7 @@ PATH
|
|
|
17
17
|
GEM
|
|
18
18
|
remote: https://rubygems.org/
|
|
19
19
|
specs:
|
|
20
|
-
activesupport (8.1.
|
|
20
|
+
activesupport (8.1.3)
|
|
21
21
|
base64
|
|
22
22
|
bigdecimal
|
|
23
23
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -58,7 +58,7 @@ GEM
|
|
|
58
58
|
ffi (>= 1.15.0)
|
|
59
59
|
expgen (0.1.1)
|
|
60
60
|
parslet
|
|
61
|
-
factbase (0.19.
|
|
61
|
+
factbase (0.19.10)
|
|
62
62
|
backtrace (~> 0.4)
|
|
63
63
|
decoor (~> 0.1)
|
|
64
64
|
ellipsized (~> 0.3)
|
|
@@ -90,16 +90,17 @@ GEM
|
|
|
90
90
|
i18n (1.14.8)
|
|
91
91
|
concurrent-ruby (~> 1.0)
|
|
92
92
|
iri (0.11.8)
|
|
93
|
-
json (2.
|
|
93
|
+
json (2.19.4)
|
|
94
94
|
jsonpath (1.1.5)
|
|
95
95
|
multi_json
|
|
96
96
|
language_server-protocol (3.17.0.5)
|
|
97
97
|
lint_roller (1.1.0)
|
|
98
98
|
logger (1.7.0)
|
|
99
|
-
loog (0.
|
|
99
|
+
loog (0.8.0)
|
|
100
100
|
ellipsized
|
|
101
101
|
logger (~> 1.0)
|
|
102
|
-
minitest (6.0.
|
|
102
|
+
minitest (6.0.6)
|
|
103
|
+
drb (~> 2.0)
|
|
103
104
|
prism (~> 1.5)
|
|
104
105
|
minitest-reporters (1.7.1)
|
|
105
106
|
ansi
|
|
@@ -113,13 +114,13 @@ GEM
|
|
|
113
114
|
net-http (0.9.1)
|
|
114
115
|
uri (>= 0.11.1)
|
|
115
116
|
nio4r (2.7.5)
|
|
116
|
-
nokogiri (1.19.
|
|
117
|
+
nokogiri (1.19.3-arm64-darwin)
|
|
117
118
|
racc (~> 1.4)
|
|
118
|
-
nokogiri (1.19.
|
|
119
|
+
nokogiri (1.19.3-x86_64-darwin)
|
|
119
120
|
racc (~> 1.4)
|
|
120
|
-
nokogiri (1.19.
|
|
121
|
+
nokogiri (1.19.3-x86_64-linux-gnu)
|
|
121
122
|
racc (~> 1.4)
|
|
122
|
-
nokogiri (1.19.
|
|
123
|
+
nokogiri (1.19.3-x86_64-linux-musl)
|
|
123
124
|
racc (~> 1.4)
|
|
124
125
|
online (0.3.0)
|
|
125
126
|
openssl (>= 3)
|
|
@@ -127,8 +128,7 @@ GEM
|
|
|
127
128
|
openssl (4.0.0)
|
|
128
129
|
os (1.1.4)
|
|
129
130
|
others (0.1.1)
|
|
130
|
-
pact (1.67.
|
|
131
|
-
jsonpath (~> 1.0)
|
|
131
|
+
pact (1.67.5)
|
|
132
132
|
pact-mock_service (~> 3.0, >= 3.3.1)
|
|
133
133
|
pact-support (~> 1.21, >= 1.21.2)
|
|
134
134
|
rack
|
|
@@ -136,7 +136,6 @@ GEM
|
|
|
136
136
|
rack-test (>= 0.6.3, < 3.0.0)
|
|
137
137
|
rainbow (~> 3.1)
|
|
138
138
|
rspec (~> 3.0)
|
|
139
|
-
string_pattern (~> 2.0)
|
|
140
139
|
thor (>= 0.20, < 2.0)
|
|
141
140
|
webrick (~> 1.8)
|
|
142
141
|
zeitwerk (~> 2.3)
|
|
@@ -165,8 +164,8 @@ GEM
|
|
|
165
164
|
jsonpath (~> 1.0)
|
|
166
165
|
rainbow (~> 3.1.1)
|
|
167
166
|
string_pattern (~> 2.0)
|
|
168
|
-
parallel (1.
|
|
169
|
-
parser (3.3.
|
|
167
|
+
parallel (1.28.0)
|
|
168
|
+
parser (3.3.11.1)
|
|
170
169
|
ast (~> 2.4.1)
|
|
171
170
|
racc
|
|
172
171
|
parslet (2.0.0)
|
|
@@ -177,13 +176,13 @@ GEM
|
|
|
177
176
|
public_suffix (7.0.2)
|
|
178
177
|
puma (7.2.0)
|
|
179
178
|
nio4r (~> 2.0)
|
|
180
|
-
qbash (0.
|
|
179
|
+
qbash (0.8.3)
|
|
181
180
|
backtrace (> 0)
|
|
182
181
|
elapsed (> 0)
|
|
183
182
|
loog (> 0)
|
|
184
183
|
tago (> 0)
|
|
185
184
|
racc (1.8.1)
|
|
186
|
-
rack (3.2.
|
|
185
|
+
rack (3.2.6)
|
|
187
186
|
rack-protection (4.2.1)
|
|
188
187
|
base64 (>= 0.1.0)
|
|
189
188
|
logger (>= 1.6.0)
|
|
@@ -198,14 +197,14 @@ GEM
|
|
|
198
197
|
rackup (2.3.1)
|
|
199
198
|
rack (>= 3)
|
|
200
199
|
rainbow (3.1.1)
|
|
201
|
-
rake (13.
|
|
202
|
-
random-port (0.
|
|
200
|
+
rake (13.4.2)
|
|
201
|
+
random-port (0.8.2)
|
|
203
202
|
tago (~> 0.0)
|
|
204
203
|
rdoc (7.1.0)
|
|
205
204
|
erb
|
|
206
205
|
psych (>= 4.0.0)
|
|
207
206
|
tsort
|
|
208
|
-
regexp_parser (2.
|
|
207
|
+
regexp_parser (2.12.0)
|
|
209
208
|
retries (0.0.5)
|
|
210
209
|
rexml (3.4.4)
|
|
211
210
|
rspec (3.13.2)
|
|
@@ -217,22 +216,22 @@ GEM
|
|
|
217
216
|
rspec-expectations (3.13.5)
|
|
218
217
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
219
218
|
rspec-support (~> 3.13.0)
|
|
220
|
-
rspec-mocks (3.13.
|
|
219
|
+
rspec-mocks (3.13.8)
|
|
221
220
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
222
221
|
rspec-support (~> 3.13.0)
|
|
223
222
|
rspec-support (3.13.7)
|
|
224
|
-
rubocop (1.
|
|
223
|
+
rubocop (1.86.1)
|
|
225
224
|
json (~> 2.3)
|
|
226
225
|
language_server-protocol (~> 3.17.0.2)
|
|
227
226
|
lint_roller (~> 1.1.0)
|
|
228
|
-
parallel (
|
|
227
|
+
parallel (>= 1.10)
|
|
229
228
|
parser (>= 3.3.0.2)
|
|
230
229
|
rainbow (>= 2.2.2, < 4.0)
|
|
231
230
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
232
231
|
rubocop-ast (>= 1.49.0, < 2.0)
|
|
233
232
|
ruby-progressbar (~> 1.7)
|
|
234
233
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
235
|
-
rubocop-ast (1.49.
|
|
234
|
+
rubocop-ast (1.49.1)
|
|
236
235
|
parser (>= 3.3.7.2)
|
|
237
236
|
prism (~> 1.7)
|
|
238
237
|
rubocop-minitest (0.38.2)
|
|
@@ -288,8 +287,8 @@ GEM
|
|
|
288
287
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
289
288
|
webrick (1.9.2)
|
|
290
289
|
yaml (0.4.0)
|
|
291
|
-
yard (0.9.
|
|
292
|
-
zeitwerk (2.7.
|
|
290
|
+
yard (0.9.43)
|
|
291
|
+
zeitwerk (2.7.5)
|
|
293
292
|
|
|
294
293
|
PLATFORMS
|
|
295
294
|
arm64-darwin
|
|
@@ -328,7 +327,7 @@ DEPENDENCIES
|
|
|
328
327
|
wait_for (~> 0.1)
|
|
329
328
|
webmock (~> 3.24)
|
|
330
329
|
webrick (~> 1.9)
|
|
331
|
-
yard (= 0.9.
|
|
330
|
+
yard (= 0.9.43)
|
|
332
331
|
|
|
333
332
|
BUNDLED WITH
|
|
334
333
|
2.6.8
|
data/lib/baza-rb/version.rb
CHANGED
data/lib/baza-rb.rb
CHANGED
|
@@ -44,6 +44,11 @@ class BazaRb
|
|
|
44
44
|
# When request timeout.
|
|
45
45
|
class TimedOut < StandardError; end
|
|
46
46
|
|
|
47
|
+
# When libcurl reported a transport-level failure (HTTP code 0, e.g.
|
|
48
|
+
# connection reset, partial file, SSL error). Subclasses {TimedOut} so
|
|
49
|
+
# {#retry_it} retries it as a transient failure.
|
|
50
|
+
class ConnectionFailed < TimedOut; end
|
|
51
|
+
|
|
47
52
|
# Unexpected response arrived from the server.
|
|
48
53
|
class BadResponse < StandardError; end
|
|
49
54
|
|
|
@@ -226,6 +231,7 @@ class BazaRb
|
|
|
226
231
|
raise 'The "pname" of the product is nil' if pname.nil?
|
|
227
232
|
raise 'The "pname" of the product may not be empty' if pname.empty?
|
|
228
233
|
raise 'The "owner" of the lock is nil' if owner.nil?
|
|
234
|
+
raise 'The "owner" of the lock may not be empty' if owner.empty?
|
|
229
235
|
elapsed(@loog, level: Logger::INFO) do
|
|
230
236
|
ret = post(
|
|
231
237
|
home.append('lock').append(pname),
|
|
@@ -654,7 +660,13 @@ class BazaRb
|
|
|
654
660
|
end
|
|
655
661
|
end
|
|
656
662
|
|
|
657
|
-
# Execute a block with retries on
|
|
663
|
+
# Execute a block with retries on server-side failures.
|
|
664
|
+
#
|
|
665
|
+
# Retries on any HTTP status >= 499. The 499 code ("Client Closed Request")
|
|
666
|
+
# is emitted by upstream proxies such as nginx when they abort an in-flight
|
|
667
|
+
# request, typically because of a load-balancer or upstream timeout. From
|
|
668
|
+
# the client's point of view this is a transient server-side failure and
|
|
669
|
+
# should be retried just like 5xx responses.
|
|
658
670
|
#
|
|
659
671
|
# @yield The block to execute with retries
|
|
660
672
|
# @return [Object] The result of the block execution
|
|
@@ -662,7 +674,7 @@ class BazaRb
|
|
|
662
674
|
attempt = 0
|
|
663
675
|
loop do
|
|
664
676
|
ret = yield
|
|
665
|
-
if ret.code >=
|
|
677
|
+
if ret.code >= 499 && attempt < @retries
|
|
666
678
|
attempt += 1
|
|
667
679
|
seconds = @pause * (2**attempt)
|
|
668
680
|
@loog.info("Server seems to be in trouble (#{ret.code}), sleep #{seconds}s (attempt no.#{attempt})...")
|
|
@@ -723,7 +735,7 @@ class BazaRb
|
|
|
723
735
|
"(r:#{ret.return_code}, m:#{ret.return_message})"
|
|
724
736
|
end
|
|
725
737
|
@loog.error(msg)
|
|
726
|
-
raise ServerFailure, msg
|
|
738
|
+
raise(ret.code.zero? ? ConnectionFailed : ServerFailure, msg)
|
|
727
739
|
end
|
|
728
740
|
|
|
729
741
|
# Make a GET request.
|
data/pact.json
CHANGED
|
@@ -669,7 +669,7 @@
|
|
|
669
669
|
"matchers": [
|
|
670
670
|
{
|
|
671
671
|
"match": "regex",
|
|
672
|
-
"regex": "(?-mix:^yes|
|
|
672
|
+
"regex": "(?-mix:^(yes|started .+)$)"
|
|
673
673
|
}
|
|
674
674
|
]
|
|
675
675
|
}
|
|
@@ -808,6 +808,12 @@
|
|
|
808
808
|
"id": 47,
|
|
809
809
|
"pname": "pact93"
|
|
810
810
|
}
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"name": "job is finished",
|
|
814
|
+
"params": {
|
|
815
|
+
"id": 47
|
|
816
|
+
}
|
|
811
817
|
}
|
|
812
818
|
],
|
|
813
819
|
"request": {
|
|
@@ -1340,6 +1346,12 @@
|
|
|
1340
1346
|
"id": 513,
|
|
1341
1347
|
"pname": "pact98"
|
|
1342
1348
|
}
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"name": "job is finished",
|
|
1352
|
+
"params": {
|
|
1353
|
+
"id": 513
|
|
1354
|
+
}
|
|
1343
1355
|
}
|
|
1344
1356
|
],
|
|
1345
1357
|
"request": {
|
|
@@ -1757,7 +1769,7 @@
|
|
|
1757
1769
|
"client": {
|
|
1758
1770
|
"name": "BazaRb",
|
|
1759
1771
|
"version": "0.0.0",
|
|
1760
|
-
"date": "2026-
|
|
1772
|
+
"date": "2026-05-01T05:46:22Z"
|
|
1761
1773
|
}
|
|
1762
1774
|
},
|
|
1763
1775
|
"provider": {
|