Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rack 3 support #1857

Merged
merged 29 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
eff32e1
Don't allow Rack 3 builds to fail
dentarg Dec 23, 2022
482b157
Add `rackup`, `rack-session` as dependencies
dentarg Dec 24, 2022
c5f9817
Remove Rack 2 jobs
dentarg Dec 24, 2022
a86a32b
Run tests for sinatra-contrib and rack-protection
dentarg Dec 24, 2022
5efc85e
Rack 3 requires all response headers to be lowercase
dentarg Dec 28, 2022
c83b7f2
`SERVER_PROTOCOL` -> `HTTP_VERSION`
dentarg Dec 28, 2022
0b4622f
Rack 3 does not allow newlines in headers
dentarg Dec 28, 2022
943cfaa
Find `RACK_SESSION_UNPACKED_COOKIE_DATA`
dentarg Dec 28, 2022
26aeec7
rack-protection tests now pass (on Ruby 2.7.7)
dentarg Dec 28, 2022
1396f08
Cookie attributes are lowercase in Rack 3
dentarg Dec 28, 2022
0a9b043
sinatra-contrib tests now pass
dentarg Dec 29, 2022
44377b2
Fix server registration
dentarg Dec 30, 2022
8e6d11c
Update routing test `handles params without a value`
dentarg Feb 9, 2023
217c5db
Restore `continue-on-error`
dentarg Feb 13, 2023
a4a786a
Depend on `rackup` and `rack-session` >=2.0.0
dentarg Feb 24, 2023
8da32a4
`Rack::File` -> `Rack::Files` again
dentarg Feb 24, 2023
c129d58
Support `text/javascript` as JavaScript MIME type
dentarg Feb 25, 2023
41d6063
`Rack::Handler` -> `Rackup::Handler`
dentarg Mar 4, 2023
5b28218
Revert "Update routing test `handles params without a value`"
dentarg May 15, 2023
d3dfc19
Update rack requirement in rack-protection gemspec
dentarg Aug 7, 2023
4ba8664
Puma 5 is not compatible with Rack 3
dentarg Aug 7, 2023
7a514e2
Test with rack head
dentarg Aug 7, 2023
a378414
Fix typo in spec description
dentarg Nov 26, 2023
e721af6
Require rack 3.0.0, not 3.0.0.beta1
dentarg Dec 23, 2023
7a16094
rack-protection depends on rack-session
dentarg Dec 23, 2023
1e37204
CI: use rack stable (Rack >= 3.0)
dentarg Jan 2, 2024
8a78d8b
Make `rackup` an optional dependency
dentarg Jan 2, 2024
1377751
Skip "without rackup" test on rack head branch
dentarg Jan 3, 2024
985625d
Fix `test_app_start_without_rackup` on JVM rubies
dentarg Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rack::Handler -> Rackup::Handler
  • Loading branch information
dentarg committed Jan 5, 2024
commit 41d6063d7ddf95f2b4900cc7a94f89589ce656b9
3 changes: 2 additions & 1 deletion lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# external dependencies
require 'rack'
require 'rackup'
require 'tilt'
require 'rack/protection'
require 'mustermann'
Expand Down Expand Up @@ -1599,7 +1600,7 @@ def run!(options = {}, &block)
return if running?

set options
handler = Rack::Handler.pick(server)
handler = Rackup::Handler.pick(server)
handler_name = handler.name.gsub(/.*::/, '')
server_settings = settings.respond_to?(:server_settings) ? settings.server_settings : {}
server_settings.merge!(Port: port, Host: bind)
Expand Down
2 changes: 1 addition & 1 deletion test/server_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative 'test_helper'
require 'stringio'

module Rack::Handler
module Rackup::Handler
class Mock
extend Minitest::Assertions
# Allow assertions in request context
Expand Down