Skip to content

Commit 16a29d5

Browse files
committed
Allow overriding Rack adapter version.
1 parent 33e5375 commit 16a29d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/protocol/rack/adapter.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
module Protocol
99
module Rack
1010
module Adapter
11-
if ::Rack.release >= "3.1"
11+
VERSION = ENV.fetch("PROTOCOL_RACK_ADAPTER_VERSION", ::Rack.release)
12+
13+
if VERSION >= "3.1"
1214
require_relative "adapter/rack31"
1315
IMPLEMENTATION = Rack31
14-
elsif ::Rack.release >= "3"
16+
elsif VERSION >= "3"
1517
require_relative "adapter/rack3"
1618
IMPLEMENTATION = Rack3
1719
else

0 commit comments

Comments
 (0)