From 4e712091a6d187e9c1a18afb903d57276d1bdd9e Mon Sep 17 00:00:00 2001 From: Jordan Owens Date: Wed, 18 Mar 2020 14:19:34 -0400 Subject: [PATCH] Update .run method options param Rack has opted to use the double splat operator for options. See: https://github.com/rack/rack/commit/871c82f0ffa269d7e2e237d3ade9a1eac26418fe --- History.md | 1 + lib/rack/handler/puma.rb | 2 +- test/test_rack_handler.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 2fab78af..d019526e 100644 --- a/History.md +++ b/History.md @@ -30,6 +30,7 @@ * Simplify `Configuration.random_token` and remove insecure fallback (#2102) * Simplify `Runner#start_control` URL parsing (#2111) * Removed the IOBuffer extension and replaced with Ruby (#1980) + * Update `Rack::Handler::Puma.run` to use `**options` (#2189) ## 4.3.3 and 3.12.4 / 2020-02-28 diff --git a/lib/rack/handler/puma.rb b/lib/rack/handler/puma.rb index ba258955..6ce68e54 100644 --- a/lib/rack/handler/puma.rb +++ b/lib/rack/handler/puma.rb @@ -59,7 +59,7 @@ module Rack conf end - def self.run(app, options = {}) + def self.run(app, **options) conf = self.config(app, options) events = options.delete(:Silent) ? ::Puma::Events.strings : ::Puma::Events.stdio diff --git a/test/test_rack_handler.rb b/test/test_rack_handler.rb index eeeb80c0..bcfc3542 100644 --- a/test/test_rack_handler.rb +++ b/test/test_rack_handler.rb @@ -26,7 +26,7 @@ class TestPathHandler < Minitest::Test @launcher = nil thread = Thread.new do - Rack::Handler::Puma.run(app, options) do |s, p| + Rack::Handler::Puma.run(app, **options) do |s, p| @launcher = s end end