Remove unused stuff

This commit is contained in:
Serdar Dogruyol 2018-03-17 17:58:19 +03:00
parent 536108c71b
commit 6fbad555d0
8 changed files with 6 additions and 4 deletions

View file

@ -60,9 +60,11 @@ module Kemal
end
config.server ||= HTTP::Server.new(config.host_binding, config.port, config.handlers)
{% if !flag?(:without_openssl) %}
config.server.not_nil!.tls = config.ssl
{% end %}
config.running = true
yield config

View file

@ -18,7 +18,6 @@ module Kemal
@ssl : OpenSSL::SSL::Context::Server?
{% end %}
getter custom_handler_position
property host_binding, ssl, port, env, public_folder, logging, running
property always_rescue, server : HTTP::Server?, extra_options, shutdown_message
property serve_static : (Bool | Hash(String, Bool))

View file

@ -13,7 +13,6 @@ class HTTP::Request
# Checks if method contained in _method param is valid one
def self.override_method_valid?(override_method : String)
return false unless override_method.is_a?(String)
override_method = override_method.upcase
override_method == "PUT" || override_method == "PATCH" || override_method == "DELETE"
end

View file

@ -5,6 +5,7 @@ module Kemal
# These methods are useful for the conditional execution of custom handlers .
class Handler
include HTTP::Handler
@@only_routes_tree = Radix::Tree(String).new
@@exclude_routes_tree = Radix::Tree(String).new

View file

@ -3,6 +3,7 @@ module Kemal
# *Content-Type* or *X-Powered-By* headers.
class InitHandler
include HTTP::Handler
INSTANCE = new
def call(context : HTTP::Server::Context)

View file

@ -1,8 +1,6 @@
module Kemal
# Uses `STDOUT` by default and handles the logging of request/response process time.
class LogHandler < Kemal::BaseLogHandler
@io : IO
def initialize(@io : IO = STDOUT)
end

View file

@ -3,6 +3,7 @@ require "radix"
module Kemal
class RouteHandler
include HTTP::Handler
INSTANCE = new
property routes

View file

@ -1,6 +1,7 @@
module Kemal
class WebSocketHandler
include HTTP::Handler
INSTANCE = new
property routes