-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Support rack 3.x and rackup #435
Support rack 3.x and rackup #435
Conversation
* fixed register Thin with rack/rackup
Hi @ioquatix , sorry to bother, could you have a look at this please? AFAIK this is needed for Thin to support rack/rackup. Thanks! |
Thanks for your effort. IMHO, It's better to have separate files, like this:
Using a shared implementation, rather than trying to sniff the constants which is fragile. Are you able to update the implementation / PR to follow that model? |
Sure, I will do in the next days and update the PR, thanks! |
Looking forward to it! |
* Split classes Rack/Rackup::Handler::Thin * Updated CI to run on rack 1/2/3
Done, I've also updated CI to run on all rack versions. |
* fixed CI: ruby 3.0 means latest 3.x release while "3.0" means latest 3.0.x release * added CI build for macos with rack v3 * added CI build for ruby: head with rack v3
Should be green now (see same PR on my fork and9000#3 😄 ). It was red as the ruby version 3.0 points to latest 3.x while "3.0" points to 3.0.x and rack v1 doesn't work with latest ruby versions see below. I've excluded CI for ruby 3.3/3.4 against rack v1 as 3.3 introduced a breaking change in I've added also macos build against rack v3 and ruby: head against rack v3. |
Thanks for your contribution. Do you know if anything else is required to support Rack 3? Or can we start considering to make a new release of thin? |
AFAIK no nothing else is required, this was the last bit to support Rack 3. I would love to see a new thin release! 😄 |
I reviewed the code and there is a missing piece. We need to copy something like this: https://github.com/socketry/protocol-rack/blob/16197ef7bbf0be383e5a3b56f98068f925a9f313/lib/protocol/rack/adapter/rack3.rb#L22-L64 Or make the environment construction conditional on the Rack version, as some variables have been removed or modified. We should probably add tests to |
Hello,
following what have been done in #399 I was trying to see if I was able to upgrade resque ( resque/resque#1912 ) to support rack 3.x. As it wasn't working, digging a little I think
thin
is missing one last bit in order to be able to work both with rack 2/3 and with/without rackup gem. I've taken inspiration on what has been done in puma puma/puma#3532.Thanks,
Andrea