yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
* [PATCH 1/2] queue: remove TODO comment for kqueue
@ 2014-10-13 18:34 Eric Wong
  2014-10-13 18:34 ` [PATCH 2/2] switch to require_relative for internal requires Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2014-10-13 18:34 UTC (permalink / raw)
  To: yahns-public

We have kqueue support since yahns 1.2.0 (March 2014).
---
 lib/yahns/queue.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/yahns/queue.rb b/lib/yahns/queue.rb
index add4f78..2abdc27 100644
--- a/lib/yahns/queue.rb
+++ b/lib/yahns/queue.rb
@@ -1,7 +1,7 @@
-# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
+# Copyright (C) 2013-2014, all contributors
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 if SleepyPenguin.const_defined?(:Epoll)
   require_relative 'queue_epoll'
 else
-  require_relative 'queue_kqueue' # TODO
+  require_relative 'queue_kqueue'
 end
-- 
EW


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] switch to require_relative for internal requires
  2014-10-13 18:34 [PATCH 1/2] queue: remove TODO comment for kqueue Eric Wong
@ 2014-10-13 18:34 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2014-10-13 18:34 UTC (permalink / raw)
  To: yahns-public

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 <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
-- 
EW


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-13 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 18:34 [PATCH 1/2] queue: remove TODO comment for kqueue Eric Wong
2014-10-13 18:34 ` [PATCH 2/2] switch to require_relative for internal requires Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).