Use Ameba on Travis CI (#520)

This commit is contained in:
Sijawusz Pur Rahnama 2019-06-13 13:31:45 +02:00 committed by Serdar Dogruyol
parent c646aad482
commit 06665e81bc
5 changed files with 9 additions and 3 deletions

View file

@ -14,7 +14,7 @@ module Kemal
log("Exception: #{ex.inspect_with_backtrace}")
return call_exception_with_status_code(context, ex, 500) if Kemal.config.error_handlers.has_key?(500)
verbosity = Kemal.config.env == "production" ? false : true
return render_500(context, ex, verbosity)
render_500(context, ex, verbosity)
end
private def call_exception_with_status_code(context : HTTP::Server::Context, exception : Exception, status_code : Int32)

View file

@ -1,7 +1,7 @@
class HTTP::Server::Response
class Output
def close
unless response.wrote_headers? && !response.headers.has_key?("Content-Range")
if !response.wrote_headers? && response.headers.has_key?("Content-Range")
response.content_length = @out_count
end

View file

@ -52,7 +52,7 @@ module Kemal
context.response.content_type = "text/html"
directory_listing(context.response, request_path, file_path)
else
return call_next(context)
call_next(context)
end
elsif File.exists?(file_path)
last_modified = modification_time(file_path)