diff --git a/shard.yml b/shard.yml index 2571005..6b3ceba 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: kemal -version: 0.18.3 +version: 0.19.0 dependencies: radix: diff --git a/spec/context_spec.cr b/spec/context_spec.cr index 67f364f..ca03520 100644 --- a/spec/context_spec.cr +++ b/spec/context_spec.cr @@ -48,10 +48,10 @@ describe "Context" do get "/" do |env| env.set "key", "value" { - key: env.get("key"), - before_get: env.get("before_get"), - before_get_int: env.get("before_get_int"), - before_get_float: env.get("before_get_float"), + key: env.get("key"), + before_get: env.get("before_get"), + before_get_int: env.get("before_get_int"), + before_get_float: env.get("before_get_float"), before_get_context_test: env.get("before_get_context_test"), } end diff --git a/src/kemal/ext/context.cr b/src/kemal/ext/context.cr index cd3a756..02114fd 100644 --- a/src/kemal/ext/context.cr +++ b/src/kemal/ext/context.cr @@ -5,7 +5,7 @@ class HTTP::Server class Context # :nodoc: - STORE_MAPPINGS = [ Nil, String, Int32, Int64, Float64, Bool ] + STORE_MAPPINGS = [Nil, String, Int32, Int64, Float64, Bool] macro finished alias StoreTypes = Union({{ *STORE_MAPPINGS }}) diff --git a/src/kemal/route_handler.cr b/src/kemal/route_handler.cr index 56553fa..4ed2aa9 100644 --- a/src/kemal/route_handler.cr +++ b/src/kemal/route_handler.cr @@ -21,7 +21,7 @@ module Kemal # a corresponding `HEAD` route. def add_route(method, path, &handler : HTTP::Server::Context -> _) add_to_radix_tree method, path, Route.new(method, path, &handler) - add_to_radix_tree("HEAD", path, Route.new("HEAD", path) {|ctx| ""}) if method == "GET" + add_to_radix_tree("HEAD", path, Route.new("HEAD", path) { |ctx| "" }) if method == "GET" end # Check if a route is defined and returns the lookup