puma.rb - autoload LogWriter for non-standard loading (#2966)

This commit is contained in:
MSP-Greg 2022-09-26 22:23:20 -05:00 committed by GitHub
parent 42cac91977
commit 1bdceb1dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -17,9 +17,12 @@ require_relative 'puma/detect'
require_relative 'puma/json_serialization'
module Puma
autoload :Const, "#{__dir__}/puma/const"
autoload :Server, "#{__dir__}/puma/server"
autoload :Launcher, "#{__dir__}/puma/launcher"
# when Puma is loaded via `Puma::CLI`, all files are loaded via
# `require_relative`. The below are for non-standard loading
autoload :Const, "#{__dir__}/puma/const"
autoload :Server, "#{__dir__}/puma/server"
autoload :Launcher, "#{__dir__}/puma/launcher"
autoload :LogWriter, "#{__dir__}/puma/log_writer"
# at present, MiniSSL::Engine is only defined in extension code (puma_http11),
# not in minissl.rb

View File

@ -24,9 +24,6 @@ module Puma
# Create a new CLI object using +argv+ as the command line
# arguments.
#
# +stdout+ and +stderr+ can be set to IO-like objects which
# this object will report status on.
#
def initialize(argv, log_writer = LogWriter.stdio, events = Events.new)
@debug = false
@argv = argv.dup