Repository navigation
Update bundler non-major dependencies to v1.216.0 - #994
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 21, 2026 22:47
9f43986 to
f49a2c1
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 22, 2026 06:18
f49a2c1 to
7816eb8
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 22, 2026 19:12
7816eb8 to
5799ef1
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 22, 2026 23:21
5799ef1 to
079f8ea
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 26, 2026 09:34
079f8ea to
7bb501d
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 27, 2026 00:06
7bb501d to
7aa5182
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 28, 2026 05:05
7aa5182 to
631a1b1
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 28, 2026 20:11
631a1b1 to
8a508cf
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 29, 2026 17:11
8a508cf to
0fb85a4
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 29, 2026 22:35
0fb85a4 to
8620221
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 30, 2026 13:48
8620221 to
9c1efb0
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
October 30, 2026 21:50
9c1efb0 to
5661042
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
November 5, 2026 00:01
5661042 to
c571827
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
7 times, most recently
from
November 13, 2026 21:04
a3a7f7c to
895f3ea
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
7 times, most recently
from
November 19, 2026 06:27
a542d7d to
ae814e5
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
3 times, most recently
from
November 21, 2026 20:43
da74d40 to
b95ffd8
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
November 22, 2026 02:08
b95ffd8 to
f0b7ef6
Compare
renovate
Bot
force-pushed
the
renovate/bundler-minor-patch
branch
from
November 23, 2026 21:18
f0b7ef6 to
11cf0f7
Compare
JPrevost
approved these changes
Nov 24, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
1.215.0→1.216.01.26.1→1.26.25.2.0→5.3.06.0.0→6.1.04.53.0→4.54.03.35.0→3.40.0Release Notes
aws/aws-sdk-ruby (aws-sdk-lambda)
v1.216.0rails/bootsnap (bootsnap)
v1.26.2Compare Source
Bootsnap.enable_frozen_string_literalwith coverage warning being wrongly emitted on Ruby4.0.10+.reidmorrison/rails_semantic_logger (rails_semantic_logger)
v5.3.0Compare Source
ActiveSupport.event_reporter. Rails 8.2 movesits framework log subscribers off
ActiveSupport::Notificationsand onto the event reporter, sothey kept running next to the semantic subscribers and every request, query, render, mail and job
was logged twice. Fixes #332, in #333. Thanks to Raheel Khan.
after_initialize. With lazy loading (the default in development and test) the semanticsubscriber was never attached, so jobs were logged only as Rails' text lines. Eager-loaded
applications (the production default) were not affected. Fixed in #333.
csrf_request_blocked,csrf_javascript_blockedandcsrf_token_fallbackevents instead of callinglogger.warndirectly, and only its own text log subscriber logged those events, so detaching it silenced the
warnings. They are now logged at
:warn, as Rails does, withcontroller,actionandsec_fetch_sitein the payload, whilelog_warning_on_csrf_failureis on.ActionView::BaseandActionDispatch::Responsewhile the applicationboots. Rails 8.2 logs a "was loaded before application initialization" warning for each when eager
loading is off (development and test by default), and fails the boot when
config.action_on_early_load_hook = :raise. TheActionController::Livepatch, which loadedActionDispatch::Response, is now applied once Action Controller loads, and the Action Viewsubscriber looks up its logger on first use instead of when its file loads.
$1,$2, ...), as Rails 8.2 now does in its own SQL logs. These are casted binds, plain values suchas those passed to
connection.select_all(sql, name, binds). All of them were previously loggedunder a single
nilkey, so a query with several such binds loggedbinds: {nil: ["foo", 2]}instead of
binds: {"$1": "foo", "$2": 2}. Applies to every supported Rails version.Log output change: the
nilbind key is gone, so update any log query, dashboard or alertthat matches
payload.binds.nilto match the positional keys instead. Binds that name theircolumn, including
[column, value]pairs, are still keyed and filtered by that name.config.action_controller.action_on_open_redirect = :notify, and path relative redirects reported byconfig.action_controller.action_on_path_relative_redirect = :notify. Rails' text log subscribernever logs the
open_redirect.action_controllerandunsafe_redirect.action_controllerevents(on Rails 8.2 only its structured event subscriber reports open redirects), so neither was
logged. Both are now logged at
:warnwith the redirect's stack trace, cleaned of gem frames, asthe backtrace: open redirects with
location,request_methodandrequest_pathin the payload,under the logger of the controller handling the request, and path relative redirects with
url.When cleaning would remove every frame, as for a redirect from an engine's controller, the
backtrace keeps instead the frames from the first one in the file that defines the controller's
action, or every frame when there is none, with gem paths shortened.
config.active_job.verbose_enqueue_logs, which Rails turns on indevelopment for new applications. When it is on, each enqueue entry has the application code
that enqueued the job as
sourcein its payload, such assource: "app/controllers/orders_controller.rb:18:in 'OrdersController#create'", where Rails'own log adds a
↳line. It was ignored on every Rails version. As Rails does, the source is thefirst frame of the call stack that the application's
Rails.backtrace_cleanerkeeps, and everyinfo and error entry gets one when there is such a frame: a job performed inline, such as with
perform_now, has the code that performed it, while the perform entries of a job performed by aworker have none, and its Continuation step entries (Rails 8.1+) have the job's line. A job
enqueued after its transaction commits (
enqueue_after_transaction_commit, Rails 8.1+) islogged at the commit, so its source is the code that opened the transaction, as in Rails' own
log. To use another cleaner, assign
RailsSemanticLogger::ActiveJob::LogSubscriber.backtrace_cleaner.enqueueorenqueue_atthat failedwith an error, which reads as Rails words it:
Failed enqueuing MyJob (Job ID: 1a2b) to Sidekiq(default): RuntimeError (boom).It ended
... to Sidekiq(default) (RuntimeError (boom), missing a closingparenthesis, since 4.13.0. Log output change: update any log query or alert that matches the
old message.
config.active_record.verbose_query_logs, which Rails turns on indevelopment for new applications. When it is on, each query entry, and each strict loading
violation, has the application code that caused it as
sourcein its payload, such assource: "app/models/user.rb:12:in 'User.recent'", where Rails' own log adds a↳line. Itwas ignored on every Rails version. As Rails does, the source is the first frame of the call
stack that the application's
Rails.backtrace_cleanerkeeps. To use another cleaner, assignRailsSemanticLogger::ActiveRecord::LogSubscriber.backtrace_cleaner.Rails.backtrace_cleaner,as Rails 8.1 does for its own subscriber, on every supported Rails version. Application frames
are logged relative to
Rails.root, and the application's backtrace silencers apply. This coversthe open and path relative redirect backtraces, and the
sourceof aRedirected toentry whenActionDispatch.verbose_redirect_logsis on (Rails 8.1+). Log output change: thatsourcewas an absolute path, such as
/srv/app/app/controllers/articles_controller.rb:12:in 'ArticlesController#create', and is nowapp/controllers/articles_controller.rb:12:in 'ArticlesController#create', as in Rails' own log.On Rails 7.2 to 8.1, Rails' cleaner also leaves out frames outside
app/,config/,lib/andtest/, as Rails' own log does, so code in other directories, such aspacks/or a local enginein
engines/, is no longer thesource; add toRails.backtrace_cleanerto change that. To useanother cleaner, assign
RailsSemanticLogger::ActionController::LogSubscriber.backtrace_cleaner.ActionController::Base.loggeris nil, instead of raisingNoMethodErrorfrom the subscriber.unpermitted_parameterscontext, as Rails'structured event subscriber does. The request refers back to itself, so the
:jsonformatteroverflowed the stack and the
Unpermitted parameterline was never written, and the appenderthread walked the request's env while the request was still using it. Fixed in #338. Thanks to
Philippe Vaucher.
main). A failure there is reported but does notfail the build, and the default
raketask still runs only the released Rails versions.Rails.backtrace_cleanerby default, as Rails' ownlog does. Sets Semantic Logger 5.3's
SemanticLogger.backtrace_cleaner, so the text formatters(
:default,:color, ...) and the:jsonformatter, including the appenders that send JSON(HTTP, TCP, UDP, Kafka, ...), write only the application's frames, relative to
Rails.root. Thesilencers in
config/initializers/backtrace_silencers.rbapply, and an exception with noapplication frames, such as one raised entirely within a gem, keeps its whole backtrace. This
covers every exception logged through Semantic Logger: requests, Active Job and Sidekiq job
failures, and the application's own
logger.error(exception)calls. Error services, such asSentry or Bugsnag, still receive the full backtrace. See
discussion #236.
Log output change: backtraces were logged in full, with absolute paths. To log full
backtraces again, set the
BACKTRACEenvironment variable as with the rest of Rails, opt outwith
config.semantic_logger.backtrace_cleaner = nilinconfig/application.rb, or opt outfor one appender with
formatter: {json: {backtrace_cleaner: false}}.ActionDispatch::ExceptionWrapper.silent_exceptions(ActionController::RoutingErrorandActionDispatch::Http::MimeNegotiation::InvalidType), without its backtrace when none of itsframes is the application's, as Rails' own log does. Every other exception is logged as before. A
request for a missing route, such as
/apple-touch-icon.png, is now one line, after theresponse's status, instead of dozens of middleware frames:
Rails -- 404 Not Found -- Exception: ActionController::RoutingError: No route matches [GET] "/apple-touch-icon.png".It is logged with Semantic Logger's
log_exception: :partial, so the entry has the exception'sclass and message but not the exception: the
:jsonformatter writes them in themessagerather than as an
exception, and Semantic Logger's own error service appenders, such assentry_ruby, receive a message rather than an exception. The message also names each exceptionthat caused it, which Rails lists as "Caused by", without their backtraces, such as the
Mime::Type::InvalidMimeTypebehind an invalidAcceptheader. Rails renders the exception, and errorservices hooked into Rails report it, as before. With
BACKTRACEset, or a routing error raisedfrom application code, the exception is logged with its backtrace;
config.semantic_logger.backtrace_cleaner = nildoes not change this. To leave these out of thelog altogether, set
config.action_dispatch.log_rescued_responses = false.See discussion #236.
SyntaxErrorraised while handling a request, such as one in a file thatRails loads on demand in development. It was logged as
ArgumentError: Invalid value for logger exception, since Rails passes it wrapped in anActiveSupport::SyntaxErrorProxy.config.filter_parametersfrom every log entry by default, not onlyfrom the request parameters that Rails filters itself. Sets Semantic Logger 5.3's
SemanticLogger.sensitive_keysonce the application has initialized, so the value of every keythat the filters match is written as
"[FILTERED]"in the payload, named tags, and context ofevery entry, at any depth, by every appender. Keys are matched as written and in snake_case, so
an
X-Api-Keyheader in a payload is redacted, asx_api_key. Seesemantic_logger discussion #272.
Log output change: the filters match any key that contains them, so Rails' default filters
(
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc)also redact keys such as
max_tokens,token_count,cache_key, andapi_key_id, everyemail, and theconcurrency_keyof Solid Queue's entries. To opt out, setconfig.rails_semantic_logger.redact_filter_parameters = false; assigningSemanticLogger.sensitive_keys = nildoes not opt out, since it cannot be told apart from neverassigning it. An application that assigns its own
SemanticLogger.sensitive_keyskeeps them.Limits:
AuthorizationorCookie; add them, e.g.config.filter_parameters += [:authorization, :cookie].argumentsand Action Mailerargsare logged as JSON text, which is not redacted.For a job that takes a secret, leave its arguments out of the log with
self.log_arguments = false."credit_card.code", only matches a key named that, not acodekeynested in
credit_card. That includes the"model.attribute"filters that Rails adds forActive Record encrypted attributes.
SemanticLogger.call_site_level:the file, line, and method of the code behind it. The text formatters write it after the thread,
such as
[1234:puma 1 articles_controller.rb:15 ArticlesController#index], and the:jsonformatter as
file,line, andmethod. Unlikebacktrace_level, it reads only the frames up tothat code, about a microsecond per entry. For the entries of Rails' events, Rails Semantic Logger
reads the stack up to the first application frame, with the subscriber's backtrace cleaner, which
costs more. When there is none, it reads up to where Rails took over from the application, or the
whole stack, when Rails did not take over, or a
verbose_*_logsoption needs the entry's source.another level, set
config.semantic_logger.call_site_level = nil(or:info, ...) inconfig/application.rb,config/environments/development.rb, or an initializer.backtrace_level, which captured a backtrace for every entryat the default level. Backtraces in the console are back to the
:errordefault.frame: for a query, the code that ran it; for a redirect,
send_data,send_file, unpermittedparameters, and fragment caching, the line in the action; for Processing, Completed, and CSRF
warnings, the controller's action; for
rescue_from, where the exception was raised; for arender, the code that called
render, or the template that rendered a partial; for Active Job,the code that enqueued or performed the job, or else the job's
#perform; for Action Mailer,the code that delivered the mail, or else the mailer's action; for an exception that a request
raised, including in a live or streamed response, where the application raised it.
around_action, or a worker'smiddleware, is not taken for the code behind an entry that Rails logs once it has taken over.
The search stops where Rails dispatches an action, and where Active Job performs a job from its
queue, so a template that Rails renders once the action has returned records no call site, and
a job that a worker performs records its
#perform, as does a job performed by the inline ortest adapter. An action, or
#perform, that a class inherits is labelled with the class thatdefines it, and a compiled template's frame has no label, since Rails names its method with
numbers that change on every boot. With
BACKTRACEset, every frame is the application's, sothe call site is the first frame outside Rails Semantic Logger.
Started, a haltedfilter chain, Sidekiq's job start, completion, and error handler entries, and Solid Queue's.
:debug, asSemantic Logger does, rather than the logger's level. With the logger at
:traceandSemanticLogger.backtrace_level = :debug, the backtrace started in Active Support rather than atthe application code that ran the query.
sidekiq.queue.latency) of zero, rather than a negative one, when thejob was enqueued by a host whose clock is ahead of this one. Semantic Logger 5.3 deprecates a
negative
metric_amount.redis/redis-rb (redis)
v6.1.0Compare Source
New features
BLESSkey-protection commands (Redis 8.12):bless_get,bless_set,bless_clear,bless_scanandbless_scan_each. OnRedis::Cluster,bless_scaniterates every shard theway
scandoes (requires redis-cluster-client 0.17.3).Redis::Distributedimplements all butbless_scan, whose cursor cannot span ring nodes; usebless_scan_eachthere. (#1395)sexpire,spexpire,sexpireat,spexpireat,sttl,spttl,sexpiretime,spexpiretimeandspersist, with thenx:/xx:/gt:/lt:condition options, plussaddexwithmnx:/mxx:and theex:/px:/exat:/pxat:/keepttl:expiry options. All are available onRedis::Distributed. (#1405)zmove,bzmoveandzmovemember(Redis 8.12). Available onRedis::Distributed.(#1411)
bitrangeintarray(Redis 8.12). Available onRedis::Distributed. (#1409)arset,arget,armset,armget,argetrange,arlen,arcount,ardel,ardelrange,arinsert,arseek,arnext,arlastitems,arring,arscan,argrep,aropandarinfo. All are available onRedis::Distributed.(#1371)
increxwithby:,lbound:/ubound:/saturate:and theex:/px:/exat:/pxat:/persist:/enx:expiry options, andxnack(Redis 8.8).increxis available onRedis::Distributed. (#1372)json_setnow acceptsfpha:to store a numeric array as a packed floating-point array, andthe sorted set union/intersection commands accept
aggregate: "count"(Redis 8.8). (#1373)__keyspace@*/__keyevent@*channels and the Redis 8.8 subkey notification families(
Redis::KeyspaceNotifications), plus a manager (Redis#keyspace_notifications) that owns adedicated connection, dispatches typed
Notificationobjects to handlers, and automaticallyre-subscribes after connection loss (
on_reconnectsignals the lossy gap). Enablingnotify-keyspace-eventson the server remains the operator's responsibility. Not supported byRedis::Distributed. See specs/keyspace-notifications/user-guide.md. (#1375)hotkeys_start,hotkeys_get,hotkeys_stopand
hotkeys_reset. A tracking session is state of a single server, soRedis::ClusterandRedis::DistributedraiseNotImplementedError, also insidepipelined/multi; call themon a single node instead. See the README "Hot key tracking (HOTKEYS)" section. (#1408)
xaddnow acceptsidmp:andidmpauto:for idempotent production, and addxcfgset(Redis 8.6). (#1402)
xreadgroupnow acceptsclaim:(Redis 8.4). (#1401)setacceptsifeq:,ifne:,ifdeq:andifdne:, and adddelexanddigest.Redis::XXH3.hexdigestcomputes theXXH3-64 digest of a value locally in pure Ruby, so
ifdeq:/ifdne:need noDIGESTroundtrip. Available on
Redis::Distributed. See the README "Compare-and-set (CAS/CAD)" section.(#1393)
xdelexandxackdel;xaddandxtrimnow acceptpolicy:(:keepref,:delrefor:acked);cluster('slot-stats', ...)replies are reshaped into[slot, Hash]pairs(Redis 8.2). (#1391, #1392)
vadd,vcard,vdim,vemb,vlinks,vsim,vrem,vismember,vrandmember,vrange(Redis 8.4),vinfo,vsetattrandvgetattr.All are available on
Redis::Distributed. (#1382)hgetdel,hgetexandhsetex(Redis 8.0). All are available onRedis::Distributed.(#1389)
hexpireat,hpexpireat,hexpiretime,hpexpiretimeandhpersist;hexpireandhpexpirenow accept thenx:/xx:/gt:/lt:condition options (Redis 7.4). All areavailable on
Redis::Distributed. (#1374)waitaof(Redis 7.2). OnRedis::Clusterit is sent to every primary and each count inthe reply is the minimum across primaries;
Redis::Cluster.newnow acceptscommand_routings:to override the driver's per-command request/response policies. (#1387)function,fcallandfcall_ro. All are available onRedis::Distributed. (#1383)sort_ro,lcs,sintercardandzintercard(Redis 7.0). All are available onRedis::Distributed. (#1384)infonow accepts several sections at once,shutdownacceptssave:,now:,force:andabort:,xgroupacceptsentriesread:, and addxsetidwithentriesadded:andmaxdeletedid:(Redis 7.0). (#1385)compression: "SQ8"andtraining_threshold:(Redis 8.12) need no special handling. (#1397)Redis, such as the reply-reshaping lambdas andRedis::Future::FutureNotReady, shareable, so that commands and pipelines work in non-mainRactors. (#1403)
redis/ractorize, which freezesRedis::Client::ERROR_MAPPINGandRedis::Cluster::Client::ERROR_MAPPINGso that errors can be translated in non-main Ractors.Require it in the main Ractor after anything that adds errors to the mappings. See the README
"Ractors" section. (#1403)
Bug fixes
hsetreturn0without calling the server when given an empty hash, instead of raisingERR wrong number of arguments for 'hset' command. (#1290, #1404)Redis::Distributed#multirelease the watched key once the transaction runs or raises, sothat commands on keys stored on other nodes no longer raise
CannotDistributeafter awatchand
multisequence. An explicit#unwatchor another#multiafter the transaction stillworks as before. (#1407)
unsubscribe/punsubscribefrom another thread while thesubscribed client was concurrently tearing down raised
NoMethodErrorinstead ofRedis::SubscriptionError. (#1375)pipelinedandmultiare now translated toRedis::*errors instead of surfacing as
RedisClient::*errors. (#1396)zrankandzrevrankwithwith_score: truereturnnilfor a missing key or memberinstead of
[nil, nil], and RESP2nanreplies becomeFloat::NAN(Redis 7.2). (#1388)xautoclaimreplies now include a'deleted'key with the ids that were deleted from thestream and dropped from the PEL (Redis 7.0; always
[]on 6.2). (#1386)migrateinsidepipelined/multinow falls back to the client'sdbandtimeoutinsteadof the pipeline's. (#1381)
himport_preparesnapshots the field names at preparation time, so mutating the stringsafterwards no longer changes the schema used for automatic re-preparation. (#1380)
ft_aggregatenow sends the rightLOADfield count when the fields are given as nestedarrays. (#1379)
pipelined(exception: false), errors are no longer passed through the reply reshapinglambdas, the flag now also applies to
multiinside the pipeline, and whenEXECaborts thetransaction's command futures hold the error instead of staying unresolved. (#1377)
HELLOitself fails withNOPROTO, instead of on any commanderror whose message contains
NOPROTO. (#1376)Redis::HashRing#remove_nodefilters the ring positions once instead of once per replica.(#1378)
Maintenance
redis-clientto0.31.0. (#1400)redis-cluster-clientto0.18.0; see cluster/CHANGELOG.md for the routing changes itbrings to
Redis::Cluster. (#1375, #1395)himport_auto_prepareclient option. (#1370)SeleniumHQ/selenium (selenium-webdriver)
v4.54.0=========================
bblimke/webmock (webmock)
v3.40.0Compare Source
Add support for
Curl::Multi(#535)Previously, WebMock didn't see requests sent with
Curl::Multi. A handle added withmulti.addand sent withmulti.performwent 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 raisesWebMock::NetConnectNotAllowedErrorfrommulti.add. Allowed requests still run together in curb's own multi loop. WebMock records both, andWebMock.after_requestcallbacks get both.If your tests send
Curl::Multirequests to real servers, stub them or allow their hosts, for example withWebMock.disable_net_connect!(allow: "api.example.com"). VCR, hooked into WebMock, now records and replays these requests too, and raisesVCR::Errors::UnhandledHTTPRequestErrorfor one that a cassette doesn't have, so record such cassettes again.Thanks to Todd Fisher
Drop curb callbacks on
Curl::Easy#resetfor stubbed requests, as curb doesPreviously, a callback such as
on_complete, set beforereset, still ran for a stubbed request made after it. Curb drops every callback onreset, so a real request didn't run it. If your tests rely on such a callback, set it again afterreset.v3.39.0Compare Source
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_blockmethod returned aThread::Queueinstead 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 aswith(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::ClientraisedNoMethodError: 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::NetConnectNotAllowedErrorotherwise. 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 withWebMock.disable_net_connect!(allow: ...).Match the Cookie header that Typhoeus sends for the
cookieoption (#813)Previously,
Typhoeus.get(url, cookie: "key=value")sentCookie: key=value, but WebMock recorded the request without it, so a stub withwith(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,cookiejarorcookielist, 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 withfilter_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 raisedArgumentError. VCR's Typhoeus hook answered the request before WebMock saw it, and WebMock still passed the request toafter_requestcallbacks, asnil.WebMock now leaves out requests it didn't see. On older versions,
hook_into :webmockalone records and replays Typhoeus requests too.Run the instrumentation of the
httpgem 6 for stubbed requests (#881)Previously, with version 6 of the
httpgem (HTTP.rb), a stubbed request skipped the instrumentation feature, soHTTP.use(instrumentation: {instrumenter: ...})emitted norequest.httpevents for it. In every version, a stubbed timeout orHTTP::Erroremitted noerror.httpevent.Stubbed requests now emit the same instrumentation events as real ones. Other features that HTTP.rb 6 runs around a request, such as caching and digest auth, still don't run for stubbed requests.
Fix Net::HTTP uploads raising
ArgumentErrorfor body streams whosereadneeds a length (#644)Previously, a request with
body_streamset to an object withdef read(length, buffer = nil)raisedArgumentError: wrong number of arguments, even with real connections allowed, because WebMock calledreadwithout arguments. Net::HTTP itself always passes a length, so the upload worked without WebMock.WebMock now reads such a stream in chunks.
Fix failure messages raising
Encoding::CompatibilityErrorfor bodies in different encodings (#668)Previously, the message for an unstubbed request, or for a failed
assert_requested, could raiseEncoding::CompatibilityError: incompatible character encodings: BINARY (ASCII-8BIT) and UTF-8instead of showing the failure. This happened when the message listed a UTF-8 body with non ASCII characters, such as a stubwith(body: "café"), next to a binary one, such as an uploaded image.Such messages now show the failure, with bytes that aren't valid UTF-8 written as escapes, such as
\xFF.Show URI templates, regexps and query options as Ruby in the list of registered stubs (#938)
Previously, the registered stubs listed for an unstubbed request put every URI in quotes, so a template stub was shown as
stub_request(:get, ""http://localhost:9200/{index}/_search""), a regexp as a string, and a query given towithwas written inside the quotes.The list now shows
stub_request(:get, Addressable::Template.new("http://localhost:9200/{index}/_search")), a regexp as a regexp, and a query that isn't part of the URL aswith(query: ...). The suggested stub for the unmatched request is unchanged.Leave out of the body diff the values that a regexp in a stub's body pattern matches (#840)
Previously, when a request didn't match a stub such as
with(body: {"email" => /@/}, headers: {"X-Token" => "1"})because of its headers, the body diff in the message still listed["~", "email", "milo@carter.net", /@/], so the regexp looked like the cause.The diff now leaves out the values that such a regexp matches.
Leave the User-Agent header out of the suggested stub for an unmatched request (#596)
Previously, the stub that WebMock suggests, as in "You can stub this request with the following snippet", required the request's
User-Agent, such as'User-Agent'=>'Ruby'or one with the client's version. A stub pasted from it stopped matching when the client was upgraded or the tests ran on another platform.The suggestion now leaves
User-Agentout, so it matches whatever the client sends. The message still shows the request with all its headers.Fix loading a YAML or Marshal dump of an em-http-request client while WebMock is enabled (#729)
Previously,
YAML.unsafe_load(client.to_yaml)orMarshal.load(Marshal.dump(client))raisedArgumentError: undefined class/module EventMachine::HttpClient::CookieJar, because WebMock replacesEventMachine::HttpClientwith a subclass.Such a dump now loads. A dump made while WebMock is enabled names WebMock's subclass, so load it where WebMock is loaded.
Convert a status given as a string of digits, and deprecate statuses such as
:ok(#802)Previously,
to_return(status: "201")gave the code"2"in Net::HTTP, because WebMock kept the string and adapters used its first character as the code.to_return(status: :ok)gave the code"o", or0in some clients, without an error.A string of digits is now converted to a number. A status such as
:ok,"ok"or200.0now prints a deprecation warning, and WebMock 4.0 will raiseArgumentErrorfor it. Use a number such as200, orRack::Utils.status_code(:ok)in a Rack app. A code and reason pair such as[200, "OK"]works as before.Keep each cookie of a stubbed response with several
Set-Cookieheaders, in order (#470)Previously, a raw response such as
to_return(File.read("response.txt"))with twoSet-Cookielines gave clients one comma joinedSet-Cookievalue, which can't be split back, since a cookie such asa=1; Expires=Wed, 21 Oct 2026 07:28:00 GMTcontains a comma. A stub such asto_return(headers: {"Set-Cookie" => ["sid=old; Max-Age=0", "sid=new"]})gave the cookies sorted, so a client appliedsid=old; Max-Age=0last and deleted the cookie, and Curb got them on one header line.Each client now gets the cookies as it would from a server sending these lines: separately, in the given order, on lines of their own in Curb, and joined in
headers["Set-Cookie"]and listed inresponse[:cookies]in Excon. Other repeated response headers are unchanged.A test that expected the cookies of such a stub joined, or sorted, now gets them as a real server would send them. For a real response with several cookies,
after_requestcallbacks, and so VCR, now get them in the order the server sent them instead of sorted, and for Excon each cookie instead of the joined header, so recordings and snapshots of them can change.Point out when a request URL and a stub's URL differ in a slash at the end of the path (#864)
WebMock treats
http://example.com/usersandhttp://example.com/users/as different URLs, since servers can too. Previously, when a request missed a stub because of that slash, the message didn't say why.The registered stubs listed for an unstubbed request, and the message of a failed
assert_requestedorhave_been_made, now point out the slash. Matching is unchanged.v3.38.0Compare Source
Allow or disable real requests only within a block (#1110)
WebMock.allow_net_connect!andWebMock.disable_net_connect!now take a block, for exampleWebMock.disable_net_connect!(allow: "api.example.com") { ... }. The settings apply only while the block runs. When it ends, even with an exception, the settings from before the call come back.Previously, either method ignored a block. In
WebMock.allow_net_connect! { Net::HTTP.get(uri) }, the request never ran, and real requests stayed allowed until the settings changed again. Code in such a block now runs.The settings are global, so other threads see them while the block runs. Don't run such blocks in several threads at once, because they can restore each other's settings in the wrong order.
Thanks to Yegor Bugayenko for the suggestion
Record the form Content-Type of Typhoeus requests with a hash body (#463)
Previously,
Typhoeus.post(url, body: {page: 2})sentContent-Type: application/x-www-form-urlencoded, but WebMock recorded the request without it. A stub withwith(body: {page: 2})didn't match, and neither did a stub that required that header.WebMock now records the header whenever Typhoeus sends it for a hash body: for a POST, even with an empty hash, and for any other method except PUT and HEAD, unless the form is empty.
A request that sets its own Content-Type keeps it. Multipart forms, such as a hash with a file or a request with
multipart: true, still have no Content-Type recorded, except an empty POST, which Typhoeus sends URL encoded even then. Requests withnobody: truehave none either.Callbacks,
WebMock.executed_requestsand VCR see the header too, and the stub suggested for an unmatched request includes it and shows a form body as a hash. Update assertions that compare all the headers of such a request. If VCR, hooked into WebMock, matches requests on their headers, record the affected cassettes again.Keep a
withblock whenwithis called again with options onlyPreviously,
stub_request(:post, url).with { |request| request.body == "yes" }.with(headers: {"X-A" => "1"})dropped the block, so the stub also matched a request with that header and the body"no". A laterwithcall already kept the options it didn't give, such asbody:, and now keeps the block too. The same applies toa_request.A stub or request expectation that matched only because the block was dropped no longer matches. Calling
withagain with a block, or with an option given before, still replaces it.Match numbers and boolean values in query patterns (#371)
Previously,
with(query: hash_including(page: 2))never matched?page=2, because query values in a request are strings and WebMock compared them with the Integer2. A plain hash had the same problem when the stub's URI was a regexp, a template or a lambda, as instub_request(:get, /example/).with(query: {page: 2}). With a string URI, an array of numbers such as{tag: [2, 10]}didn't match?tag[]=2&tag[]=10.WebMock now compares numbers,
trueandfalsein query patterns as strings, including inside nestedhash_includingandhash_excludingmatchers.This also makes
hash_excludingwork with such values. Previously,with(query: hash_excluding(page: 2))matched?page=2. A test that passed only because of this will now fail.Fix nested
hash_includingandhash_excludingwith symbol keys in RSpec ([#900](https://Configuration
📅 Schedule: (UTC)
* 0-4,22-23 * * 1-5)* * * * 0,6)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.