Upgrade Sinatra 3.2 to 4.2 and Rack 2.2 to 3.2#91
Conversation
- Update Gemfile constraints for sinatra ~> 4.0 and rack-protection ~> 4.0 - Fix error handler response access for Rack 3 compatibility - URI::RFC3986_PARSER.unescape deprecation warning resolved
…t uploads, and API errors
Prerelease Gem BuiltVersion: Install from GitHub PackagesAdd to your Gemfile: source "https://rubygems.pkg.github.com/bennyfactor" do
gem "v7cms", "0.3.5.pre.91"
endOr install directly: gem install v7cms -v "0.3.5.pre.91" --source "https://rubygems.pkg.github.com/bennyfactor"Download ArtifactThe gem is also available as a build artifact on this workflow run. |
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts
|
There was a problem hiding this comment.
Pull request overview
Upgrades the app’s core Rack/Sinatra stack to Sinatra 4.x + Rack 3.x and adjusts error handling/tests to maintain JSON API behavior under the new response/header APIs.
Changes:
- Bump
sinatrato~> 4.0andrack-protectionto~> 4.0, with correspondingGemfile.lockupdates (Rack 3.2.x, Sinatra 4.2.x, etc.). - Update error handlers to use Rack 3-compatible response access (
response.content_type, and body handling for array vs string). - Add request specs for API JSON error responses and multipart upload behavior.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/routes/errors_spec.rb | Adds API error-response JSON parsing assertions. |
| spec/routes/assets_spec.rb | Adds multipart upload request specs for /api/assets. |
| lib/v7cms/application.rb | Updates 403/500 handlers to preserve JSON responses under Rack 3. |
| Gemfile.lock | Locks upgraded Sinatra/Rack-related dependency versions (adds rack-session, logger deps, etc.). |
| Gemfile | Updates top-level gem constraints for Sinatra and rack-protection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
URI::RFC3986_PARSER.unescapedeprecation warning on Ruby 3.4response.content_typeinstead ofresponse['Content-Type'], handle body as array or string)Audit performed
request.body.readcalls (none double-read, no rewind needed)params[:file][:tempfile]works with Rack 3find_templateoverride,halt,redirect,session,passall workNew tests added
Test plan
🤖 Generated with Claude Code