Skip to content

Commit 79a92c7

Browse files
authored
Use Protocol::Rack::Adapter.parse_file for compatibility with older Rack versions. (#232)
* Restore workflow for multiple rack versions.
1 parent 9fcd821 commit 79a92c7

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/test.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ env:
1010

1111
jobs:
1212
test:
13-
name: ${{matrix.ruby}} on ${{matrix.os}}
13+
name: ${{matrix.ruby}} on ${{matrix.os}} ${{matrix.gemfile}}
1414
runs-on: ${{matrix.os}}-latest
1515
continue-on-error: ${{matrix.experimental}}
1616

17+
env:
18+
BUNDLER_GEMFILE: ${{matrix.gemfile}}
19+
1720
strategy:
1821
matrix:
1922
os:
@@ -26,6 +29,12 @@ jobs:
2629
- "3.2"
2730
- "3.3"
2831

32+
gemfile:
33+
- gems/rack-v1.rb
34+
- gems/rack-v2.rb
35+
- gems/rack-v3.rb
36+
- gems/rack-head.rb
37+
2938
experimental: [false]
3039

3140
include:

falcon.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
3535
spec.add_dependency "localhost", "~> 1.1"
3636
spec.add_dependency "openssl", "~> 3.0"
3737
spec.add_dependency "process-metrics", "~> 0.2.0"
38-
spec.add_dependency "protocol-rack", "~> 0.1"
38+
spec.add_dependency "protocol-rack", "~> 0.5"
3939
spec.add_dependency "samovar", "~> 2.3"
4040
end

lib/falcon/environment/rackup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def rackup_path
1515
end
1616

1717
def rack_app
18-
::Rack::Builder.parse_file(rackup_path)
18+
::Protocol::Rack::Adapter.parse_file(rackup_path)
1919
end
2020

2121
def middleware

0 commit comments

Comments
 (0)