svutil 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/svutil.rb CHANGED
@@ -6,5 +6,5 @@ require 'svutil/log'
6
6
  require 'svutil/process_manager'
7
7
 
8
8
  module SVUtil
9
- VERSION = '0.9.6'
9
+ VERSION = '0.9.7'
10
10
  end
@@ -1,5 +1,7 @@
1
1
  module SVUtil
2
2
  class ProcessManager
3
+ attr_writer :after_fork
4
+
3
5
  def initialize(klass_or_instance, config)
4
6
  @server_instance = if klass_or_instance.instance_of?(Class)
5
7
  klass_or_instance.new
@@ -70,6 +72,7 @@ module SVUtil
70
72
 
71
73
  def daemonize
72
74
  fork and exit
75
+ @after_fork.call unless @after.fork.nil?
73
76
  redirect_io
74
77
  end
75
78
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: newgem
16
- requirement: &70142618238040 !ruby/object:Gem::Requirement
16
+ requirement: &70277694978900 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.5.3
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70142618238040
24
+ version_requirements: *70277694978900
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hoe
27
- requirement: &70142618237180 !ruby/object:Gem::Requirement
27
+ requirement: &70277694978220 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.12'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70142618237180
35
+ version_requirements: *70277694978220
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdoc
38
- requirement: &70142616883180 !ruby/object:Gem::Requirement
38
+ requirement: &70277690457860 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.10'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70142616883180
46
+ version_requirements: *70277690457860
47
47
  description: A simple managed process builder for Ruby projects
48
48
  email:
49
49
  - daniel@netfox.com