daemon-kit 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +10 -3
- data/{History.txt → CHANGELOG.md} +59 -24
- data/daemon-kit.gemspec +1 -1
- data/lib/daemon_kit/application.rb +1 -18
- data/lib/daemon_kit/config.rb +1 -0
- data/lib/daemon_kit/initializer.rb +2 -2
- data/lib/daemon_kit/version.rb +1 -1
- metadata +54 -22
- checksums.yaml +0 -7
data/.travis.yml
CHANGED
@@ -1,17 +1,24 @@
|
|
1
1
|
language: ruby
|
2
|
+
|
2
3
|
rvm:
|
3
|
-
- 2.
|
4
|
+
- 2.2
|
5
|
+
- 2.1
|
6
|
+
- 2.0
|
4
7
|
- 1.9.3
|
5
8
|
- 1.9.2
|
6
9
|
- rbx-19mode
|
7
10
|
- 1.8.7
|
8
|
-
|
11
|
+
|
9
12
|
matrix:
|
10
13
|
allow_failures:
|
14
|
+
- rvm: 2.2
|
11
15
|
- rvm: jruby-19mode
|
12
16
|
- rvm: rbx-19mode
|
13
17
|
- rvm: 1.8.7
|
14
|
-
|
18
|
+
|
15
19
|
before_install: umask 0022
|
20
|
+
|
16
21
|
gemfile:
|
17
22
|
- gemfiles/Gemfile.ci
|
23
|
+
|
24
|
+
sudo: false
|
@@ -1,8 +1,43 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
DaemonKit endures to use semantic versioning, at least since the 0.3.0 release.
|
4
|
+
Below is a curated list of important changes/fixes/improvements. You can use
|
5
|
+
GitHub's excellent compare view to get the nitty gritty details.
|
6
|
+
|
7
|
+
## 0.3.2 2015-03-16
|
8
|
+
|
9
|
+
* No longer close IO we don't own when daemonizing. [#85](https://github.com/kennethkalmer/daemon-kit/issues/85)
|
10
|
+
* Fix missing ERB require. [#89](https://github.com/kennethkalmer/daemon-kit/issues/89)
|
11
|
+
* Ruby 2.2 compat fix. [#91](https://github.com/kennethkalmer/daemon-kit/issues/91)
|
12
|
+
|
13
|
+
## 0.3.1 2014-07-21
|
14
|
+
|
15
|
+
* Removed the dependency on the i18n gem
|
16
|
+
* Locked rufus-scheduler dependency to 2.0.x #79
|
17
|
+
* Pass YAML files through ERB #80
|
18
|
+
* Ensure proper shutdown of AMQP connections #84
|
19
|
+
|
20
|
+
## 0.3.0 2014-05-15
|
21
|
+
|
22
|
+
* No changes, released final version
|
23
|
+
|
24
|
+
## 0.3.0.rc2 2013-09-23
|
25
|
+
|
26
|
+
* [safely](https://github.com/kennethkalmer/safely) usage is now optional, although included by default. #73
|
27
|
+
* XMPP abstractions fixed and now requires Blather ~> 0.8.0
|
28
|
+
* Removed support for "freezing" daemon-kit into vendor/daemon-kit
|
29
|
+
* Added new "--edge" generator, creating a Gemfile that depends on daemon-kit's Github repo
|
30
|
+
|
31
|
+
## 0.3.0.rc1 2013-09-11
|
2
32
|
|
3
33
|
* Removed nanite support, nanite hasn't released in years.
|
34
|
+
* Switched generators from Rubigen to Thor
|
35
|
+
* Added Travis builds
|
36
|
+
* Added Relish documentation for us
|
37
|
+
* Switched example specs to use "pending" instead of "violated"
|
38
|
+
* Running `daemon-kit` without arguments now shows help
|
4
39
|
|
5
|
-
|
40
|
+
## 0.2.0 2012-09-30
|
6
41
|
|
7
42
|
* Depend on the 'safely' gem for the safely method and logging backtraces
|
8
43
|
* Fixed compatibility with ruote-amqp 2.2.0
|
@@ -13,15 +48,15 @@
|
|
13
48
|
* Various load/require fixes by @ktrix
|
14
49
|
* SQS generator by @marcbowes
|
15
50
|
|
16
|
-
|
51
|
+
## 0.1.8.2 2011-05-18
|
17
52
|
|
18
53
|
* Convert to use Bundler
|
19
54
|
|
20
|
-
|
55
|
+
## 0.1.18.1 2010-08-04
|
21
56
|
|
22
57
|
* Fixed issue with our own amqp.rb file causing havoc on Ruby 1.8.7
|
23
58
|
|
24
|
-
|
59
|
+
## 0.1.18 2010-08-03
|
25
60
|
|
26
61
|
* Generators rewritten to use Thor
|
27
62
|
* Evented XMPP now handled by blather
|
@@ -35,11 +70,11 @@
|
|
35
70
|
* Exception handling for scheduled tasks (cron)
|
36
71
|
* Updates for ruote-amqp versions 2.1 and later
|
37
72
|
|
38
|
-
|
73
|
+
## 0.1.7.12 2009-12-04
|
39
74
|
|
40
75
|
* Bug fix, don't load environment files twice [grockit]
|
41
76
|
|
42
|
-
|
77
|
+
## 0.1.7.11 2009-11-30
|
43
78
|
|
44
79
|
* Renamed 'daemon_kit' executable to 'daemon-kit'
|
45
80
|
* Fixed some broken links in README.rdoc
|
@@ -51,7 +86,7 @@
|
|
51
86
|
* Fixed issue with nanite services not being advertised correctly [Wijnand]
|
52
87
|
* Fixed some woes with rake if rspec gem is missing
|
53
88
|
|
54
|
-
|
89
|
+
## 0.1.7.10 2009-08-12
|
55
90
|
|
56
91
|
* Ruote remote participants
|
57
92
|
* Allow process umask to be configured, defaults to 022
|
@@ -59,25 +94,25 @@
|
|
59
94
|
* Fixed argument parsing bug (reported by Mathijs Kwik (bluescreen303)
|
60
95
|
* Support for privilege separation (See Configuration.txt)
|
61
96
|
|
62
|
-
|
97
|
+
## 0.1.7.9 2009-06-22
|
63
98
|
|
64
99
|
* Backtraces only logged on unclean shutdown
|
65
100
|
* AMQP generator got new keep alive code
|
66
101
|
|
67
|
-
|
102
|
+
## 0.1.7.8 2009-06-22
|
68
103
|
|
69
104
|
* Optional logging of all exceptions when the daemon process dies
|
70
105
|
unexpectedly
|
71
106
|
* Update generated environment.rb to reflect new backtraces option
|
72
107
|
|
73
|
-
|
108
|
+
## 0.1.7.7 2009-06-22
|
74
109
|
|
75
110
|
* Fixed compatibility with rufus-scheduler-2.0.0 (or newer) in cron
|
76
111
|
generator
|
77
112
|
* Started central eventmachine reactor management code
|
78
113
|
* Now depends on eventmachine
|
79
114
|
|
80
|
-
|
115
|
+
## 0.1.7.6 (Not released)
|
81
116
|
|
82
117
|
* Support for cucumber
|
83
118
|
* Fixed issue in daemon_kit:upgrade task
|
@@ -85,14 +120,14 @@
|
|
85
120
|
* Removed conflicting rubigen generator, messed with our script directory
|
86
121
|
* Fixed bug where environment.rb overwrites some --config values (reported by Josh Owens)
|
87
122
|
|
88
|
-
|
123
|
+
## 0.1.7.5 2009-06-08
|
89
124
|
|
90
125
|
* New AbstractLogger
|
91
|
-
|
92
|
-
|
126
|
+
* Default Logger backend
|
127
|
+
* SysLogLogger support
|
93
128
|
* More documentation
|
94
129
|
|
95
|
-
|
130
|
+
## 0.1.7.4 2009-06-05
|
96
131
|
|
97
132
|
* Fixed bug with control script generator (thanks Sho Fukamachi)
|
98
133
|
* Enhanced deploy.rb template to check for current dk gem verion,
|
@@ -101,23 +136,23 @@
|
|
101
136
|
* Added log:truncate rake task
|
102
137
|
* Error mails now handled by TMail
|
103
138
|
|
104
|
-
|
139
|
+
## 0.1.7.3 2009-05-31
|
105
140
|
|
106
141
|
* Removed dependency on daemons gem, now handled in house
|
107
142
|
* New argument management
|
108
143
|
* Some more docs
|
109
144
|
|
110
|
-
|
145
|
+
## 0.1.7.1 2009-05-28
|
111
146
|
|
112
147
|
* Fixed some minor issue with Capistrano support
|
113
148
|
* Added support for generating dog/monit configuration files via rake
|
114
149
|
* Initial implementation of ./script/* utilities
|
115
150
|
|
116
|
-
|
151
|
+
## 0.1.7 2009-05-26
|
117
152
|
|
118
153
|
* Capistrano deployment support
|
119
154
|
|
120
|
-
|
155
|
+
## 0.1.6 2009-05-13
|
121
156
|
|
122
157
|
* DaemonKit::Safety class to handle the trapping and logging of
|
123
158
|
exceptions, as well as email notifications or Hoptoad notifications.
|
@@ -126,22 +161,22 @@
|
|
126
161
|
* Fixed some other annoyances and bugs
|
127
162
|
* Bigger TODO list
|
128
163
|
|
129
|
-
|
164
|
+
## 0.1.5 2009-05-07
|
130
165
|
|
131
166
|
* DaemonKit::Config class to easy the use of YAML configs internally,
|
132
167
|
and in generated daemons
|
133
168
|
|
134
|
-
|
169
|
+
## 0.1.2 2009-04-28
|
135
170
|
|
136
171
|
* Added missing rubigen dependency
|
137
172
|
|
138
|
-
|
173
|
+
## 0.1.1 2009-04-27
|
139
174
|
|
140
175
|
* AMQP consumer generator added
|
141
176
|
* 'cron' style generator added
|
142
177
|
* Allow configuring dir_mode and dir (pid file location) (Jim Lindley)
|
143
178
|
|
144
|
-
|
179
|
+
## 0.1.0 2009-01-08
|
145
180
|
|
146
181
|
* Ability to freeze the gem/edge copies of DaemonKit
|
147
182
|
* Simple non-evented Jabber generator
|
data/daemon-kit.gemspec
CHANGED
@@ -30,9 +30,8 @@ module DaemonKit
|
|
30
30
|
# Run the daemon in the foreground without daemonizing
|
31
31
|
def run( file )
|
32
32
|
self.chroot
|
33
|
-
self.clean_fd
|
34
33
|
self.redirect_io( true )
|
35
|
-
|
34
|
+
|
36
35
|
DaemonKit.configuration.log_stdout = true
|
37
36
|
|
38
37
|
require file
|
@@ -43,7 +42,6 @@ module DaemonKit
|
|
43
42
|
self.drop_privileges
|
44
43
|
self.daemonize
|
45
44
|
self.chroot
|
46
|
-
self.clean_fd
|
47
45
|
self.redirect_io
|
48
46
|
|
49
47
|
require file
|
@@ -177,21 +175,6 @@ module DaemonKit
|
|
177
175
|
File.umask 0000
|
178
176
|
end
|
179
177
|
|
180
|
-
# Make sure all file descriptors are closed (with the exception
|
181
|
-
# of STDIN, STDOUT & STDERR)
|
182
|
-
def clean_fd
|
183
|
-
ObjectSpace.each_object(IO) do |io|
|
184
|
-
unless [STDIN, STDOUT, STDERR].include?(io)
|
185
|
-
begin
|
186
|
-
unless io.closed?
|
187
|
-
io.close
|
188
|
-
end
|
189
|
-
rescue ::Exception
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
|
-
end
|
194
|
-
|
195
178
|
# Redirect our IO
|
196
179
|
# TODO: make this configurable
|
197
180
|
def redirect_io( simulate = false )
|
data/lib/daemon_kit/config.rb
CHANGED
@@ -334,9 +334,9 @@ module DaemonKit
|
|
334
334
|
@shutdown_hooks << ( proc || block )
|
335
335
|
end
|
336
336
|
|
337
|
-
def pid_file(
|
337
|
+
def pid_file( an_instance = instance )
|
338
338
|
@pid_file ||=
|
339
|
-
File.join( File.dirname(self.default_log_path), "#{self.daemon_name}.#{
|
339
|
+
File.join( File.dirname(self.default_log_path), "#{self.daemon_name}.#{an_instance}.pid" )
|
340
340
|
end
|
341
341
|
|
342
342
|
def instance
|
data/lib/daemon_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,68 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daemon-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Kenneth Kalmer
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- - '>='
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- - '>='
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- - '>='
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- - '>='
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rdoc
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- - '>='
|
51
|
+
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '0'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- - '>='
|
59
|
+
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '0'
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: rspec
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: cucumber
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -83,6 +94,7 @@ dependencies:
|
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: aruba
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ~>
|
88
100
|
- !ruby/object:Gem::Version
|
@@ -90,6 +102,7 @@ dependencies:
|
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
107
|
- - ~>
|
95
108
|
- !ruby/object:Gem::Version
|
@@ -97,20 +110,23 @@ dependencies:
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: SyslogLogger
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
|
-
- - '>='
|
115
|
+
- - ! '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
|
-
- - '>='
|
123
|
+
- - ! '>='
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: safely
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
131
|
- - ~>
|
116
132
|
- !ruby/object:Gem::Version
|
@@ -118,6 +134,7 @@ dependencies:
|
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
139
|
- - ~>
|
123
140
|
- !ruby/object:Gem::Version
|
@@ -125,29 +142,33 @@ dependencies:
|
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: thor
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
|
-
- - '>='
|
147
|
+
- - ! '>='
|
130
148
|
- !ruby/object:Gem::Version
|
131
149
|
version: '0'
|
132
150
|
type: :runtime
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
|
-
- - '>='
|
155
|
+
- - ! '>='
|
137
156
|
- !ruby/object:Gem::Version
|
138
157
|
version: '0'
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: eventmachine
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
|
-
- - '>='
|
163
|
+
- - ! '>='
|
144
164
|
- !ruby/object:Gem::Version
|
145
165
|
version: 0.12.10
|
146
166
|
type: :runtime
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
|
-
- - '>='
|
171
|
+
- - ! '>='
|
151
172
|
- !ruby/object:Gem::Version
|
152
173
|
version: 0.12.10
|
153
174
|
description: daemon-kit aims to simplify creating Ruby daemons by providing a sound
|
@@ -161,7 +182,7 @@ extensions: []
|
|
161
182
|
extra_rdoc_files:
|
162
183
|
- Configuration.txt
|
163
184
|
- Deployment.txt
|
164
|
-
-
|
185
|
+
- CHANGELOG.md
|
165
186
|
- Logging.txt
|
166
187
|
- README.md
|
167
188
|
- RuoteParticipants.txt
|
@@ -170,10 +191,10 @@ files:
|
|
170
191
|
- .gitignore
|
171
192
|
- .rspec
|
172
193
|
- .travis.yml
|
194
|
+
- CHANGELOG.md
|
173
195
|
- Configuration.txt
|
174
196
|
- Deployment.txt
|
175
197
|
- Gemfile
|
176
|
-
- History.txt
|
177
198
|
- Logging.txt
|
178
199
|
- README.md
|
179
200
|
- Rakefile
|
@@ -340,34 +361,45 @@ files:
|
|
340
361
|
homepage: http://github.com/kennethkalmer/daemon-kit
|
341
362
|
licenses:
|
342
363
|
- MIT
|
343
|
-
|
344
|
-
post_install_message: |2+
|
364
|
+
post_install_message: ! '
|
345
365
|
|
346
366
|
For more information on daemon-kit, see http://kit.rubyforge.org/daemon-kit
|
347
367
|
|
368
|
+
|
348
369
|
For usage options, run:
|
349
370
|
|
371
|
+
|
350
372
|
$ daemon-kit -h
|
351
373
|
|
352
374
|
|
375
|
+
|
376
|
+
'
|
353
377
|
rdoc_options: []
|
354
378
|
require_paths:
|
355
379
|
- lib
|
356
380
|
required_ruby_version: !ruby/object:Gem::Requirement
|
381
|
+
none: false
|
357
382
|
requirements:
|
358
|
-
- - '>='
|
383
|
+
- - ! '>='
|
359
384
|
- !ruby/object:Gem::Version
|
360
385
|
version: '0'
|
386
|
+
segments:
|
387
|
+
- 0
|
388
|
+
hash: 1230751779493899701
|
361
389
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
390
|
+
none: false
|
362
391
|
requirements:
|
363
|
-
- - '>='
|
392
|
+
- - ! '>='
|
364
393
|
- !ruby/object:Gem::Version
|
365
394
|
version: '0'
|
395
|
+
segments:
|
396
|
+
- 0
|
397
|
+
hash: 1230751779493899701
|
366
398
|
requirements: []
|
367
399
|
rubyforge_project:
|
368
|
-
rubygems_version:
|
400
|
+
rubygems_version: 1.8.23
|
369
401
|
signing_key:
|
370
|
-
specification_version:
|
402
|
+
specification_version: 3
|
371
403
|
summary: Opinionated framework for Ruby daemons
|
372
404
|
test_files:
|
373
405
|
- features/amqp_generator.feature
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: a80980f289f305af7ca3a5a5628221ea3c78a590
|
4
|
-
data.tar.gz: 600acd170f77223f90945b3fe735b485453c576a
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: a7ec6e458f488effa6b031a71a36c4fa68683b437720a08a9336595956f3c802874f421fafbf23c0812f6557eb0a82793957d41c3136231c509a540dc6d175e0
|
7
|
-
data.tar.gz: c3851199037850ebf8b38d1f2eb9806c2d3d31be5c94a4f22744d0f0f043a9bbd31dced2a0d9c7af3e85df35ea5f6214f3af95ecc28057e014399e8cd36dcb75
|