surfliner-metadata_consumer 0.1.0.pre.alpha.7 → 0.1.0.pre.alpha.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c496d7587eb02bc3020be31fb8a9052e67e52aa08b97c3dbc81bb26d44f29fc3
4
- data.tar.gz: 57d58bc7f428b049efc1e1f4db521970a8f43e389b966c20fb99156313c6c085
3
+ metadata.gz: e158909136b381b06285e59db49b2e5045681799a2409728679ace37deebfdda
4
+ data.tar.gz: 0fbb293b3e0638e471ebbf9d60869457d803924fae20609473eae55ceb49e9ee
5
5
  SHA512:
6
- metadata.gz: ebb4d7a8b61f8b03d4376454a526921d19e18eb94cca49029e8e75736ddee0ec61372a6bde72fafda21162eaa4f0ef655dc759f90150c309c8e20ec5404b450b
7
- data.tar.gz: 43a75ff273881bf59ea4c20ae84e299b853b8c6779bc03e48e6fd42d6846a9268236aa034234ce8db6275ce600b255cac5eff23d722540496bc531347a589e7a
6
+ metadata.gz: bee60903dfbc4a7a19aaeb010fea2f3fa49631623a62dd909a854c26f08b1899e721854913761a033d6dd520cf197f368fd2fd7fe54e4aeaca2768f4c0600775
7
+ data.tar.gz: 292a51e65b9b4b16e8cde2c21b9e6dd8c8c345016ace2cbc9fd32ab5e4fd80d29785b390d87eb105bec4161574dfcc15ddd526f7d7513f8d3574de397bafb9e2
data/CHANGES.md CHANGED
@@ -1,3 +1,26 @@
1
+ # 0.1.0.pre.alpha.10 (2026-07-09)
2
+
3
+ - `Payload`:
4
+ - can now be initialized from a hash, which makes mocking
5
+ payloads in Ruby less cumbersome.
6
+ - internally normalizes keys to `camelCase` (or `PascalCase` if
7
+ already capitalized) and stores them as symbols, not strings.
8
+ - now has a `#to_json` to compliment `#to_s`, which
9
+ claimed to provide JSON but did not.
10
+ - now has a `#data` accessor that exposes the internal hash.
11
+ - `SuperskunkClient::UnexpectedResponse` now exposes the request URI
12
+ (`uri`) and HTTP status code (`status`).
13
+
14
+ # 0.1.0.pre.alpha.9 (2026-01-22)
15
+
16
+ - Support configuring `SuperskunkClient` with different JSON-LD profile
17
+ and/or User-Agent.
18
+
19
+ # 0.1.0.pre.alpha.8 (2025-04-29)
20
+
21
+ - Support comparing configuration objects by value equality, so they can
22
+ be used as hash keys.
23
+
1
24
  # 0.1.0.pre.alpha.7 (2025-04-28)
2
25
 
3
26
  - Fix issue where `RABBITMQ_AWAIT_ON_CLOSE` environment variable could
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- surfliner-metadata_consumer (0.1.0.pre.alpha.7)
4
+ surfliner-metadata_consumer (0.1.0.pre.alpha.10)
5
5
  bunny (~> 2.24)
6
6
  opentelemetry-exporter-otlp (~> 0.26.3)
7
7
  opentelemetry-instrumentation-all (~> 0.60.0)
@@ -11,11 +11,11 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- addressable (2.8.7)
15
- public_suffix (>= 2.0.2, < 7.0)
16
- amq-protocol (2.3.3)
14
+ addressable (2.9.0)
15
+ public_suffix (>= 2.0.2, < 8.0)
16
+ amq-protocol (2.8.0)
17
17
  ast (2.4.3)
18
- bigdecimal (3.1.9)
18
+ bigdecimal (4.1.2)
19
19
  builder (3.3.0)
20
20
  bunny (2.24.0)
21
21
  amq-protocol (~> 2.3)
@@ -27,40 +27,42 @@ GEM
27
27
  ci_reporter (~> 2.0)
28
28
  rspec (>= 2.14, < 4)
29
29
  colorize (0.8.1)
30
- crack (1.0.0)
30
+ crack (1.0.1)
31
31
  bigdecimal
32
32
  rexml
33
- date (3.4.1)
34
33
  debug (1.9.2)
35
34
  irb (~> 1.10)
36
35
  reline (>= 0.3.8)
37
- diff-lcs (1.6.1)
36
+ diff-lcs (1.6.2)
38
37
  docile (1.4.1)
39
38
  dotenv (2.8.1)
40
- faraday (2.13.1)
39
+ erb (6.0.4)
40
+ faraday (2.14.3)
41
41
  faraday-net_http (>= 2.0, < 3.5)
42
42
  json
43
43
  logger
44
- faraday-net_http (3.4.0)
45
- net-http (>= 0.5.0)
44
+ faraday-net_http (3.4.4)
45
+ net-http (~> 0.5)
46
46
  github-markup (5.0.1)
47
- google-protobuf (3.25.7)
48
- googleapis-common-protos-types (1.19.0)
47
+ google-protobuf (3.25.8)
48
+ googleapis-common-protos-types (1.20.0)
49
49
  google-protobuf (>= 3.18, < 5.a)
50
- hashdiff (1.1.2)
51
- io-console (0.8.0)
52
- irb (1.15.2)
50
+ hashdiff (1.2.1)
51
+ io-console (0.8.2)
52
+ irb (1.18.0)
53
53
  pp (>= 0.6.0)
54
+ prism (>= 1.3.0)
54
55
  rdoc (>= 4.0.0)
55
56
  reline (>= 0.4.2)
56
- json (2.11.3)
57
- language_server-protocol (3.17.0.4)
57
+ json (2.20.0)
58
+ language_server-protocol (3.17.0.6)
58
59
  lint_roller (1.1.0)
59
60
  logger (1.7.0)
60
- net-http (0.6.0)
61
- uri
62
- opentelemetry-api (1.5.0)
63
- opentelemetry-common (0.22.0)
61
+ net-http (0.9.1)
62
+ uri (>= 0.11.1)
63
+ opentelemetry-api (1.10.1)
64
+ logger
65
+ opentelemetry-common (0.25.1)
64
66
  opentelemetry-api (~> 1.0)
65
67
  opentelemetry-exporter-otlp (0.26.3)
66
68
  google-protobuf (~> 3.14)
@@ -69,10 +71,10 @@ GEM
69
71
  opentelemetry-common (~> 0.20)
70
72
  opentelemetry-sdk (~> 1.2)
71
73
  opentelemetry-semantic_conventions
72
- opentelemetry-helpers-mysql (0.2.0)
73
- opentelemetry-api (~> 1.0)
74
+ opentelemetry-helpers-mysql (0.6.0)
75
+ opentelemetry-api (~> 1.7)
74
76
  opentelemetry-common (~> 0.21)
75
- opentelemetry-helpers-sql-obfuscation (0.3.0)
77
+ opentelemetry-helpers-sql-obfuscation (0.5.0)
76
78
  opentelemetry-common (~> 0.21)
77
79
  opentelemetry-instrumentation-action_mailer (0.1.0)
78
80
  opentelemetry-api (~> 1.0)
@@ -246,108 +248,110 @@ GEM
246
248
  opentelemetry-helpers-sql-obfuscation
247
249
  opentelemetry-instrumentation-base (~> 0.22.1)
248
250
  opentelemetry-semantic_conventions (>= 1.8.0)
249
- opentelemetry-registry (0.4.0)
251
+ opentelemetry-registry (0.6.1)
250
252
  opentelemetry-api (~> 1.1)
251
253
  opentelemetry-sdk (1.4.1)
252
254
  opentelemetry-api (~> 1.1)
253
255
  opentelemetry-common (~> 0.20)
254
256
  opentelemetry-registry (~> 0.2)
255
257
  opentelemetry-semantic_conventions
256
- opentelemetry-semantic_conventions (1.11.0)
258
+ opentelemetry-semantic_conventions (1.43.0)
257
259
  opentelemetry-api (~> 1.0)
258
- parallel (1.27.0)
259
- parser (3.3.8.0)
260
+ parallel (2.1.0)
261
+ parser (3.3.11.1)
260
262
  ast (~> 2.4.1)
261
263
  racc
262
- pp (0.6.2)
264
+ pp (0.6.4)
263
265
  prettyprint
264
266
  prettyprint (0.2.0)
265
- prism (1.4.0)
266
- psych (5.2.3)
267
- date
268
- stringio
269
- public_suffix (6.0.1)
267
+ prism (1.9.0)
268
+ public_suffix (7.0.5)
270
269
  racc (1.8.1)
271
270
  rainbow (3.1.1)
272
- rake (13.2.1)
273
- rbtree (0.4.6)
274
- rdoc (6.13.1)
275
- psych (>= 4.0.0)
271
+ rake (13.4.2)
272
+ rbs (4.0.3)
273
+ logger
274
+ prism (>= 1.6.0)
275
+ tsort
276
+ rbtree (0.4.7)
277
+ rdoc (8.0.0)
278
+ erb
279
+ prism (>= 1.6.0)
280
+ rbs (>= 4.0.0)
281
+ tsort
276
282
  redcarpet (3.6.1)
277
- regexp_parser (2.10.0)
278
- reline (0.6.1)
283
+ regexp_parser (2.12.0)
284
+ reline (0.6.3)
279
285
  io-console (~> 0.5)
280
- rexml (3.4.1)
286
+ rexml (3.4.4)
281
287
  rsolr (2.6.0)
282
288
  builder (>= 2.1.2)
283
289
  faraday (>= 0.9, < 3, != 2.0.0)
284
- rspec (3.13.0)
290
+ rspec (3.13.2)
285
291
  rspec-core (~> 3.13.0)
286
292
  rspec-expectations (~> 3.13.0)
287
293
  rspec-mocks (~> 3.13.0)
288
- rspec-core (3.13.3)
294
+ rspec-core (3.13.6)
289
295
  rspec-support (~> 3.13.0)
290
- rspec-expectations (3.13.3)
296
+ rspec-expectations (3.13.5)
291
297
  diff-lcs (>= 1.2.0, < 2.0)
