From 9628043e4cf6c0da8720b12d7613afd473f753b1 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Tue, 23 Jan 2024 17:08:49 +0100 Subject: [PATCH] Bump `exception_page` dependency (#669) --- shard.yml | 2 +- spec/websocket_handler_spec.cr | 2 +- src/kemal/config.cr | 4 ++-- src/kemal/ext/context.cr | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shard.yml b/shard.yml index 2ca838e..594ff04 100644 --- a/shard.yml +++ b/shard.yml @@ -10,7 +10,7 @@ dependencies: version: ~> 0.4.0 exception_page: github: crystal-loot/exception_page - version: ~> 0.3.0 + version: ~> 0.4.1 development_dependencies: ameba: diff --git a/spec/websocket_handler_spec.cr b/spec/websocket_handler_spec.cr index 64f5489..123a9f9 100644 --- a/spec/websocket_handler_spec.cr +++ b/spec/websocket_handler_spec.cr @@ -38,7 +38,7 @@ describe "Kemal::WebSocketHandler" do it "fetches named url parameters" do handler = Kemal::WebSocketHandler::INSTANCE - ws "/:id" { |_, c| c.ws_route_lookup.params["id"] } + ws "/:id" { |_, context| context.ws_route_lookup.params["id"] } headers = HTTP::Headers{ "Upgrade" => "websocket", "Connection" => "Upgrade", diff --git a/src/kemal/config.cr b/src/kemal/config.cr index 02065b4..df7330a 100644 --- a/src/kemal/config.cr +++ b/src/kemal/config.cr @@ -159,8 +159,8 @@ module Kemal end private def setup_filter_handlers - FILTER_HANDLERS.each do |h| - HANDLERS.insert(@handler_position, h) + FILTER_HANDLERS.each do |handler| + HANDLERS.insert(@handler_position, handler) end end end diff --git a/src/kemal/ext/context.cr b/src/kemal/ext/context.cr index d677d08..545111f 100644 --- a/src/kemal/ext/context.cr +++ b/src/kemal/ext/context.cr @@ -9,7 +9,7 @@ class HTTP::Server STORE_MAPPINGS = [Nil, String, Int32, Int64, Float64, Bool] macro finished - alias StoreTypes = Union({{ *STORE_MAPPINGS }}) + alias StoreTypes = Union({{ STORE_MAPPINGS.splat }}) @store = {} of String => StoreTypes end