From 4a46c2155efa61ff34f12f58884db91092de6225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Bu=C5=82at?= Date: Wed, 22 Apr 2020 00:02:26 +0200 Subject: [PATCH] fix: fix Ruby 2.7 kwargs warning (#122) --- lib/pact/consumer/server.rb | 2 +- lib/pact/mock_service/control_server/run.rb | 2 +- lib/pact/mock_service/run.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pact/consumer/server.rb b/lib/pact/consumer/server.rb index 2e66db5..01f9eb0 100644 --- a/lib/pact/consumer/server.rb +++ b/lib/pact/consumer/server.rb @@ -67,7 +67,7 @@ def responsive? def run_default_server(app, port) require 'rack/handler/webrick' - Rack::Handler::WEBrick.run(app, webrick_opts) do |server| + Rack::Handler::WEBrick.run(app, **webrick_opts) do |server| @port = server[:Port] end end diff --git a/lib/pact/mock_service/control_server/run.rb b/lib/pact/mock_service/control_server/run.rb index cf1cd76..0524e2b 100644 --- a/lib/pact/mock_service/control_server/run.rb +++ b/lib/pact/mock_service/control_server/run.rb @@ -24,7 +24,7 @@ def call # server, and can't shut it down. So, keep a manual reference to the Webrick server, and # shut it down directly rather than use Rack::Handler::WEBrick.shutdown # Ruby! - Rack::Handler::WEBrick.run(control_server, webbrick_opts) do | server | + Rack::Handler::WEBrick.run(control_server, **webbrick_opts) do | server | @webrick_server = server end end diff --git a/lib/pact/mock_service/run.rb b/lib/pact/mock_service/run.rb index 02f3e60..6146084 100644 --- a/lib/pact/mock_service/run.rb +++ b/lib/pact/mock_service/run.rb @@ -25,7 +25,7 @@ def call require_monkeypatch - Rack::Handler::WEBrick.run(mock_service, webbrick_opts) + Rack::Handler::WEBrick.run(mock_service, **webbrick_opts) end private