From 5a58ee3cbb482a2edce070e241f2cc709efa0c4d Mon Sep 17 00:00:00 2001 From: sdogruyol Date: Wed, 17 Feb 2016 11:52:13 +0200 Subject: [PATCH] Format code --- spec/middleware/filters_spec.cr | 1 - src/kemal/context.cr | 1 - src/kemal/middleware/filters.cr | 2 +- src/kemal/request.cr | 1 - src/kemal/route.cr | 2 -- 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/spec/middleware/filters_spec.cr b/spec/middleware/filters_spec.cr index 54dbc4e..3dc2e9e 100644 --- a/spec/middleware/filters_spec.cr +++ b/spec/middleware/filters_spec.cr @@ -143,7 +143,6 @@ describe "Kemal::Middleware::Filters" do client_response = HTTP::Client::Response.from_io(io_with_context, decompress: false) client_response.body.should eq("false") end - end class FilterTest diff --git a/src/kemal/context.cr b/src/kemal/context.cr index b0046e2..44de33d 100644 --- a/src/kemal/context.cr +++ b/src/kemal/context.cr @@ -18,6 +18,5 @@ class HTTP::Server def route_defined? route_lookup.found? end - end end diff --git a/src/kemal/middleware/filters.cr b/src/kemal/middleware/filters.cr index 336f19e..941af18 100644 --- a/src/kemal/middleware/filters.cr +++ b/src/kemal/middleware/filters.cr @@ -85,7 +85,7 @@ end # - after_all, after_get, after_post, after_put, after_patch, after_delete ALL_METHODS = %w(get post put patch delete all) -{% for type in ["before", "after"]%} +{% for type in ["before", "after"] %} {% for method in ALL_METHODS %} def {{type.id}}_{{method.id}}(path = "*", &block : HTTP::Server::Context -> _) Kemal::Middleware::Filter::INSTANCE.{{type.id}}({{method}}.upcase, path, &block) diff --git a/src/kemal/request.cr b/src/kemal/request.cr index 930da45..44cd118 100644 --- a/src/kemal/request.cr +++ b/src/kemal/request.cr @@ -25,5 +25,4 @@ class HTTP::Request override_method = override_method.upcase override_method == "PUT" || override_method == "PATCH" || override_method == "DELETE" end - end diff --git a/src/kemal/route.cr b/src/kemal/route.cr index c6a46b4..de65c3b 100644 --- a/src/kemal/route.cr +++ b/src/kemal/route.cr @@ -7,6 +7,4 @@ class Kemal::Route def initialize(@method, @path, &@handler : HTTP::Server::Context -> _) end - - end