Format code

This commit is contained in:
sdogruyol 2016-02-17 11:52:13 +02:00
parent 4c9b9ad3d5
commit 5a58ee3cbb
5 changed files with 1 additions and 6 deletions

View file

@ -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

View file

@ -18,6 +18,5 @@ class HTTP::Server
def route_defined?
route_lookup.found?
end
end
end

View file

@ -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)

View file

@ -25,5 +25,4 @@ class HTTP::Request
override_method = override_method.upcase
override_method == "PUT" || override_method == "PATCH" || override_method == "DELETE"
end
end

View file

@ -7,6 +7,4 @@ class Kemal::Route
def initialize(@method, @path, &@handler : HTTP::Server::Context -> _)
end
end