foreverb 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -1
- data/lib/forever/base.rb +2 -2
- data/lib/forever/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -117,4 +117,8 @@ Do you want really stop Forever: bin/foo with pid 19538? y
|
|
117
117
|
Killing process Forever: bin/foo with pid 19538...
|
118
118
|
```
|
119
119
|
|
120
|
-
That's all!
|
120
|
+
That's all!
|
121
|
+
|
122
|
+
## Author
|
123
|
+
|
124
|
+
DAddYE, you can follow me on twitter [@daddye](http://twitter.com/daddye)
|
data/lib/forever/base.rb
CHANGED
@@ -30,7 +30,7 @@ module Forever
|
|
30
30
|
STDERR.reopen(STDOUT)
|
31
31
|
|
32
32
|
begin
|
33
|
-
on_ready.call
|
33
|
+
on_ready.call if on_ready
|
34
34
|
rescue Exception => e
|
35
35
|
Thread.list.reject { |t| t==Thread.current }.map(&:kill)
|
36
36
|
on_error[e] if on_error
|
@@ -105,7 +105,7 @@ module Forever
|
|
105
105
|
# Callback to fire when the daemon start
|
106
106
|
#
|
107
107
|
def on_ready(&block)
|
108
|
-
block_given? ? @
|
108
|
+
block_given? ? @_on_ready = block : @_on_ready
|
109
109
|
end
|
110
110
|
|
111
111
|
def to_s
|
data/lib/forever/version.rb
CHANGED