Skip to content

Bump webmock from 3.38.0 to 3.40.0 - #38

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/webmock-3.40.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/webmock-3.40.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 26, 2026

Copy link
Copy Markdown

Bumps webmock from 3.38.0 to 3.40.0.

Release notes

Sourced from webmock's releases.

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.

    If your tests send Curl::Multi requests to real servers, stub them or allow their hosts, for example with WebMock.disable_net_connect!(allow: "api.example.com"). VCR, hooked into WebMock, now records and replays these requests too, and raises VCR::Errors::UnhandledHTTPRequestError for one that a cassette doesn't have, so record such cassettes again.

    Thanks to Todd Fisher

  • Drop curb callbacks on Curl::Easy#reset for stubbed requests, as curb does

    Previously, a callback such as on_complete, set before reset, still ran for a stubbed request made after it. Curb drops every callback on reset, so a real request didn't run it. If your tests rely on such a callback, set it again after reset.

3.39.0

  • Fix tracing libraries that wrap HTTPClient failing on stubbed requests (#1010)

    Previously, for a stubbed request, WebMock's version of HTTPClient's private do_get_block method returned a Thread::Queue instead of the response that HTTPClient's own version returns. Libraries that wrap the method to trace requests, such as Datadog's, read that result as the response.

    It now returns the response, as it already did for real requests.

  • Match and record Net::HTTP URL encoded forms set with set_form (#959)

    Previously, WebMock saw no body for a request whose form was set with request.set_form([["foo", "bar"]]), because Net::HTTP encodes such a form only when it sends the request. A stub such as with(body: {"foo" => "bar"}) didn't match, and callbacks and VCR recorded the request without its body.

    WebMock now records the body of a URL encoded form given as a hash or an array of pairs, as Net::HTTP encodes it, and leaves sending the request to Net::HTTP. A multipart form, or a form given as another enumerable, which may be read only once, is recorded without a body, as before. If VCR, hooked into WebMock, matches requests on their body, record cassettes that contain such requests again.

  • Fix async-websocket connections failing with WebMock enabled (#953)

    Previously, connecting with Async::WebSocket::Client raised NoMethodError: undefined method 'acquire' for nil, even to a host that allowed real connections. async-websocket takes a connection from the async-http client's pool, and WebMock's version of the client had no pool.

    The client now hands out its real connection pool when WebMock's settings allow real connections to the host, and raises WebMock::NetConnectNotAllowedError otherwise. WebMock can't stub or record what a library sends over such a connection, and neither can VCR, so with VCR hooked into WebMock, allow the host with WebMock.disable_net_connect!(allow: ...).

  • Match the Cookie header that Typhoeus sends for the cookie option (#813)

    Previously, Typhoeus.get(url, cookie: "key=value") sent Cookie: key=value, but WebMock recorded the request without it, so a stub with with(headers: {"Cookie" => "key=value"}) didn't match.

    WebMock now records the header, unless the request sets its own Cookie header, which is then the one sent, or uses libcurl's cookie engine with cookiefile, cookiejar or cookielist, which adds its own cookies to it. If VCR, hooked into WebMock, matches requests on their headers, record cassettes that contain such requests again. VCR now records the cookie too, so filter it, for example with filter_sensitive_data, if it is a secret.

  • Fix VCR failing to replay Typhoeus requests when hooked into both Typhoeus and WebMock (#973)

    Previously, with hook_into :typhoeus, :webmock, VCR warned that "There appears to be a bug in WebMock's after_request hook", and replaying a Typhoeus request from a cassette raised ArgumentError. VCR's Typhoeus hook answered the request before WebMock saw it, and WebMock still passed the request to after_request callbacks, as nil.

    WebMock now leaves out requests it didn't see. On older versions, hook_into :webmock alone records and replays Typhoeus requests too.

  • Run the instrumentation of the http gem 6 for stubbed requests (#881)

    Previously, with version 6 of the http gem (HTTP.rb), a stubbed request skipped the instrumentation feature, so HTTP.use(instrumentation: {instrumenter: ...}) emitted no request.http events for it. In every version, a stubbed timeout or HTTP::Error emitted no error.http event.

... (truncated)

Changelog

Sourced from webmock's changelog.

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.

    If your tests send Curl::Multi requests to real servers, stub them or allow their hosts, for example with WebMock.disable_net_connect!(allow: "api.example.com"). VCR, hooked into WebMock, now records and replays these requests too, and raises VCR::Errors::UnhandledHTTPRequestError for one that a cassette doesn't have, so record such cassettes again.

    Thanks to Todd Fisher

  • Drop curb callbacks on Curl::Easy#reset for stubbed requests, as curb does

    Previously, a callback such as on_complete, set before reset, still ran for a stubbed request made after it. Curb drops every callback on reset, so a real request didn't run it. If your tests rely on such a callback, set it again after reset.

3.39.0

  • Fix tracing libraries that wrap HTTPClient failing on stubbed requests (#1010)

    Previously, for a stubbed request, WebMock's version of HTTPClient's private do_get_block method returned a Thread::Queue instead of the response that HTTPClient's own version returns. Libraries that wrap the method to trace requests, such as Datadog's, read that result as the response.

    It now returns the response, as it already did for real requests.

  • Match and record Net::HTTP URL encoded forms set with set_form (#959)

    Previously, WebMock saw no body for a request whose form was set with request.set_form([["foo", "bar"]]), because Net::HTTP encodes such a form only when it sends the request. A stub such as with(body: {"foo" => "bar"}) didn't match, and callbacks and VCR recorded the request without its body.

    WebMock now records the body of a URL encoded form given as a hash or an array of pairs, as Net::HTTP encodes it, and leaves sending the request to Net::HTTP. A multipart form, or a form given as another enumerable, which may be read only once, is recorded without a body, as before. If VCR, hooked into WebMock, matches requests on their body, record cassettes that contain such requests again.

  • Fix async-websocket connections failing with WebMock enabled (#953)

    Previously, connecting with Async::WebSocket::Client raised NoMethodError: undefined method 'acquire' for nil, even to a host that allowed real connections. async-websocket takes a connection from the async-http client's pool, and WebMock's version of the client had no pool.

    The client now hands out its real connection pool when WebMock's settings allow real connections to the host, and raises WebMock::NetConnectNotAllowedError otherwise. WebMock can't stub or record what a library sends over such a connection, and neither can VCR, so with VCR hooked into WebMock, allow the host with WebMock.disable_net_connect!(allow: ...).

  • Match the Cookie header that Typhoeus sends for the cookie option (#813)

    Previously, Typhoeus.get(url, cookie: "key=value") sent Cookie: key=value, but WebMock recorded the request without it, so a stub with with(headers: {"Cookie" => "key=value"}) didn't match.

    WebMock now records the header, unless the request sets its own Cookie header, which is then the one sent, or uses libcurl's cookie engine with cookiefile, cookiejar or cookielist, which adds its own cookies to it. If VCR, hooked into WebMock, matches requests on their headers, record cassettes that contain such requests again. VCR now records the cookie too, so filter it, for example with filter_sensitive_data, if it is a secret.

  • Fix VCR failing to replay Typhoeus requests when hooked into both Typhoeus and WebMock (#973)

    Previously, with hook_into :typhoeus, :webmock, VCR warned that "There appears to be a bug in WebMock's after_request hook", and replaying a Typhoeus request from a cassette raised ArgumentError. VCR's Typhoeus hook answered the request before WebMock saw it, and WebMock still passed the request to after_request callbacks, as nil.

    WebMock now leaves out requests it didn't see. On older versions, hook_into :webmock alone records and replays Typhoeus requests too.

  • Run the instrumentation of the http gem 6 for stubbed requests (#881)

... (truncated)

Commits
  • f114e3f Version 3.40.0
  • 28f4be8 Finish Curl::Multi#perform when a stubbed handle is reset or closed
  • 057ce36 Pass the multi to the Curl::Multi#perform block, as curb does
  • 3cdf839 Drop curb callbacks on Curl::Easy#reset, as curb does
  • 1102a2c Let curb's own Curl::Easy handles make their requests through Curl::Multi
  • 8b19471 Move the Curl::Multi entry to Unreleased and say what changes for users
  • fe95b89 Merge pull request #1148 from taf2/fix/curb-multi-integration
  • 3ece4bb Exercise Curl::Multi with the shared Curb acceptance suite
  • 42a5613 Version 3.39.0
  • e8fb71e Merge pull request #1149 from dpep/readme-to-return-json
  • Additional commits viewable in compare view

Dependabot compatibility score

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 this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [webmock](https://github.com/bblimke/webmock) from 3.38.0 to 3.40.0.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](bblimke/webmock@v3.38.0...v3.40.0)

---
updated-dependencies:
- dependency-name: webmock
  dependency-version: 3.40.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dependabot @github

dependabot Bot commented on behalf of github Nov 27, 2026

Copy link
Copy Markdown
Author

Superseded by #39.

@dependabot dependabot Bot closed this Nov 27, 2026
@dependabot
dependabot Bot deleted the dependabot/bundler/webmock-3.40.0 branch November 27, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants