daemonizer 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.4
data/daemonizer.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{daemonizer}
8
- s.version = "0.4.3"
8
+ s.version = "0.4.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gleb Pomykalov"]
12
- s.date = %q{2010-07-17}
12
+ s.date = %q{2010-07-18}
13
13
  s.default_executable = %q{daemonizer}
14
14
  s.description = %q{Inspired by bundler and rack. Mostly built on top of Alexey Kovyrin's loops code. http://github.com/kovyrin/loops}
15
15
  s.email = %q{glebpom@gmail.com}
@@ -87,9 +87,8 @@ module Daemonizer
87
87
  desc "debug", "Debug pool (do not demonize)"
88
88
  def debug(pool_name = nil)
89
89
  puts "You should supply pool_name to debug" if pool_name.nil?
90
- control_pools_loop(pool_name, "execution ended", true) do |pool|
90
+ control_pools_loop(pool_name, "execution ended", true) do |pool|
91
91
  STDOUT.sync = true
92
- print_pool pool.name, "Debugging pool: "
93
92
 
94
93
  engine = Engine.new(pool)
95
94
  engine.debug!
@@ -70,7 +70,7 @@ module Daemonizer
70
70
  validate_file(self.pid_file)
71
71
  end
72
72
 
73
- [:workers, :poll_period, :root, :cow_friendly, :callbacks].each do |method|
73
+ [:workers, :poll_period, :root, :cow_friendly, :callbacks, :handler_options].each do |method|
74
74
  define_method method do
75
75
  @options[method.to_sym]
76
76
  end
@@ -72,7 +72,7 @@ class Daemonizer::Dsl
72
72
  end
73
73
 
74
74
  def settings_group(&blk)
75
- options = @options.dup
75
+ options = config_copy
76
76
  yield
77
77
  ensure
78
78
  @options = options
@@ -80,7 +80,7 @@ class Daemonizer::Dsl
80
80
 
81
81
  def pool(name, &blk)
82
82
  @pool = name.to_sym
83
- options = @options.dup
83
+ options = config_copy
84
84
  yield
85
85
  @configs[@pool] = Daemonizer::Config.new(@pool, @options)
86
86
  rescue Daemonizer::Config::ConfigError => e
@@ -89,4 +89,11 @@ class Daemonizer::Dsl
89
89
  @options = options
90
90
  @pool = nil
91
91
  end
92
+
93
+ def config_copy
94
+ options = @options.dup
95
+ options[:handler_options] = @options[:handler_options].dup
96
+ options[:callbacks] = @options[:callbacks].dup
97
+ options
98
+ end
92
99
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemonizer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
9
+ - 4
10
+ version: 0.4.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gleb Pomykalov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-17 00:00:00 +04:00
18
+ date: 2010-07-18 00:00:00 +04:00
19
19
  default_executable: daemonizer
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency