specguard-rspec 0.2.3 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ab32ecca2ef5d4af0b93b22c0e9691a9b0f5302f939cc8fc6a8809eae7074e9
4
- data.tar.gz: 5baf222c850624d56c5fccd4c4647c68bac3ee765e0a5afe6e6dcb1bba69f027
3
+ metadata.gz: 02bea41599b8c1f8697024cf8a51edf7c440f123df6fa2b13a98057b87f9b9c6
4
+ data.tar.gz: c31039b38eb67f65fd51a3811c2eaf2ff7923dfe44c6df4c6fe5df94f4c71c3f
5
5
  SHA512:
6
- metadata.gz: 8cef9f595cb3ab96d24b249bb5dd758d87d20b9fdfc26f14b56290dab4210707227037e3691228ce6e16fa83de8c502a533aa597cc2ccad36d6ffa56599ea4b1
7
- data.tar.gz: b34a783f590850c73237116f7044aae7c0c58deb9b99e30c8e48ac31213073ccf6dfacac6cfefe516ccdf236dea329655bae2fafc1b306fa33c817b33ceab928
6
+ metadata.gz: a378b77c653e52cc4ddab51ee850d6eee2ff070b74dbfcf04a723c857b8d0e5ff9f9447446123f75a6409cbd4e016303e02c117b72bff22cf8f414c00f8feb7a
7
+ data.tar.gz: ad50a392d982957340b9fe47972df7942e636c67dd143e2449986f3439f07b976f4a1780e111428938073df1441c39caf48ecf1f80b322bea1d6268dfad5aa0f
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SpecGuard
4
4
  module RSpec
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
@@ -339,9 +339,58 @@ module SpecGuard
339
339
 
340
340
  # The ecosystem's shared vocabulary for interpolating a VALUE into a
341
341
  # violation message. `validate-intent` renders the same values the same
342
- # way (its `RenderValue`), and message_parity_spec.rb pins the two
343
- # against each other — getting this wrong is not cosmetic, because
344
- # `value 'e2e' is not one of [...]` is a line CI logs get diffed on.
342
+ # way (its `RenderValue`) BY CONVENTION neither program is generated
343
+ # from the other — but EDITING THIS METHOD IS PINNED, so expect red.
344
+ # validator_backend_spec.rb asserts this path's rendered stdout, byte for
345
+ # byte, against reports RECORDED from the binary and committed as
346
+ # spec/fixtures/validator/source-corpus.json, which carries the binary's
347
+ # own text; message_parity_spec.rb asserts four payloads through
348
+ # `Schema#violations` against strings hand-copied from the binary (its
349
+ # header refuses to be read as a proof about two programs, and is right —
350
+ # four hand-copied strings are not a second process). Change the String
351
+ # arm and BOTH SNAPSHOTS fail, quoting the binary's spelling back at you:
352
+ # message_parity_spec.rb, and validator_backend_spec.rb on both stdout
353
+ # and `--json`. (This gem's own unit and regression specs go red as well,
354
+ # but those are the gem checking itself, not the binary.) That is the
355
+ # coupling working, not unrelated breakage.
356
+ #
357
+ # The pin runs ONE WAY. Both are snapshots taken from the binary, and no
358
+ # SPEC in this gem executes it — validator_backend_spec.rb replays the
359
+ # recorded stdout through a shell stub it writes to a tmpdir. The gem
360
+ # itself does execute the binary, but only on the `ValidatorBackend` arm
361
+ # that `SPECGUARD_VALIDATE_INTENT` selects INSTEAD of this renderer: `CLI`
362
+ # loads the `Schema` only when that backend is absent, and returns the
363
+ # backend's results before it would ever build a `Linter`, so a LINT run
364
+ # on that arm does not reach this method. That arm reports the binary's
365
+ # own rendered strings, so it substitutes Go's spelling for this method's
366
+ # rather than checking one against the other. Note the env var takes this
367
+ # method out of the LINTER only, not out of service: `AnnotationLookup`
368
+ # reaches it through the same `Schema#violations` on the formatter's
369
+ # annotation path, which does not consult the backend at all.
370
+ #
371
+ # So a change on THIS side is caught immediately, while a change on the Go
372
+ # side is caught only once someone re-records the corpus. Getting it wrong
373
+ # is not cosmetic either way, because `value 'e2e' is not one of [...]` is
374
+ # a line CI logs get diffed on.
375
+ #
376
+ # Only the String and Array arms are reachable from `Schema#violations`:
377
+ # the schema types every property `string` or array-of-`string`, carries
378
+ # no numeric bounds (`minimum`/`maximum`/`multipleOf` are all absent;
379
+ # `minLength` is present, but its message reports a character count, not
380
+ # the value), and sets `additionalProperties: false`, so a non-string
381
+ # value produces a type-mismatch line and the one message that would
382
+ # interpolate the instance value (`enum_entry`) is dropped by
383
+ # `drop_shadowed_by_type_mismatch`. Neither snapshot above can reach the
384
+ # remaining arms, so nothing pins THOSE against the binary — but they are
385
+ # not all unheld. violation_renderer_spec.rb drives some of them from this
386
+ # side, with expectations phrased the validator's way: a bare `enum`
387
+ # property with no `type` (so there is no type-mismatch line to shadow the
388
+ # enum message) asserts `None` and `True`, and a hypothetical grown schema
389
+ # carrying `minimum`/`maximum` asserts `value 3 is below minimum 5`. Edit
390
+ # the nil, `true` or Integer arm and that file goes red — this gem holding
391
+ # itself to Go's spelling, with the binary not consulted at all. The
392
+ # `false` arm and the `inspect` fallback have no such example: blanking
393
+ # both leaves the suite green.
345
394
  def render_value(value)
346
395
  case value
347
396
  when String then render_quoted(value)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specguard-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - specguard Agent
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-18 00:00:00.000000000 Z
11
+ date: 2026-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_schemer