trinidad_daemon_extension 0.2.4 → 0.2.5
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/README
CHANGED
@@ -25,9 +25,9 @@ It uses a temporal directory to write the pid file but its route can be override
|
|
25
25
|
|
26
26
|
* To enable it from the command line you have to load the extension first and then add one of these options:
|
27
27
|
|
28
|
-
|
28
|
+
--daemonize [PID_FILE]
|
29
29
|
|
30
|
-
for instance:
|
30
|
+
for instance:
|
31
31
|
|
32
32
|
$ jruby -S trinidad --load daemon --daemonize ./trinidad.pid
|
33
33
|
|
@@ -39,7 +39,7 @@ By default it writes the logs into the file log/trinidad.log with the level INFO
|
|
39
39
|
daemon:
|
40
40
|
log:
|
41
41
|
file: trinidad.log # where the daemon writes its output
|
42
|
-
level: ALL # severity level, it cn be one of these: ALL, CONFIG, FINE, FINER, FINEST, INFO, OFF, SEVERE, WARNING
|
42
|
+
level: ALL # severity level, it cn be one of these: ALL, CONFIG, FINE, FINER, FINEST, INFO, OFF, SEVERE, WARNING
|
43
43
|
|
44
44
|
This log is enabled by default but if we don't need it or we are using another logger system we can also disable it:
|
45
45
|
|
@@ -9,7 +9,7 @@ require File.expand_path('../../trinidad-libs/trinidad-daemon-extension', __FILE
|
|
9
9
|
module Trinidad
|
10
10
|
module Extensions
|
11
11
|
module Daemon
|
12
|
-
VERSION = '0.2.
|
12
|
+
VERSION = '0.2.5'
|
13
13
|
end
|
14
14
|
|
15
15
|
class DaemonServerExtension < ServerExtension
|
@@ -42,7 +42,7 @@ module Trinidad
|
|
42
42
|
|
43
43
|
class DaemonOptionsExtension < OptionsExtension
|
44
44
|
def configure(parser, default_options)
|
45
|
-
parser.on('
|
45
|
+
parser.on('--daemonize', '--daemonize [PID_FILE]', 'run Trinidad as a daemon, pid_file by default is ENV[$TMPDIR]/trinidad.pid') do |pid|
|
46
46
|
extensions = default_options[:extensions] || {}
|
47
47
|
extensions[:daemon] = {:pid_file => pid}
|
48
48
|
default_options[:extensions] = extensions
|
@@ -71,7 +71,7 @@ describe Trinidad::Extensions::DaemonOptionsExtension do
|
|
71
71
|
options = {}
|
72
72
|
|
73
73
|
subject.configure(parser, options)
|
74
|
-
parser.parse! '
|
74
|
+
parser.parse! '--daemonize /tmp/trinidad.pid'.split
|
75
75
|
|
76
76
|
options[:extensions].keys.should include(:daemon)
|
77
77
|
options[:extensions][:daemon].should include(:pid_file)
|
Binary file
|
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'trinidad_daemon_extension'
|
16
|
-
s.version = '0.2.
|
17
|
-
s.date = '
|
16
|
+
s.version = '0.2.5'
|
17
|
+
s.date = '2011-01-12'
|
18
18
|
s.rubyforge_project = 'trinidad_daemon_extension'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 5
|
9
|
+
version: 0.2.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- David Calavera
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-12 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|