Closed shouichi closed 3 weeks ago
How about something like rails does it? https://github.com/rails/rails/blob/de4d8744744acab2dd9db0683ccf784ea45810b2/railties/lib/rails/rackup/server.rb
@shouichi @Earlopain Thank you both! I updated it based on the Rails PR, which I think will produce the Rack deprecation warning too during the fallback.
I'm reluctant to add rackup
to the gemspec because I don't consider the healtcheck "core" functionality, so at a certain point we'll likely need to catch the loaderror and gracefully handle it with a message like "You'll need to add rackup
to your gemfile."
Also, while trying to get Sorbet definition in place, I learned that the rackup 1.0 release is busted: https://github.com/rack/rackup/issues/13#issuecomment-2186788166
@Earlopain Thank you for the feedback!
@bensheldon Thank you for the quick release! I confirmed the release works as intended in rails 7.1.
From rack >= 3.1.x,
Rack::Handler
is not auto-loaded anymore. Though we should migrate toRackup::Handler
, we can't in the short term. This is because of the support of rails <= 7.0 that doesn't depend on rackup.