Fixup code for use with rackup gem (may be used with rack 3) (#3061)#10
Fixup code for use with rackup gem (may be used with rack 3) (#3061)#10MitchLewis930 wants to merge 1 commit intopr_060_beforefrom
Conversation
* Fixup code for use with rackup gem (may be used with rack 3) * Update rack_default.rb * Update puma.rb, use `include` instead of `module_eval` * Changes per comments
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
PR_060
PR Type
Enhancement, Tests
Description
Add Rack 3 and Rackup gem compatibility support
Refactor handler code to use module inclusion pattern
Update tests to support both Rack 2 and Rackup/Rack 3
Add conditional gem dependency for rackup in Gemfile
Diagram Walkthrough
File Walkthrough
rack_default.rb
Add Rack 3 and Rackup compatibility detectionlib/puma/rack_default.rb
puma.rb
Refactor handler to support multiple Rack versionslib/rack/handler/puma.rb
Puma::RackHandlermoduleself.methods to instance methods for inclusionincludepattern instead of direct module definitiontest_rack_handler.rb
Update tests for Rack 2 and Rackup compatibilitytest/test_rack_handler.rb
RACK_HANDLER_MODconstant to abstract handler moduleRACK_HANDLER_MODinstead ofhardcoded
Rack::HandlerTestRackUpmodule for conditional executionGemfile
Add rackup gem dependency for Rack 3Gemfile