This speeds up searching during startup and prevents accidentally misloading different, potentially incompatible versions of yahns code. --- lib/yahns/daemon.rb | 4 ++-- lib/yahns/http_context.rb | 4 ++-- lib/yahns/rackup_handler.rb | 4 ++-- 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 <normalper...@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 <normalper...@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 -- EW