mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Rename MemoryIO to IO::Memory since it's deprecated on Crystal 0.20.0
This commit is contained in:
parent
733582f724
commit
6b034c3b2f
8 changed files with 18 additions and 18 deletions
|
@ -13,7 +13,7 @@ class CustomLogHandler < Kemal::BaseLogHandler
|
|||
end
|
||||
|
||||
def create_request_and_return_io(handler, request)
|
||||
io = MemoryIO.new
|
||||
io = IO::Memory.new
|
||||
response = HTTP::Server::Response.new(io)
|
||||
context = HTTP::Server::Context.new(request, response)
|
||||
handler.call(context)
|
||||
|
@ -23,20 +23,20 @@ def create_request_and_return_io(handler, request)
|
|||
end
|
||||
|
||||
def create_ws_request_and_return_io(handler, request)
|
||||
io = MemoryIO.new
|
||||
io = IO::Memory.new
|
||||
response = HTTP::Server::Response.new(io)
|
||||
context = HTTP::Server::Context.new(request, response)
|
||||
begin
|
||||
handler.call context
|
||||
rescue IO::Error
|
||||
# Raises because the MemoryIO is empty
|
||||
# Raises because the IO::Memory is empty
|
||||
end
|
||||
response.close
|
||||
io
|
||||
end
|
||||
|
||||
def call_request_on_app(request)
|
||||
io = MemoryIO.new
|
||||
io = IO::Memory.new
|
||||
response = HTTP::Server::Response.new(io)
|
||||
context = HTTP::Server::Context.new(request, response)
|
||||
main_handler = build_main_handler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue