Skip to content

Commit

Permalink
Merge pull request #310 from pact-foundation/fix/test_rack_2_or_3
Browse files Browse the repository at this point in the history
fix(test): alias Rack/Rackup WEBrick handler in x509 test for backwards compat
  • Loading branch information
YOU54F committed Jun 25, 2024
2 parents 5dc44f4 + cc77498 commit 792877d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
Expand All @@ -28,7 +28,7 @@ jobs:
version: ${{ steps.release-gem.outputs.version }}
increment: ${{ steps.release-gem.outputs.increment }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: release-gem
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# run:
# shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
Expand All @@ -31,7 +31,7 @@ jobs:
ruby_version: ["3.2"]
os: ["ubuntu-latest","windows-latest","macos-latest"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
Expand All @@ -49,7 +49,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ Gemfile.lock
gemfiles/*.gemfile.lock
reports/pacts
spec/examples.txt
*bethtest*
*bethtest*
.DS_Store
4 changes: 3 additions & 1 deletion spec/support/ssl_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ def webrick_opts port
require "rack"
begin
require "rackup/handler/webrick" # rack 3
PactWEBrick = Rackup::Handler::WEBrick
rescue LoadError
require "rack/handler/webrick" # rack 2
PactWEBrick = Rack::Handler::WEBrick
end

opts = webrick_opts(4444)

Rack::Handler::WEBrick.run(app, **opts) do |server|
PactWEBrick.run(app, **opts) do |server|
@server = server
end
end

0 comments on commit 792877d

Please sign in to comment.