Update instance types

This commit is contained in:
sdogruyol 2016-04-13 11:00:02 +03:00
parent 40ab34c63d
commit 2b9152ff79
4 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@ require "colorize"
require "http" require "http"
class Kemal::CommonLogHandler < Kemal::BaseLogHandler class Kemal::CommonLogHandler < Kemal::BaseLogHandler
@handler : IO::FileDescriptor+ @handler : IO::FileDescriptor
getter handler getter handler
def initialize(@env) def initialize(@env)

View file

@ -2,7 +2,7 @@ module Kemal
class Config class Config
INSTANCE = Config.new INSTANCE = Config.new
HANDLERS = [] of HTTP::Handler HANDLERS = [] of HTTP::Handler
@ssl : OpenSSL::SSL::Context @ssl : OpenSSL::SSL::Context?
property host_binding, ssl, port, env, public_folder, logging, property host_binding, ssl, port, env, public_folder, logging,
always_rescue, serve_static, run always_rescue, serve_static, run
@ -18,7 +18,7 @@ module Kemal
@error_handler = nil @error_handler = nil
@always_rescue = true @always_rescue = true
@run = false @run = false
@ssl = uninitialized OpenSSL::SSL::Context @ssl = nil
end end
def logger def logger

View file

@ -9,7 +9,7 @@ class Kemal::ParamParser
URL_ENCODED_FORM = "application/x-www-form-urlencoded" URL_ENCODED_FORM = "application/x-www-form-urlencoded"
APPLICATION_JSON = "application/json" APPLICATION_JSON = "application/json"
def initialize(@request : HTTP::Request, @url_params : String? = nil , @override_method : String? = nil) def initialize(@request : HTTP::Request)
@url = {} of String => String @url = {} of String => String
@query = {} of String => String @query = {} of String => String
@body = {} of String => String @body = {} of String => String

View file

@ -7,6 +7,6 @@ class Kemal::Route
@method : String @method : String
def initialize(@method, @path : String, &handler : HTTP::Server::Context -> _) def initialize(@method, @path : String, &handler : HTTP::Server::Context -> _)
@handler = ->(context : HTTP::Server::Context){ handler.call(context).to_s } @handler = ->(context : HTTP::Server::Context) { handler.call(context).to_s }
end end
end end