From: Daniel Leidert <daniel.leidert@debian.org>
Date: Mon, 6 Feb 2023 17:26:10 +0100
Subject: support Ruby 3.1

Fix keyword parameters for /usr/share/rubygems-integration/all/gems/rack-2.2.4/lib/rack/handler/webrick.rb:26:
 in `run': wrong number of arguments (given 2, expected 1) (ArgumentError)
---
 Gemfile                          | 4 ++++
 spec/support/localhost_server.rb | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Gemfile b/Gemfile
index dd662d7..dc8bdaa 100644
--- a/Gemfile
+++ b/Gemfile
@@ -14,6 +14,10 @@ group :development, :test do
 
   gem "sinatra", "~> 1.3"
 
+  if Gem.ruby_version >= Gem::Version.new("3.0.0")
+    gem "webrick"
+  end
+
   if Gem.ruby_version >= Gem::Version.new("1.9.0")
     gem "faraday", ">= 0.9"
     gem "dalli", "~> 2.0"
diff --git a/spec/support/localhost_server.rb b/spec/support/localhost_server.rb
index c5a7508..da09600 100644
--- a/spec/support/localhost_server.rb
+++ b/spec/support/localhost_server.rb
@@ -43,7 +43,7 @@ class LocalhostServer
     # Use WEBrick since it's part of the ruby standard library and is available on all ruby interpreters.
     options = { :Port => port }
     options.merge!(:AccessLog => [], :Logger => WEBrick::BasicLog.new(StringIO.new)) unless ENV['VERBOSE_SERVER']
-    Rack::Handler::WEBrick.run(Identify.new(@rack_app), options)
+    Rack::Handler::WEBrick.run(Identify.new(@rack_app), **options)
   end
 
   def booted?
