Improve config semantics
This commit is contained in:
parent
e077d17943
commit
35239dfaa0
1 changed files with 4 additions and 4 deletions
|
@ -48,12 +48,12 @@ module Kemal
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
setup_logging
|
setup_log_handler
|
||||||
setup_error_handler
|
setup_error_handler
|
||||||
setup_public_folder
|
setup_static_file_handler
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_logging
|
def setup_log_handler
|
||||||
@logger ||= if @logging
|
@logger ||= if @logging
|
||||||
Kemal::CommonLogHandler.new(@env)
|
Kemal::CommonLogHandler.new(@env)
|
||||||
else
|
else
|
||||||
|
@ -69,7 +69,7 @@ module Kemal
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private def setup_public_folder
|
private def setup_static_file_handler
|
||||||
HANDLERS.insert(2, Kemal::StaticFileHandler.new(@public_folder)) if @serve_static
|
HANDLERS.insert(2, Kemal::StaticFileHandler.new(@public_folder)) if @serve_static
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue