Format with 0.24.1 formatter

This commit is contained in:
Serdar Dogruyol 2018-01-26 18:32:24 +03:00
parent 4034dab952
commit 159e963404
3 changed files with 7 additions and 7 deletions

View file

@ -46,7 +46,7 @@ describe "Context" do
{ {
before_get: env.get("before_get"), before_get: env.get("before_get"),
before_get_int: env.get("before_get_int"), before_get_int: env.get("before_get_int"),
before_get_float: env.get("before_get_float") before_get_float: env.get("before_get_float"),
} }
end end
@ -91,7 +91,7 @@ describe "Context" do
end end
it "fetches non-existent keys from store with get?" do it "fetches non-existent keys from store with get?" do
get "/" {} get "/" { }
request = HTTP::Request.new("GET", "/") request = HTTP::Request.new("GET", "/")
io = IO::Memory.new io = IO::Memory.new

View file

@ -20,7 +20,7 @@ module Kemal
# a corresponding `HEAD` route. # a corresponding `HEAD` route.
def add_route(method : String, path : String, &handler : HTTP::Server::Context -> _) def add_route(method : String, path : String, &handler : HTTP::Server::Context -> _)
add_to_radix_tree method, path, Route.new(method, path, &handler) add_to_radix_tree method, path, Route.new(method, path, &handler)
add_to_radix_tree("HEAD", path, Route.new("HEAD", path) {}) if method == "GET" add_to_radix_tree("HEAD", path, Route.new("HEAD", path) { }) if method == "GET"
end end
# Check if a route is defined and returns the lookup # Check if a route is defined and returns the lookup