deps(conformance-ruby): bump the conformance-bundler-dependencies group in /conformance/runner/ruby with 2 updates

Merged
DE
3d ago
+8-8

Bumps the conformance-bundler-dependencies group in /conformance/runner/ruby with 2 updates: webmock and json.

Updates webmock from 3.36.0 to 3.42.0

Release notes

Sourced from webmock's releases.

3.42.0

  • Fix VCR failing to replay responses recorded with the auto_inflate feature of the http gem (#1154)

    Previously, for a real request made with HTTP.use(:auto_inflate), after_request callbacks got the inflated body together with the Content-Encoding: gzip header of the compressed one. VCR, hooked into WebMock, recorded both, and replaying the cassette raised Zlib::DataError: incorrect header check, because the feature tried to inflate the body again. With VCR's decode_compressed_response option, recording raised Zlib::GzipFile::Error instead.

    Callbacks now get the inflated body without the Content-Encoding header, as they do for a body that Net::HTTP inflates. A Content-Length header, when the response has one, gives the size of the inflated body. The response the client returns is unchanged, and so are the headers of a response with an empty body, such as one to a HEAD request.

    A cassette recorded this way replays the response with those headers, while the real response keeps the headers of the compressed body.

    This doesn't cover a client that inflates with a subclass of the feature, or responses returned by the caching feature of http 6. Callbacks get those as before.

    Cassettes recorded with older versions that have the Content-Encoding header on an inflated body still fail. Record them again, or remove that header from their responses. Their Content-Length is still that of the compressed body.

3.41.0

WebMock now parses JSON request bodies with Ruby's JSON.parse, instead of its old parser, which converted JSON to YAML and failed on or misread some valid JSON. Every body pattern that matched on 3.40.0 still matches. If one matches only as the old parser reads the body, WebMock prints a deprecation warning, because 4.0 drops the old parser and the pattern won't match there.

  • Match JSON request bodies with an escaped backslash in a string (#432)

    Previously, a hash body pattern didn't match a JSON body with an escaped backslash inside a string, such as JSON inside JSON, because the old parser failed on it. For example, with(body: {data: '{"url":"/p?a=1\u0026b=2"}'}) didn't match the body {"data":"{\"url\":\"/p?a=1\\u0026b=2\"}"}. It now matches.

    Strings that the old parser changed now match too, for example "a\u000ab", which it read as "a b".

  • Match numbers with an exponent in JSON request bodies

    Previously, a number such as 1e2 or 1e+20 in a JSON body was read as a String, so with(body: {amount: 1e20}) didn't match the body {"amount":1e+20}, which to_json generates for that hash with recent json versions, such as the one in Ruby 4.0. It now matches.

  • Deprecate body patterns that match a JSON request body only as the old parser reads it

    The old parser read some bodies that aren't valid JSON, and some values differently from JSON.parse. For example, with(body: {a: 1}) matches the body {a: 1}, and with(body: {amount: "1e+20"}) matches the body {"amount":1e+20}, because the old parser read that number as a String. Such a pattern still matches, and WebMock prints a warning once for each pattern:

    WebMock deprecation warning: the body pattern {"a" => 1} matched the request body "{a: 1}" only as WebMock's old JSON parser reads it. WebMock 4.0 drops that parser, so it won't match. Send valid JSON, for example from to_json, and write the pattern for what JSON.parse returns.
    

    To fix it, send valid JSON, for example {a: 1}.to_json, and write the pattern for what JSON.parse returns, such as {amount: 1e20}.

  • Don't raise Psych errors for JSON request bodies such as one with an unquoted date

    Previously, with Psych 4 or later (the default since Ruby 3.1), a JSON body such as {"a": 2020-01-01}, which isn't valid JSON, raised Psych::DisallowedClass when a stub had a hash body pattern, instead of WebMock's error for an unregistered request. It now doesn't match the pattern.

  • Name a future major version in the deprecation warning for statuses such as :ok

    The deprecation warning for a status such as :ok, added in 3.38.0, said that WebMock 4.0 would raise ArgumentError for it. 4.0 changes how JSON request bodies are read and doesn't change statuses yet, so the warning now names a future major version.

3.40.0

  • Add support for Curl::Multi (#535)

    Previously, WebMock didn't see requests sent with Curl::Multi. A handle added with multi.add and sent with multi.perform went to the real server, even when a stub matched it or real connections were disabled, and WebMock didn't record it.

    Now a handle that matches a stub gets the stubbed response during multi.perform, and one that is neither stubbed nor allowed raises WebMock::NetConnectNotAllowedError from multi.add. Allowed requests still run together in curb's own multi loop. WebMock records both, and WebMock.after_request callbacks get both.

... (truncated)

Changelog

Sourced from webmock's changelog.

3.42.0

  • Fix VCR failing to replay responses recorded with the auto_inflate feature of the http gem (#1154)

    Previously, for a real request made with HTTP.use(:auto_inflate), after_request callbacks got the inflated body together with the Content-Encoding: gzip header of the compressed one. VCR, hooked into WebMock, recorded both, and replaying the cassette raised Zlib::DataError: incorrect header check, because the feature tried to inflate the body again. With VCR's decode_compressed_response option, recording raised Zlib::GzipFile::Error instead.

    Callbacks now get the inflated body without the Content-Encoding header, as they do for a body that Net::HTTP inflates. A Content-Length header, when the response has one, gives the size of the inflated body. The response the client returns is unchanged, and so are the headers of a response with an empty body, such as one to a HEAD request.

    A cassette recorded this way replays the response with those headers, while the real response keeps the headers of the compressed body.

    This doesn't cover a client that inflates with a subclass of the feature, or responses returned by the caching feature of http 6. Callbacks get those as before.

    Cassettes recorded with older versions that have the Content-Encoding header on an inflated body still fail. Record them again, or remove that header from their responses. Their Content-Length is still that of the compressed body.

3.41.0

WebMock now parses JSON request bodies with Ruby's JSON.parse, instead of its old parser, which converted JSON to YAML and failed on or misread some valid JSON. Every body pattern that matched on 3.40.0 still matches. If one matches only as the old parser reads the body, WebMock prints a deprecation warning, because 4.0 drops the old parser and the pattern won't match there.

  • Match JSON request bodies with an escaped backslash in a string (#432)

    Previously, a hash body pattern didn't match a JSON body with an escaped backslash inside a string, such as JSON inside JSON, because the old parser failed on it. For example, with(body: {data: '{"url":"/p?a=1\u0026b=2"}'}) didn't match the body {"data":"{\"url\":\"/p?a=1\\u0026b=2\"}"}. It now matches.

    Strings that the old parser changed now match too, for example "a\u000ab", which it read as "a b".

  • Match numbers with an exponent in JSON request bodies

    Previously, a number such as 1e2 or 1e+20 in a JSON body was read as a String, so with(body: {amount: 1e20}) didn't match the body {"amount":1e+20}, which to_json generates for that hash with recent json versions, such as the one in Ruby 4.0. It now matches.

  • Deprecate body patterns that match a JSON request body only as the old parser reads it

    The old parser read some bodies that aren't valid JSON, and some values differently from JSON.parse. For example, with(body: {a: 1}) matches the body {a: 1}, and with(body: {amount: "1e+20"}) matches the body {"amount":1e+20}, because the old parser read that number as a String. Such a pattern still matches, and WebMock prints a warning once for each pattern:

    WebMock deprecation warning: the body pattern {"a" => 1} matched the request body "{a: 1}" only as WebMock's old JSON parser reads it. WebMock 4.0 drops that parser, so it won't match. Send valid JSON, for example from to_json, and write the pattern for what JSON.parse returns.
    

    To fix it, send valid JSON, for example {a: 1}.to_json, and write the pattern for what JSON.parse returns, such as {amount: 1e20}.

  • Don't raise Psych errors for JSON request bodies such as one with an unquoted date

    Previously, with Psych 4 or later (the default since Ruby 3.1), a JSON body such as {"a": 2020-01-01}, which isn't valid JSON, raised Psych::DisallowedClass when a stub had a hash body pattern, instead of WebMock's error for an unregistered request. It now doesn't match the pattern.

  • Name a future major version in the deprecation warning for statuses such as :ok

    The deprecation warning for a status such as :ok, added in 3.39.0, said that WebMock 4.0 would raise ArgumentError for it. 4.0 changes how JSON request bodies are read and doesn't change statuses yet, so the warning now names a future major version.

3.40.0

  • Add support for Curl::Multi (#535)

... (truncated)

Commits
  • bb2326f Version 3.42.0
  • b2984eb Keep callback headers when HTTP.rb has no Inflater class (#1154)
  • 0834d68 Give callbacks headers for the body HTTP.rb's auto_inflate inflated (#1154)
  • 6186a70 Version 3.41.0
  • 25de467 Say a future major version will raise for statuses such as :ok
  • fc6d039 Parse JSON request bodies with JSON.parse (#432)
  • 96bdaf5 Merge pull request #1151 from dpep/finish-spec-stub-cleanup
  • e0d9b24 Drop restated defaults from em-http and http.rb spec stubs
  • b27a398 Merge pull request #1150 from dpep/simplify-response-stubs
  • 972c9e2 Simplify response stubs in the curb and httpclient specs
  • Additional commits viewable in compare view

Updates json from 3.1.0 to 3.2.0

Release notes

Sourced from json's releases.

v3.2.0

What's Changed

  • The script_safe: true option of JSON.generate no longer escapes forward slashes /, and instead escapes script tag openings (<script), script tag closing (</script) and HTML comments (<!--) as recommended by the HTML spec.
  • The script_safe: true option of JSON.generate no longer escapes U+2028 and U+2029 given that Javascript is now a proper subset of JSON since many years (see: https://github.com/tc39/proposal-json-superset).
  • Fix JSON::ParserError#json_path raising NoMethodError when the document was parsed with symbolize_names: true.
  • Fix JSON.generate not detecting duplicate keys such as { "1" => 1, 1 => 2 }.
  • JRuby: raise TypeError when a String subclass used as a Hash key has a to_s that doesn't return a String, like the C extension.
  • JRuby and TruffleRuby: fix a stack overflow in JSON::Coder when as_json returns a Symbol for a string with invalid encoding.
  • JRuby: fix JSON::Coder (and any frozen JSON::State) not being thread-safe. Each #dump call now uses its own nesting depth instead of mutating the shared state, which under concurrent use could make every later call raise JSON::NestingError.

Full Changelog: https://github.com/ruby/json/compare/v3.1.0...v3.2.0

Changelog

Sourced from json's changelog.

2026-11-24 (3.2.0)

  • The script_safe: true option of JSON.generate no longer escapes forward slashes /, and instead escapes script tag openings (<script), script tag closing (</script) and HTML comments (<!--) as recommended by the HTML spec.
  • The script_safe: true option of JSON.generate no longer escapes U+2028 and U+2029 given that Javascript is now a proper subset of JSON since many years (see: https://github.com/tc39/proposal-json-superset).
  • Fix JSON::ParserError#json_path raising NoMethodError when the document was parsed with symbolize_names: true.
  • Fix JSON.generate not detecting duplicate keys such as { "1" => 1, 1 => 2 }.
  • JRuby: raise TypeError when a String subclass used as a Hash key has a to_s that doesn't return a String, like the C extension.
  • JRuby and TruffleRuby: fix a stack overflow in JSON::Coder when as_json returns a Symbol for a string with invalid encoding.
  • JRuby: fix JSON::Coder (and any frozen JSON::State) not being thread-safe. Each #dump call now uses its own nesting depth instead of mutating the shared state, which under concurrent use could make every later call raise JSON::NestingError.
Commits
  • 91f1849 Release 3.2.0
  • 5a75bc2 [DOC] Fix headings
  • fb1694b Correct the 2.18.3 changelog
  • 1955c7d Avoid deep Array#== in test_spill_frames_stack
  • 442dadb Fix handling of JRuby shared string in script_safe mode
  • c6f5858 script_safe: fix escaping of ", \ and control characters
  • 889c06a Better handle combined html_safe and ascii_only
  • 4cbbbf9 JRuby: fix < escaping with script_safe and ascii_only
  • fd4a8b4 generator.c: optimize unsafe_html_tag_p2
  • 29d1051 script_safe: compare case insensitively
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Summary by cubic

Bumps webmock to 3.42.0 and json to 3.2.0 in the Ruby conformance runner.

The webmock update parses JSON request bodies with JSON.parse, adds Curl::Multi support, and fixes the auto_inflate recording path. The json update changes script_safe: true escaping and fixes duplicate-key detection and thread-safety bugs.