about summary refs log tree commit homepage
path: root/lib/yahns/config.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-29 00:02:56 +0000
committerEric Wong <e@80x24.org>2013-10-29 02:37:05 +0000
commitfd5844b2baef6c1acaca9ca1eca0509e3a4f840d (patch)
tree2e9d746f699da0458903b4b54227a3574f774cb1 /lib/yahns/config.rb
parent556f8ae6f629df51ff41c1918de40e2bb531159e (diff)
downloadyahns-fd5844b2baef6c1acaca9ca1eca0509e3a4f840d.tar.gz
This was documented (incorrectly) and not implemented for either
the master/worker or single process cases.  Implement and test
all (with mocks, so not fully-tested).
Diffstat (limited to 'lib/yahns/config.rb')
-rw-r--r--lib/yahns/config.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb
index 6d8945a..ebc3bda 100644
--- a/lib/yahns/config.rb
+++ b/lib/yahns/config.rb
@@ -158,7 +158,7 @@ class Yahns::Config # :nodoc:
   # if the Worker#user method is not called in the after_fork hooks
   # +group+ is optional and will not change if unspecified.
   def user(user, group = nil)
-    var = :user
+    var = _check_in_block(nil, :user)
     @block and raise "#{var} is not valid inside #{@block.type}"
     # raises ArgumentError on invalid user/group
     Etc.getpwnam(user)
@@ -385,7 +385,7 @@ class Yahns::Config # :nodoc:
       io.sync = true
     end
 
-    [ :logger, :pid, :worker_processes,
+    [ :logger, :pid, :worker_processes, :user,
       :worker_atfork_prepare, :worker_atfork_parent, :worker_atfork_child
     ].each do |var|
       val = @set[var]