Skip to content

Commit

Permalink
Allow overriding Rack adapter version.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Oct 28, 2024
1 parent 33e5375 commit 16a29d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/protocol/rack/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
module Protocol
module Rack
module Adapter
if ::Rack.release >= "3.1"
VERSION = ENV.fetch("PROTOCOL_RACK_ADAPTER_VERSION", ::Rack.release)

if VERSION >= "3.1"
require_relative "adapter/rack31"
IMPLEMENTATION = Rack31
elsif ::Rack.release >= "3"
elsif VERSION >= "3"
require_relative "adapter/rack3"
IMPLEMENTATION = Rack3
else
Expand Down

0 comments on commit 16a29d5

Please sign in to comment.