Skip to content

Commit

Permalink
Use Protocol::Rack::Adapter.parse_file for compatibility with older…
Browse files Browse the repository at this point in the history
… Rack versions. (#232)

* Restore workflow for multiple rack versions.
  • Loading branch information
ioquatix committed Apr 3, 2024
1 parent 9fcd821 commit 79a92c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ env:

jobs:
test:
name: ${{matrix.ruby}} on ${{matrix.os}}
name: ${{matrix.ruby}} on ${{matrix.os}} ${{matrix.gemfile}}
runs-on: ${{matrix.os}}-latest
continue-on-error: ${{matrix.experimental}}

env:
BUNDLER_GEMFILE: ${{matrix.gemfile}}

strategy:
matrix:
os:
Expand All @@ -26,6 +29,12 @@ jobs:
- "3.2"
- "3.3"

gemfile:
- gems/rack-v1.rb
- gems/rack-v2.rb
- gems/rack-v3.rb
- gems/rack-head.rb

experimental: [false]

include:
Expand Down
2 changes: 1 addition & 1 deletion falcon.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
spec.add_dependency "localhost", "~> 1.1"
spec.add_dependency "openssl", "~> 3.0"
spec.add_dependency "process-metrics", "~> 0.2.0"
spec.add_dependency "protocol-rack", "~> 0.1"
spec.add_dependency "protocol-rack", "~> 0.5"
spec.add_dependency "samovar", "~> 2.3"
end
2 changes: 1 addition & 1 deletion lib/falcon/environment/rackup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def rackup_path
end

def rack_app
::Rack::Builder.parse_file(rackup_path)
::Protocol::Rack::Adapter.parse_file(rackup_path)
end

def middleware
Expand Down

0 comments on commit 79a92c7

Please sign in to comment.