diff options
author | Eric Wong <e@80x24.org> | 2014-10-13 09:35:44 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-10-13 09:35:44 +0000 |
commit | 09ec04ecf9354749108e68eb1f11e54591f20174 (patch) | |
tree | 5a926ccb120083e92fad57e7876ff42a3e3603d7 /lib | |
parent | 6ab176f1c5313fb5244036f68de4dd04ea663b0e (diff) | |
download | yahns-09ec04ecf9354749108e68eb1f11e54591f20174.tar.gz |
This speeds up searching during startup and prevents accidentally misloading different, potentially incompatible versions of yahns code.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/yahns/daemon.rb | 4 | ||||
-rw-r--r-- | lib/yahns/http_context.rb | 4 | ||||
-rw-r--r-- | lib/yahns/rackup_handler.rb | 4 | ||||
-rw-r--r-- | lib/yahns/server.rb | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/yahns/daemon.rb b/lib/yahns/daemon.rb index fd93fd7..a3ffd8b 100644 --- a/lib/yahns/daemon.rb +++ b/lib/yahns/daemon.rb @@ -1,7 +1,7 @@ # -*- encoding: binary -*- -# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors +# Copyright (C) 2013-2014, all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) -require 'yahns' +require_relative '../yahns' module Yahns::Daemon # :nodoc: # We don't do a lot of standard daemonization stuff: diff --git a/lib/yahns/http_context.rb b/lib/yahns/http_context.rb index bd455bd..349e129 100644 --- a/lib/yahns/http_context.rb +++ b/lib/yahns/http_context.rb @@ -49,11 +49,11 @@ module Yahns::HttpContext # :nodoc: # input_buffering == false is handled in http_client return app if @client_max_body_size == nil - require 'yahns/cap_input' + require_relative 'cap_input' return app if @input_buffering == true # @input_buffering == false/:lazy - require 'yahns/max_body' + require_relative 'max_body' Yahns::MaxBody.new(app, @client_max_body_size) end diff --git a/lib/yahns/rackup_handler.rb b/lib/yahns/rackup_handler.rb index 356caaf..943d858 100644 --- a/lib/yahns/rackup_handler.rb +++ b/lib/yahns/rackup_handler.rb @@ -1,6 +1,6 @@ -# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors +# Copyright (C) 2013-2014, all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) -require 'yahns' +require_relative '../yahns' module Yahns::RackupHandler # :nodoc: def self.default_host diff --git a/lib/yahns/server.rb b/lib/yahns/server.rb index 3f1f6ab..ae2ebd4 100644 --- a/lib/yahns/server.rb +++ b/lib/yahns/server.rb @@ -57,7 +57,7 @@ class Yahns::Server # :nodoc: bind_new_listeners! self.pid = @config.value(:pid) # write pid file if @worker_processes - require 'yahns/server_mp' + require_relative 'server_mp' extend Yahns::ServerMP else switch_user(*@user) if @user |