292
298
  rspec-support (~> 3.13.0)
293
- rspec-mocks (3.13.2)
299
+ rspec-mocks (3.13.8)
294
300
  diff-lcs (>= 1.2.0, < 2.0)
295
301
  rspec-support (~> 3.13.0)
296
- rspec-support (3.13.2)
297
- rubocop (1.75.4)
302
+ rspec-support (3.13.7)
303
+ rubocop (1.87.0)
298
304
  json (~> 2.3)
299
305
  language_server-protocol (~> 3.17.0.2)
300
306
  lint_roller (~> 1.1.0)
301
- parallel (~> 1.10)
307
+ parallel (>= 1.10)
302
308
  parser (>= 3.3.0.2)
303
309
  rainbow (>= 2.2.2, < 4.0)
304
310
  regexp_parser (>= 2.9.3, < 3.0)
305
- rubocop-ast (>= 1.44.0, < 2.0)
311
+ rubocop-ast (>= 1.49.0, < 2.0)
306
312
  ruby-progressbar (~> 1.7)
307
313
  unicode-display_width (>= 2.4.0, < 4.0)
308
- rubocop-ast (1.44.1)
314
+ rubocop-ast (1.50.0)
309
315
  parser (>= 3.3.7.2)
310
- prism (~> 1.4)
311
- rubocop-performance (1.25.0)
316
+ prism (~> 1.7)
317
+ rubocop-performance (1.26.1)
312
318
  lint_roller (~> 1.1)
313
319
  rubocop (>= 1.75.0, < 2.0)
314
- rubocop-ast (>= 1.38.0, < 2.0)
320
+ rubocop-ast (>= 1.47.1, < 2.0)
315
321
  ruby-progressbar (1.13.0)
316
- set (1.1.1)
317
322
  simplecov (0.22.0)
318
323
  docile (~> 1.1)
319
324
  simplecov-html (~> 0.11)
320
325
  simplecov_json_formatter (~> 0.1)
321
- simplecov-cobertura (2.1.0)
326
+ simplecov-cobertura (3.2.0)
322
327
  rexml
323
328
  simplecov (~> 0.19)
324
- simplecov-html (0.13.1)
329
+ simplecov-html (0.13.2)
325
330
  simplecov_json_formatter (0.1.4)
326
- sorted_set (1.0.3)
331
+ sorted_set (1.1.0)
327
332
  rbtree
328
- set (~> 1.0)
329
- standard (1.49.0)
333
+ standard (1.55.0)
330
334
  language_server-protocol (~> 3.17.0.2)
331
335
  lint_roller (~> 1.0)
332
- rubocop (~> 1.75.2)
336
+ rubocop (~> 1.87.0)
333
337
  standard-custom (~> 1.0.0)
334
338
  standard-performance (~> 1.8)
335
339
  standard-custom (1.0.2)
336
340
  lint_roller (~> 1.0)
337
341
  rubocop (~> 1.50)
338
- standard-performance (1.8.0)
342
+ standard-performance (1.9.0)
339
343
  lint_roller (~> 1.1)
340
- rubocop-performance (~> 1.25.0)
341
- stringio (3.1.7)
342
- unicode-display_width (3.1.4)
343
- unicode-emoji (~> 4.0, >= 4.0.4)
344
- unicode-emoji (4.0.4)
345
- uri (1.0.3)
346
- webmock (3.25.1)
344
+ rubocop-performance (~> 1.26.0)
345
+ tsort (0.2.0)
346
+ unicode-display_width (3.2.0)
347
+ unicode-emoji (~> 4.1)
348
+ unicode-emoji (4.2.0)
349
+ uri (1.1.1)
350
+ webmock (3.26.2)
347
351
  addressable (>= 2.8.0)
348
352
  crack (>= 0.3.2)
349
353
  hashdiff (>= 0.4.0, < 2.0.0)
350
- yard (0.9.37)
354
+ yard (0.9.44)
351
355
 
352
356
  PLATFORMS
353
357
  ruby
@@ -363,11 +367,131 @@ DEPENDENCIES
363
367
  redcarpet (~> 3.6)
364
368
  rspec (~> 3.13)
365
369
  simplecov (~> 0.22)
366
- simplecov-cobertura (~> 2.1)
370
+ simplecov-cobertura (~> 3.2)
367
371
  standard (~> 1.31)
368
372
  surfliner-metadata_consumer!
369
373
  webmock (~> 3.12)
370
374
  yard (~> 0.9.37)
371
375
 
376
+ CHECKSUMS
377
+ addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
378
+ amq-protocol (2.8.0) sha256=d06bbb341fa683459954f5a854388dac729171500116d81311cfbeaad83392ab
379
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
380
+ bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
381
+ builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
382
+ bunny (2.24.0) sha256=072fe4ae98eaa9c95a17e4d166204f710bba8a9a7070b73a8c3b023f439d1682
383
+ ci_reporter (2.1.0) sha256=8ab6c378e3ea6af4f99790523ef52049405399156992fc5f51284b59b5728a61
384
+ ci_reporter_rspec (1.0.0) sha256=ba5571f82b418f8bf959c69d2fc2adf306d19a971519402f2e45e7daa4457de1
385
+ colorize (0.8.1) sha256=0ba0c2a58232f9b706dc30621ea6aa6468eeea120eb6f1ccc400105b90c4798c
386
+ crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e
387
+ debug (1.9.2) sha256=48e026c0852c7a10c60263e2e527968308958e266231e36d64e3efcabec7e7fc
388
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
389
+ docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
390
+ dotenv (2.8.1) sha256=c5944793349ae03c432e1780a2ca929d60b88c7d14d52d630db0508c3a8a17d8
391
+ erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
392
+ faraday (2.14.3) sha256=1882247e6766615c8220b4392bf1d27f6ebb63d8e28267587cef1fb0bf37f278
393
+ faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588
394
+ github-markup (5.0.1) sha256=b6e9f8538cb8566935321433190615cbc747550e1705a7af5ba24048d0ddc472
395
+ google-protobuf (3.25.8) sha256=102c8500502e224a5daa7447bdd2c458a25a6c7b0bf5d8496a559ada131952b7
396
+ googleapis-common-protos-types (1.20.0) sha256=5e374b06bcfc7e13556e7c0d87b99f1fa3d42de6396a1de3d8fc13aefb4dd07f
397
+ hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1
398
+ io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
399
+ irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
400
+ json (2.20.0) sha256=9362bc6e55a952b056abf9167cf053358181c904cb70cd6eee0808ea830fc32b
401
+ language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
402
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
403
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
404
+ net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996
405
+ opentelemetry-api (1.10.1) sha256=5db9535a8aa9e569808518aa103b2cfac44728672a1799e1dd217fe6d9c5642e
406
+ opentelemetry-common (0.25.1) sha256=38fe87c751e4e13fcd47a8290b4ad67bbedf76c4ed89aeced5ea5c620e66bfb1
407
+ opentelemetry-exporter-otlp (0.26.3) sha256=fc1deea7924c74e3536983b02684d1bc7e9737baa5c38f3aff9809a7fd330399
408
+ opentelemetry-helpers-mysql (0.6.0) sha256=7eeb5e6950c434775a8cf28b5fde4defc12e8b865c86479ce3119fcf593d9337
409
+ opentelemetry-helpers-sql-obfuscation (0.5.0) sha256=b0a073fb4ac4bf9e3b87ef68db4e5267a3260495c48d0c7682c1d3c3b2baef3f
410
+ opentelemetry-instrumentation-action_mailer (0.1.0) sha256=52fe3400bb9051d079a2aed0858fc2d98c677bfb66d163e3b438b67c795dd1a9
411
+ opentelemetry-instrumentation-action_pack (0.9.0) sha256=c5df8472afc9cdbfc1425d9af7816b9cfc1a1a69b86621f1fc624974bd9acb9a
412
+ opentelemetry-instrumentation-action_view (0.7.2) sha256=30f2da1547afd78e2193f16e1cf6d53d9a06650a1ac29b4bda2f1b2d41a3119f
413
+ opentelemetry-instrumentation-active_job (0.7.8) sha256=281b3d9bace7aac9f1e121b75f294e7ee8beaedd1f20405539c54df2e6763942
414
+ opentelemetry-instrumentation-active_model_serializers (0.20.2) sha256=c7826e89b79642bc01ff5bd92e425c9b5c64581333a27bb4458c4cf39143897b
415
+ opentelemetry-instrumentation-active_record (0.7.4) sha256=7dd72e74c846130641fc001eb9bd90775a2153501349a7a429f2ed5eb38900bb
416
+ opentelemetry-instrumentation-active_support (0.5.3) sha256=0c8df46aa1627a5800f13e86be3ea352ccd4ab5f13f1792bfb7c1de0f20d179f
417
+ opentelemetry-instrumentation-all (0.60.0) sha256=42c99aab47387d909e803d7c1b3f77748c1dbf83a9274f469cf38dd6b3623e90
418
+ opentelemetry-instrumentation-aws_sdk (0.5.4) sha256=1805dac273baf70252568423f2005c98afbff4f385aeea9eb423fd48952cb3bb
419
+ opentelemetry-instrumentation-base (0.22.6) sha256=3ee56109b4d5c563ef95cf1ac404dce99c9cdc97a4b419fc74609ef822be525f
420
+ opentelemetry-instrumentation-bunny (0.21.4) sha256=86ee48e3034cae9b4eec97e161aab05ef1ee5a55a1fc2881a528658c62d65baa
421
+ opentelemetry-instrumentation-concurrent_ruby (0.21.4) sha256=04efc8114459bbd5d104b559c413aef42e12a1a489e41df2b7b89eb1f88714ce
422
+ opentelemetry-instrumentation-dalli (0.25.4) sha256=87b07439097cee9ea3fd49185ff03e57eb3ca3ba9e6a837abab4e0ab0e2f0697
423
+ opentelemetry-instrumentation-delayed_job (0.22.4) sha256=1cd520ed6e8460fb77cdd4d0756e5c13d95da1589b386324ba5d25306d8a2b6f
424
+ opentelemetry-instrumentation-ethon (0.21.9) sha256=20f30473788e160106cc2ecaa23772e4f1237651278db10d9cff535f11a8435c
425
+ opentelemetry-instrumentation-excon (0.22.5) sha256=ec0f1b5b5a808e65d75bc3914c90108eba6c29dd6eb997c6de6ba3ffc3a989f4
426
+ opentelemetry-instrumentation-faraday (0.24.8) sha256=1b9d12478f570706893218018989e2b8be58dcf0a5c2b4cc31406e43cf73890f
427
+ opentelemetry-instrumentation-grape (0.1.8) sha256=208421bbbe252ad8bf1815fc6b1ae5a5a90df10d2aec124461777aa1cc636330
428
+ opentelemetry-instrumentation-graphql (0.28.4) sha256=c2cfccba8d443733d4a42a0c5c2c301daa34f1b382b0da0166255280c702dc6c
429
+ opentelemetry-instrumentation-gruf (0.2.1) sha256=4e0b18360508607e7251532e96613deb24974aa80b236d0abd49b840293dc545
430
+ opentelemetry-instrumentation-http (0.23.5) sha256=71f1b4f9a722a7447e75b731835b832536739d683fbc6b61532cb318d1635e1e
431
+ opentelemetry-instrumentation-http_client (0.22.8) sha256=411f45781b897fc1a21a04af4d9de7e2e9b7259b8a500f5c230709c9de8f456b
432
+ opentelemetry-instrumentation-koala (0.20.6) sha256=0d0c56a3b5e94a77f477312841f48f2ee1315efb84e5c04f2bb75ad5944bb7b6
433
+ opentelemetry-instrumentation-lmdb (0.22.3) sha256=376d60156f7025ac9a64a8e5e53238ae8ac310cf1a337ceb432fec1e0bada502
434
+ opentelemetry-instrumentation-mongo (0.22.4) sha256=77aae660e8b49c85f2f34f2be6bc543d197a97c9e30a412f4620c9af65d699d1
435
+ opentelemetry-instrumentation-mysql2 (0.27.2) sha256=66d7863b5e5d13b3702796392fef2540d849a7e3a6ed4743480933df785cefe9
436
+ opentelemetry-instrumentation-net_http (0.22.8) sha256=023bd68b6824b8fae5cf905f4c80f734c32395ac2d7911cadba126779730042e
437
+ opentelemetry-instrumentation-pg (0.27.4) sha256=99893eacfe1b73638d29da4a31b85df51eb54a1f80dbc37e16683bd17239bdff
438
+ opentelemetry-instrumentation-que (0.8.4) sha256=dfba65a7755d5f3c4535752f7814d2b4065bbc5122d2eb6657694f626aaa1da6
439
+ opentelemetry-instrumentation-racecar (0.3.4) sha256=c605ff33db8487cf0394907f64ab2b0a01dcfe99cfde87d47bbed22f572ae163
440
+ opentelemetry-instrumentation-rack (0.24.6) sha256=c0f27bdc8d407bb4d97ead27b6ee72243b86f32f7a6a703f5158fc2e18ebaeb6
441
+ opentelemetry-instrumentation-rails (0.30.2) sha256=42ddd023afa551f60ea632712d5125ce8b781eeb8d311a02efc2c62e02613a12
442
+ opentelemetry-instrumentation-rake (0.2.2) sha256=fbde8a6aab77c09bf0f94d914dd26dcf2e23ec67e2300f06a1cb8294a97d8020
443
+ opentelemetry-instrumentation-rdkafka (0.4.9) sha256=70ece60f586837a02ff54c158e13801ba9c2d12fe419e32074b590e5fd0f7844
444
+ opentelemetry-instrumentation-redis (0.25.7) sha256=2ea0f2d45fe1af0689aeadc08f5b335a2b6d9463de9d855fd25313d3c5b42fe3
445
+ opentelemetry-instrumentation-resque (0.5.2) sha256=7e4bb0fe2148ffd2547d5d30773484f7739f2919fe36beb181a98d5af71fa011
446
+ opentelemetry-instrumentation-restclient (0.22.8) sha256=a5ff53775dc58549be252c1dd54b699aa6579c663034fb661ba685591e74b6d2
447
+ opentelemetry-instrumentation-ruby_kafka (0.21.3) sha256=cd957ac072c8551fd06d6369b9492328495dc4437a11fea3f2169e9992b307d6
448
+ opentelemetry-instrumentation-sidekiq (0.25.7) sha256=d6a6e2cadddfda0a0b641f9dc918e35a77bfc62bc90b80776f5194bd55e0df31
449
+ opentelemetry-instrumentation-sinatra (0.23.5) sha256=c165658d48dce6cb5f0a033bd29789c8b6738fe4e98bfb019eaf9406787d0796
450
+ opentelemetry-instrumentation-trilogy (0.59.3) sha256=67225dfa883a3e21d6347970291693f3d13b09db76cc825128788d758a9d1353
451
+ opentelemetry-registry (0.6.1) sha256=a4569df4e366742ab435634115a20169c0073db681eaea406de0dfcaf015e8d1
452
+ opentelemetry-sdk (1.4.1) sha256=513fa36c9b32dcaaf69f698a8950de4fe58842eb7038a09bc8260fd35f4c4eaa
453
+ opentelemetry-semantic_conventions (1.43.0) sha256=d96eb7da3bc89335786ea676b448701f566cf241a7ca56ae1e814b83816922af
454
+ parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
455
+ parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
456
+ pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
457
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
458
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
459
+ public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
460
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
461
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
462
+ rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
463
+ rbs (4.0.3) sha256=5a7bf70e2628549d9a1f44eae447b2cfe55968a9c60cfff52693a4bdcc020e14
464
+ rbtree (0.4.7) sha256=1efabbcb3fd5f12249c9c8a610a765074868164eed0c50c9db2531c00ed161cb
465
+ rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469
466
+ redcarpet (3.6.1) sha256=d444910e6aa55480c6bcdc0cdb057626e8a32c054c29e793fa642ba2f155f445
467
+ regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
468
+ reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
469
+ rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
470
+ rsolr (2.6.0) sha256=4b3bcea772cac300562775c20eeddedf63a6b7516a070cb6fbde000b09cfe12b
471
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
472
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
473
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
474
+ rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
475
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
476
+ rubocop (1.87.0) sha256=b9d9ddf55116a513f8ef2c7ae660662d8b49301f118d3f0df61865b33a5c188d
477
+ rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
478
+ rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
479
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
480
+ simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
481
+ simplecov-cobertura (3.2.0) sha256=70d702658677fcb20e5aceb6915ccf8bc62ff2ccd38b62b3ad5c9db5c0888740
482
+ simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
483
+ simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
484
+ sorted_set (1.1.0) sha256=bac01eb16b6bcfcdb7d732a28e87422be8b5c9fdcfeadbe9072682407524ee83
485
+ standard (1.55.0) sha256=8a8f2c3e681a4db3aafde1b301561b0f3d7c5f06c160167cb744a4d7baf0426e
486
+ standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
487
+ standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
488
+ surfliner-metadata_consumer (0.1.0.pre.alpha.10)
489
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
490
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
491
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
492
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
493
+ webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
494
+ yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
495
+
372
496
  BUNDLED WITH
373
- 2.6.7
497
+ 4.0.10
data/README.md CHANGED
@@ -91,7 +91,7 @@ And `QueueConfig#from_env` similarly accepts keyword options, which are forwarde
91
91
 
92
92
  ```ruby
93
93
  connection.with_topic(topic_config) do |topic|
94
- queue_config = QueueConfig.from_env(exclusive: true, durable: true)
94
+ queue_config = QueueConfig.from_env(exclusive: true, durable: false)
95
95
  queue = topic.bind_queue(queue_config)
96
96
  # ...
97
97
  end
@@ -5,28 +5,39 @@ module Surfliner
5
5
  # Expected resource status values.
6
6
  KNOWN_STATUSES = [:published, :updated, :unpublished, :deleted]
7
7
 
8
- # Initializes a new `Payload` from the specified JSON data.
9
- # @param payload_json [String] The payload data as received from RabbitMQ.
10
- def initialize(payload_json)
11
- @data = JSON.parse(payload_json)
8
+ # @return [Hash] the payload data as a Hash.
9
+ attr_reader :data
10
+
11
+ # Initializes a new `Payload` from the specified data.
12
+ #
13
+ # If data is provided as a string, it is parsed as JSON.
14
+ #
15
+ # @param payload [String, Hash] The payload data as received from RabbitMQ.
16
+ def initialize(payload)
17
+ @data = normalize(payload)
12
18
  end
13
19
 
14
20
  # @return [String] The payload data as a JSON string.
21
+ def to_json
22
+ data.to_json
23
+ end
24
+
25
+ # @return [String] The payload data as a stringified hash.
15
26
  def to_s
16
- @data.to_s
27
+ data.to_s
17
28
  end
18
29
 
19
30
  # @return [String] the URL for the resource.
20
31
  def resource_url
21
- @resource_url ||= @data.fetch("resourceUrl")
32
+ @resource_url ||= data.fetch(:resourceUrl)
22
33
  end
23
34
 
24
35
  # @return [Symbol] the resource status as a symbol.
25
36
  # @raise UnknownStatus if the message does not provide the resource status.
26
37
  def status
27
38
  @status ||= begin
28
- status_str = @data.fetch("status") do
29
- raise(UnknownStatus, "Payload status is not defined in payload: #{@data}")
39
+ status_str = data.fetch(:status) do
40
+ raise(UnknownStatus, "Payload status is not defined in payload: #{data}")
30
41
  end
31
42
  status_str.to_sym
32
43
  end
@@ -34,6 +45,19 @@ module Surfliner
34
45
 
35
46
  # Exception raised if the resource status has not been provided in the message.
36
47
  class UnknownStatus < RuntimeError; end
48
+
49
+ private
50
+
51
+ # Camelize and symbolize keys for compatibility.
52
+ def normalize(payload_data)
53
+ payload_str = payload_data.is_a?(String) ? payload_data : JSON.generate(payload_data)
54
+ JSON.parse(payload_str, {
55
+ on_load: ->(h) do
56
+ next h unless h.respond_to?(:transform_keys)
57
+ h.transform_keys { |k| k.to_s.gsub(/_[a-z]/) { |lower| lower[1].upcase }.to_sym }
58
+ end
59
+ })
60
+ end
37
61
  end
38
62
  end
39
63
  end
@@ -5,41 +5,66 @@ module Surfliner
5
5
  # The JSON-LD profile to request when retrieving the resource
6
6
  DEFAULT_JSONLD_PROFILE = "tag:surfliner.gitlab.io,2022:api/oai_dc"
7
7
 
8
+ attr_reader :user_agent
9
+ attr_reader :jsonld_profile
10
+
11
+ def initialize(user_agent: SuperskunkClient.default_user_agent, jsonld_profile: DEFAULT_JSONLD_PROFILE)
12
+ @user_agent = user_agent
13
+ @jsonld_profile = jsonld_profile
14
+ end
15
+
8
16
  class << self
9
- # Retrieves the specified resource.
10
- # @param url [String] The resource URL as a string
11
- # @return [Hash] parsed JSON response data
12
- #
13
- # @raise [UnexpectedResponse] in the event of an unexpected HTTP status code.
14
17
  def get(url)
15
- uri = URI(url)
16
- req = Net::HTTP::Get.new(uri)
17
- req["Accept"] = "application/ld+json;profile=\"#{jsonld_profile}\""
18
- req["User-Agent"] = ENV.fetch("USER_AGENT_PRODUCT_NAME") { "surfliner.daylight" } # TODO: make this more obviously configurable?
19
-
20
- response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
21
- http.request(req)
22
- end
23
-
24
- case response
25
- when Net::HTTPSuccess
26
- JSON.parse(response.body)
27
- when Net::HTTPRedirection
28
- get(response["location"])
29
- else
30
- raise UnexpectedResponse, "Failed to fetch data; status #{response.code}"
31
- end
18
+ new.get(url)
32
19
  end
33
20
 
34
- private
21
+ def default_user_agent
22
+ ENV.fetch("USER_AGENT_PRODUCT_NAME") { "surfliner.daylight" } # TODO: make this more obviously configurable?
23
+ end
24
+ end
25
+
26
+ # Retrieves the specified resource.
27
+ # @param url [String] The resource URL as a string
28
+ # @return [Hash] parsed JSON response data
29
+ #
30
+ # @raise [UnexpectedResponse] in the event of an unexpected HTTP status code.
31
+ def get(url)
32
+ uri = URI(url)
33
+ req = Net::HTTP::Get.new(uri)
34
+ req["Accept"] = "application/ld+json;profile=\"#{jsonld_profile}\""
35
+ req["User-Agent"] = user_agent
35
36
 
36
- def jsonld_profile
37
- DEFAULT_JSONLD_PROFILE
37
+ response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
38
+ http.request(req)
39
+ end
40
+
41
+ case response
42
+ when Net::HTTPSuccess
43
+ JSON.parse(response.body)
44
+ when Net::HTTPRedirection
45
+ get(response["Location"])
46
+ else
47
+ raise UnexpectedResponse.new(uri, response.code.to_i)
38
48
  end
39
49
  end
40
50
 
41
51
  # Exception raised in the event of an unexpected HTTP status code.
42
- class UnexpectedResponse < RuntimeError; end
52
+ class UnexpectedResponse < RuntimeError
53
+ # @return [URI] the request URI
54
+ attr_reader :uri
55
+
56
+ # @return [Integer] the HTTP status code
57
+ attr_reader :status
58
+
59
+ # @param uri [URI] the request URI
60
+ # @param status [Integer] the HTTP status code
61
+ def initialize(uri, status)
62
+ super("Failed to fetch #{uri}; status #{status}")
63
+
64
+ @uri = uri
65
+ @status = status
66
+ end
67
+ end
43
68
  end
44
69
  end
45
70
  end
@@ -2,6 +2,6 @@
2
2
  module Surfliner
3
3
  module MetadataConsumer
4
4
  # The gem version
5
- VERSION = "0.1.0.pre.alpha.7"
5
+ VERSION = "0.1.0.pre.alpha.10"
6
6
  end
7
7
  end
@@ -28,7 +28,7 @@ module Surfliner
28
28
  # @param port [String] RabbitMQ AMQP port
29
29
  # @param username [String] RabbitMQ username
30
30
  # @param password [String] RabbitMQ passsword
31
- # @param await_response_on_close [Boolean] whether the RabbitMQ client should wait for a response when closing the connection
31
+ # @param await_response_on_close [Boolean, String] whether the RabbitMQ client should wait for a response when closing the connection
32
32
  # @param opts [Hash] additional RabbitMQ conection options (see Bunny::Session#initialize)
33
33
  def initialize(host:, port:, username:, password:, await_response_on_close: true, **opts)
34
34
  @host = host
@@ -74,7 +74,34 @@ module Surfliner
74
74
  @redacted_url ||= session_url.sub(password, "REDACTED")
75
75
  end
76
76
 
77
- private
77
+ # Whether `other` represents the same configuration as this object.
78
+ # Note that if any attributes or connection options are modified, equality becomes unstable.
79
+ # @return [Boolean] true if `other` represents the same configuration as this object, false otherwise
80
+ def eql?(other)
81
+ self == other
82
+ end
83
+
84
+ # Whether `other` represents the same configuration as this object.
85
+ # Note that if any attributes or connection options are modified, equality becomes unstable.
86
+ # @return [Boolean] true if `other` represents the same configuration as this object, false otherwise
87
+ def ==(other)
88
+ return unless other.class == self.class
89
+ other.options == options
90
+ end
91
+
92
+ # The hash value of this object. Equal configurations will have equal hash values.
93
+ # Note that if any attributes or connection options are modified, the hash value becomes unstable.
94
+ # @return [Integer] a hash value suitable for using equal configs as hash keys
95
+ def hash
96
+ options.hash
97
+ end
98
+
99
+ protected
100
+
101
+ # @return [Hash] all keyword arguments and connection options, for purposes of equality checking
102
+ def options
103
+ {host:, port:, username:, password:, await_response_on_close:, opts:}
104
+ end
78
105
 
79
106
  def parse_boolean(v)
80
107
  !FALSE_VALUES.include?(v.to_s)
@@ -15,6 +15,30 @@ module Surfliner
15
15
  @options = options
16
16
  end
17
17
 
18
+ # Whether `other` represents the same configuration as this object.
19
+ # Note that if `name` or `options` are modified, equality becomes unstable.
20
+ # @param other [Object, nil] the object to compare
21
+ # @return [Boolean] true if `other` represents the same configuration as this object, false otherwise
22
+ def eql?(other)
23
+ self == other
24
+ end
25
+
26
+ # Whether `other` represents the same configuration as this object.
27
+ # Note that if `name` or `options` are modified, equality becomes unstable.
28
+ # @param other [Object, nil] the object to compare
29
+ # @return [Boolean] true if `other` represents the same configuration as this object, false otherwise
30
+ def ==(other)
31
+ return unless other.class == self.class
32
+ other.name == name && other.options == options
33
+ end
34
+
35
+ # The hash value of this object. Equal configurations will have equal hash values.
36
+ # Note that if `name` or `options` are modified, the hash value becomes unstable.
37
+ # @return [Integer] a hash value suitable for using equal configs as hash keys
38
+ def hash
39
+ [name, options].hash
40
+ end
41
+
18
42
  class << self
19
43
  # Returns a default (environment-variable-based) configuration with the
20
44
  # specified options.
@@ -15,6 +15,30 @@ module Surfliner
15
15
  @options = options
16
16
  end
17
17
 
18
+ # Whether `other` represents the same configuration as this object.
19
+ # Note that if `name` or `options` are modified, equality becomes unstable.
20
+ # @param other [Object, nil] the object to compare
21
+ # @return [Boolean] true if `other` represents the same configuration as this object, false otherwise
22
+ def eql?(other)
23
+ self == other
24
+ end
25
+
26
+ # Whether `other` represents the same configuration as this object.
27
+ # Note that if `name` or `options` are modified, equality becomes unstable.
28
+ # @param other [Object, nil] the object to compare
29
+ # @return [Boolean] true if `other` represents the same configuration as this object, false otherwise
30
+ def ==(other)
31
+ return unless other.class == self.class
32
+ other.name == name && other.options == options
33
+ end
34
+
35
+ # The hash value of this object. Equal configurations will have equal hash values.
36
+ # Note that if `name` or `options` are modified, the hash value becomes unstable.
37
+ # @return [Integer] a hash value suitable for using equal configs as hash keys
38
+ def hash
39
+ [name, options].hash
40
+ end
41
+
18
42
  class << self
19
43
  # Returns a default (environment-variable-based) configuration with the
20
44
  # specified options.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surfliner-metadata_consumer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.7
4
+ version: 0.1.0.pre.alpha.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Project Surfliner
@@ -217,14 +217,14 @@ dependencies:
217
217
  requirements:
218
218
  - - "~>"
219
219
  - !ruby/object:Gem::Version
220
- version: '2.1'
220
+ version: '3.2'
221
221
  type: :development
222
222
  prerelease: false
223
223
  version_requirements: !ruby/object:Gem::Requirement
224
224
  requirements:
225
225
  - - "~>"
226
226
  - !ruby/object:Gem::Version
227
- version: '2.1'
227
+ version: '3.2'
228
228
  - !ruby/object:Gem::Dependency
229
229
  name: standard
230
230
  requirement: !ruby/object:Gem::Requirement
@@ -321,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
321
321
  - !ruby/object:Gem::Version
322
322
  version: '0'
323
323
  requirements: []
324
- rubygems_version: 3.6.7
324
+ rubygems_version: 4.0.10
325
325
  specification_version: 4
326
326
  summary: Surfliner metadata consumer
327
327
  test_files: []