forever 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -15,8 +15,8 @@ In my servers I've several daemons and what I need is:
15
15
  As like [sinatra](https://github.com/sinatra/sinatra) and [padrino](https://github.com/padrino/padrino-framework) I need a
16
16
  **thin** framework to do these jobs in few seconds. This mean that:
17
17
 
18
- 1) I can create a new job quickly
19
- 2) I can watch, start, stop it quickly
18
+ * I can create a new job quickly
19
+ * I can watch, start, stop it quickly
20
20
 
21
21
  So, if you have my needs, **Forever** can be the right choice for you.
22
22
 
@@ -80,14 +80,14 @@ $ bin/foo
80
80
 
81
81
  you should see an output like:
82
82
 
83
- ```
83
+ ``` sh
84
84
  $ bin/foo
85
85
  => Process demonized with pid 19538
86
86
  ```
87
87
 
88
88
  you can stop it:
89
89
 
90
- ```
90
+ ``` sh
91
91
  $ bin/foo stop
92
92
  => Found pid 19538...
93
93
  => Killing process 19538...
@@ -97,7 +97,7 @@ $ bin/foo stop
97
97
 
98
98
  List daemons:
99
99
 
100
- ```
100
+ ``` sh
101
101
  $ forever list
102
102
  PID RSS CPU CMD
103
103
  19838 32512 1.6 Forever: bin/githubwatcher
@@ -105,7 +105,7 @@ PID RSS CPU CMD
105
105
 
106
106
  Stop daemon(s):
107
107
 
108
- ```
108
+ ``` sh
109
109
  $ forever stop foo
110
110
  Do you want really stop Forever: bin/foo with pid 19538? y
111
111
  Killing process Forever: bin/foo with pid 19538...
@@ -21,9 +21,9 @@ module Forever
21
21
 
22
22
  %w(INT TERM KILL).each { |signal| trap(signal) { stop! } }
23
23
 
24
- File.open(pid, "w") { |f| f.write(Process.pid.to_s) }
24
+ File.open(pid, "w") { |f| f.write(Process.pid.to_s) } if exists?(pid)
25
25
 
26
- stream = exists?(log) ? File.new(log, "w") : '/dev/null'
26
+ stream = log ? File.new(log, "w") : File.open('/dev/null', 'w')
27
27
  stream.sync = true
28
28
 
29
29
  STDOUT.reopen(stream)
@@ -1,3 +1,3 @@
1
1
  module Forever
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 8
9
- version: 0.0.8
8
+ - 9
9
+ version: 0.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - DAddYE
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-06 00:00:00 +02:00
17
+ date: 2011-07-08 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency