mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	HTTP::Handler is not a class anymore
This commit is contained in:
		
							parent
							
								
									ac8ec0a07b
								
							
						
					
					
						commit
						81a702264d
					
				
					 6 changed files with 13 additions and 6 deletions
				
			
		|  | @ -1,6 +1,8 @@ | |||
| module Kemal | ||||
|   # All loggers must inherit from `Kemal::BaseLogHandler`. | ||||
|   abstract class Kemal::BaseLogHandler < HTTP::Handler | ||||
|   abstract class Kemal::BaseLogHandler | ||||
|     include HTTP::Handler | ||||
| 
 | ||||
|     abstract def call(context) | ||||
|     abstract def write(message) | ||||
|   end | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| module Kemal | ||||
|   # Kemal::CommonExceptionHandler handles all the exceptions including 404, custom errors and 500. | ||||
|   class CommonExceptionHandler < HTTP::Handler | ||||
|   class CommonExceptionHandler | ||||
|     include HTTP::Handler | ||||
|     INSTANCE = new | ||||
| 
 | ||||
|     def call(context) | ||||
|  |  | |||
|  | @ -1,7 +1,8 @@ | |||
| module Kemal | ||||
|   # Kemal::FilterHandler handle all code that should be evaluated before and after | ||||
|   # every request | ||||
|   class FilterHandler < HTTP::Handler | ||||
|   class FilterHandler | ||||
|     include HTTP::Handler | ||||
|     INSTANCE = new | ||||
| 
 | ||||
|     # This middleware is lazily instantiated and added to the handlers as soon as a call to `after_X` or `before_X` is made. | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| class Kemal::Handler < HTTP::Handler | ||||
| class Kemal::Handler | ||||
|   include HTTP::Handler | ||||
|   @@only_routes_tree = Radix::Tree(String).new | ||||
|   @@exclude_routes_tree = Radix::Tree(String).new | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,8 @@ | |||
| module Kemal | ||||
|   # Kemal::InitHandler is the first handler thus initializes the context with default values such as | ||||
|   # Content-Type, X-Powered-By. | ||||
|   class InitHandler < HTTP::Handler | ||||
|   class InitHandler | ||||
|     include HTTP::Handler | ||||
|     INSTANCE = new | ||||
| 
 | ||||
|     def call(context) | ||||
|  |  | |||
|  | @ -3,7 +3,8 @@ require "radix" | |||
| module Kemal | ||||
|   # Kemal::RouteHandler is the main handler which handles all the HTTP requests. Routing, parsing, rendering e.g | ||||
|   # are done in this handler. | ||||
|   class RouteHandler < HTTP::Handler | ||||
|   class RouteHandler | ||||
|     include HTTP::Handler | ||||
|     INSTANCE = new | ||||
| 
 | ||||
|     property tree | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue