mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Move puma.rb to just autoloads. Fixes #1063
This commit is contained in:
parent
3ebdfcefe2
commit
5fdf337790
10 changed files with 35 additions and 18 deletions
|
@ -9,7 +9,8 @@ require 'stringio'
|
|||
|
||||
require 'thread'
|
||||
|
||||
# Ruby Puma
|
||||
require 'puma/const'
|
||||
require 'puma/server'
|
||||
require 'puma/launcher'
|
||||
module Puma
|
||||
autoload :Const, 'puma/const'
|
||||
autoload :Server, 'puma/server'
|
||||
autoload :Launcher, 'puma/launcher'
|
||||
end
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
require 'puma/const'
|
||||
require 'uri'
|
||||
require 'socket'
|
||||
|
||||
require 'puma/const'
|
||||
require 'puma/util'
|
||||
|
||||
module Puma
|
||||
class Binder
|
||||
|
@ -140,11 +143,11 @@ module Puma
|
|||
|
||||
@listeners << [str, io]
|
||||
when "ssl"
|
||||
MiniSSL.check
|
||||
|
||||
params = Util.parse_query uri.query
|
||||
require 'puma/minissl'
|
||||
|
||||
MiniSSL.check
|
||||
|
||||
ctx = MiniSSL::Context.new
|
||||
|
||||
if defined?(JRUBY_VERSION)
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
require 'optparse'
|
||||
require 'uri'
|
||||
|
||||
require 'puma/configuration'
|
||||
require 'puma/launcher'
|
||||
require 'puma/const'
|
||||
require 'puma/events'
|
||||
|
||||
module Puma
|
||||
class << self
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
require 'puma/runner'
|
||||
require 'puma/util'
|
||||
require 'puma/plugin'
|
||||
|
||||
require 'time'
|
||||
|
||||
module Puma
|
||||
|
|
|
@ -71,7 +71,6 @@ module Puma
|
|||
|
||||
GET = 'GET'.freeze
|
||||
HEAD = 'HEAD'.freeze
|
||||
|
||||
|
||||
def log(env, status, header, began_at)
|
||||
now = Time.now
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'puma/rack/builder'
|
||||
require 'puma/plugin'
|
||||
require 'puma/const'
|
||||
|
||||
module Puma
|
||||
|
||||
|
@ -251,6 +252,7 @@ module Puma
|
|||
end
|
||||
|
||||
if @options[:log_requests]
|
||||
require 'puma/commonlogger'
|
||||
logger = @options[:logger]
|
||||
found = CommonLogger.new(found, logger)
|
||||
end
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
require 'puma/server'
|
||||
require 'puma/const'
|
||||
require 'puma/configuration'
|
||||
require 'puma/binder'
|
||||
require 'puma/events'
|
||||
require 'puma/detect'
|
||||
require 'puma/daemon_ext'
|
||||
require 'puma/util'
|
||||
require 'puma/single'
|
||||
require 'puma/cluster'
|
||||
require 'puma/state_file'
|
||||
|
||||
require 'puma/commonlogger'
|
||||
require 'puma/cluster'
|
||||
require 'puma/single'
|
||||
|
||||
require 'puma/const'
|
||||
|
||||
require 'puma/binder'
|
||||
require 'puma/state_file'
|
||||
|
||||
module Puma
|
||||
# Puma::Launcher is the single entry point for starting a Puma server based on user
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
module Puma
|
||||
end
|
||||
|
||||
module Puma::Rack
|
||||
class Options
|
||||
def parse!(args)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
require 'puma/server'
|
||||
require 'puma/const'
|
||||
|
||||
module Puma
|
||||
class Runner
|
||||
def initialize(cli, events)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
require 'puma/runner'
|
||||
require 'puma/detect'
|
||||
require 'puma/plugin'
|
||||
|
||||
module Puma
|
||||
class Single < Runner
|
||||
|
|
Loading…
Reference in a new issue