Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Remove what rack 3.2 no longer has, checked against rack 3.2.7: - Rack::Session, moved to the rack-session gem in 3.0 - Rack::Server, Rack::Handler, and Rack::Lobster, moved to the rackup gem in 3.0 - Rack::Auth::Digest, Rack::Chunked, and Rack::Utils::HeaderHash, removed in 3.1, and Rack::Logger, removed in 3.2 - The old Rack::Lint wrappers and checks, which Rack::Lint no longer has - Methods that no longer exist, like Rack.version, Utils.key_space_limit, and Utils.add_cookie_to_header - HTTP_VERSION, RACK_MULTITHREAD, RACK_MULTIPROCESS, RACK_RUNONCE, RACK_HIJACK_IO, and RACK_SESSION_UNPACKED_COOKIE_DATA Add Rack::Headers, which replaces Utils::HeaderHash, and the constants added in 3.x. VERSION is now a String. Rack::Builder takes options, and evaluates its block with the builder as self, and run takes a block. The test used Rack::Server and Rack::Lobster, so build an app with Rack::Builder instead. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Checked against rack 3.2.7: - Rack::BadRequest, included by the errors raised for bad requests, and the new errors QueryParser::QueryLimitError (and ParamsTooDeepError as its alias), Multipart::MultipartTotalPartLimitError, MissingInputError, EmptyContentError, and BoundaryTooLongError - Rack::RewindableInput::Middleware and Rack::MockResponse::Cookie, which MockResponse#cookies now returns instead of CGI::Cookie - Response#headers is Rack::Headers, so headers can be set - Utils.set_cookie_header, delete_set_cookie_header(!), forwarded_values, default_query_parser, and the multipart limits, Request.ip_filter, forwarded_priority, and x_forwarded_proto_priority, Request#form_pairs, Response#no_entity_body?, and other new methods - QueryParser takes bytesize_limit: and params_limit: instead of key_space_limit - Remove the constants that no longer exist, like Cascade::NotFound, Utils::ESCAPE_HTML, and the old Multipart regexps - Remove cgi from the manifest, as the RBS no longer refers to CGI Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
rack 3.0 moved Rack::Session into the rack-session gem, so rack 3 apps need these with rack 3.2's RBS, which no longer declares Rack::Session. Written from the rack-session 2.1.2 source, with parameters checked against it: - Rack::Session::Cookie with its coders and the Encryptor that encrypts the cookie with the :secrets option - Rack::Session::Pool - Rack::Session::Abstract::Persisted, PersistedSecure, and ID, with the private methods that session stores implement or override, like find_session, write_session, and delete_session - Rack::Session::Abstract::SessionHash, which accepts String and Symbol keys - Rack::Session::SessionId and the RACK_SESSION constants Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
@amatsuda Thanks for your contribution! Please follow the instructions below for each change. Available commandsYou can use the following commands by commenting on this PR.
|
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.
Adds types for rack 3.2 and rack-session 2.1.
Until now, the only rack RBS here was for 2.2, so
rbs collectiongave it to rack 3 apps too. That RBS declaresRack::Session, which rack 3.0 moved to the rack-session gem, so RBS for rack-session would duplicate those declarations. rack 3.2's RBS doesn't declareRack::Session, and rack-session's RBS supplies it.Commits
Rack::Session,Server,Handler,Lobster,Auth::Digest,Chunked,Utils::HeaderHash,Logger, the oldLintinternals, and stale methods and constants), and addsRack::Headers. The test usedRack::Server, so it now builds an app withRack::Builder.Rack::BadRequestand the new errors,RewindableInput::Middleware,MockResponse::Cookie,Response#headersasRack::Headers, the newUtilsandRequestmethods, andQueryParser'sbytesize_limit:/params_limit:. Also removes constants that no longer exist, and cgi from the manifest.Cookiewith its coders andEncryptor,Pool,Abstract::Persisted/PersistedSecure/ID,SessionHash, andSessionId.The declarations were checked against rack 3.2.7 and rack-session 2.1.2 for existence and parameters.
The RBS that depends on rack
rack 3 apps now get rack 3.2 and rack-session 2.1, and rack 2 apps still get rack 2.2. These pass
bin/testwith this change:Without the rack-session commit, the RBS for rack 3 apps would lack
Rack::Session, so the commits should be merged together.🤖 Generated with Claude Code