daemon-kit 0.3.0.rc2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +1 -1
- data/daemon-kit.gemspec +0 -1
- data/lib/daemon_kit/config.rb +3 -1
- data/lib/daemon_kit/version.rb +1 -1
- data/lib/generators/daemon_kit/amqp/templates/libexec/%app_name%-daemon.rb +1 -1
- data/lib/generators/daemon_kit/cron/cron_generator.rb +1 -1
- data/spec/config_spec.rb +8 -0
- data/spec/fixtures/erb.yml +15 -0
- metadata +31 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5863c26da1bdb1d9e1f4892940cef449b834ee9
|
4
|
+
data.tar.gz: 7b351c12391dcad24c7e5255cfe43ca742595790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51df70ff0f364208977aa02084070550bea90004f97b997770370d8d4ebf4edf84b6d72a217d361b0bebb267627198a0b0dd764ed3ca04e828720b79cfa81bb3
|
7
|
+
data.tar.gz: 3784fb8b57b8abb6c746f115e4192614a2a9f4a52ffc528a8463df640445ee819d4dc9fffb7fe32a5ce94b3c944961c7930a2108eff7979c82a0fa3bc59b7aab
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -62,7 +62,7 @@ The jabber generator creates a simple daemon that leverages the [blather](http:/
|
|
62
62
|
|
63
63
|
### Cron Generator
|
64
64
|
|
65
|
-
The cron generator creates a simple daemon that leverages the [rufus-scheduler](http://github.com/jmettraux/rufus-scheduler) gem to create a simple cron-
|
65
|
+
The cron generator creates a simple daemon that leverages the [rufus-scheduler](http://github.com/jmettraux/rufus-scheduler) gem to create a simple cron-like daemon. Please be aware that this daemon could never be a replacement for the battle-tested cron[http://www.gentoo.org/doc/en/cron-guide.xml] utility shipped standard with most *nix distributions.
|
66
66
|
|
67
67
|
### AMQP Consumer Generator
|
68
68
|
|
data/daemon-kit.gemspec
CHANGED
data/lib/daemon_kit/config.rb
CHANGED
@@ -29,7 +29,9 @@ module DaemonKit
|
|
29
29
|
|
30
30
|
raise ArgumentError, "Can't find #{path}" unless File.exists?( path )
|
31
31
|
|
32
|
-
new(
|
32
|
+
config_content = ERB.new(File.read(path)).result(binding)
|
33
|
+
|
34
|
+
new( YAML.load( config_content ) )
|
33
35
|
end
|
34
36
|
|
35
37
|
# Return the +config+.yml file as a raw hash.
|
data/lib/daemon_kit/version.rb
CHANGED
@@ -24,7 +24,7 @@ DaemonKit::AMQP.run do |connection|
|
|
24
24
|
|
25
25
|
# Uncomment this for connection keep-alive
|
26
26
|
# connection.on_tcp_connection_loss do |client, settings|
|
27
|
-
# DaemonKit.logger.debug("AMQP connection status changed: #{status}")
|
27
|
+
# DaemonKit.logger.debug("AMQP connection status changed: #{client.status}")
|
28
28
|
# client.reconnect(false, 1)
|
29
29
|
# end
|
30
30
|
|
data/spec/config_spec.rb
CHANGED
@@ -41,6 +41,14 @@ describe DaemonKit::Config do
|
|
41
41
|
FileUtils.mkdir_p( DAEMON_ROOT + "/config" )
|
42
42
|
FileUtils.cp( File.dirname(__FILE__) + '/fixtures/env.yml', DAEMON_ROOT + '/config/' )
|
43
43
|
FileUtils.cp( File.dirname(__FILE__) + '/fixtures/noenv.yml', DAEMON_ROOT + '/config/' )
|
44
|
+
FileUtils.cp( File.dirname(__FILE__) + '/fixtures/erb.yml', DAEMON_ROOT + '/config/' )
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should render ERB interpolation before loading config" do
|
48
|
+
ENV.should_receive(:[]).with("foo").and_return("bar")
|
49
|
+
config = DaemonKit::Config.load('erb')
|
50
|
+
|
51
|
+
config.string.should == 'bar'
|
44
52
|
end
|
45
53
|
|
46
54
|
it "should parse env keys correctly" do
|
metadata
CHANGED
@@ -1,169 +1,155 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daemon-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenneth Kalmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '2.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cucumber
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 1.3.8
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.3.8
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: aruba
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.5.3
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.5.3
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: SyslogLogger
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: safely
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 0.3.2
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.3.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: thor
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: eventmachine
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 0.12.10
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.12.10
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: i18n
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - '>='
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :runtime
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - '>='
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
153
|
description: daemon-kit aims to simplify creating Ruby daemons by providing a sound
|
168
154
|
application skeleton (through a generator), task specific generators (jabber bot,
|
169
155
|
etc) and robust environment management code.
|
@@ -181,13 +167,12 @@ extra_rdoc_files:
|
|
181
167
|
- RuoteParticipants.txt
|
182
168
|
- TODO.txt
|
183
169
|
files:
|
184
|
-
- .gitignore
|
185
|
-
- .rspec
|
186
|
-
- .travis.yml
|
170
|
+
- ".gitignore"
|
171
|
+
- ".rspec"
|
172
|
+
- ".travis.yml"
|
187
173
|
- Configuration.txt
|
188
174
|
- Deployment.txt
|
189
175
|
- Gemfile
|
190
|
-
- Gemfile.lock
|
191
176
|
- History.txt
|
192
177
|
- Logging.txt
|
193
178
|
- README.md
|
@@ -323,6 +308,7 @@ files:
|
|
323
308
|
- spec/configurable_spec.rb
|
324
309
|
- spec/daemon_kit_spec.rb
|
325
310
|
- spec/fixtures/env.yml
|
311
|
+
- spec/fixtures/erb.yml
|
326
312
|
- spec/fixtures/noenv.yml
|
327
313
|
- spec/fixtures/zero_two_three/Gemfile
|
328
314
|
- spec/fixtures/zero_two_three/README
|
@@ -369,17 +355,17 @@ require_paths:
|
|
369
355
|
- lib
|
370
356
|
required_ruby_version: !ruby/object:Gem::Requirement
|
371
357
|
requirements:
|
372
|
-
- -
|
358
|
+
- - ">="
|
373
359
|
- !ruby/object:Gem::Version
|
374
360
|
version: '0'
|
375
361
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
376
362
|
requirements:
|
377
|
-
- -
|
363
|
+
- - ">="
|
378
364
|
- !ruby/object:Gem::Version
|
379
|
-
version:
|
365
|
+
version: '0'
|
380
366
|
requirements: []
|
381
367
|
rubyforge_project:
|
382
|
-
rubygems_version: 2.0
|
368
|
+
rubygems_version: 2.2.0
|
383
369
|
signing_key:
|
384
370
|
specification_version: 4
|
385
371
|
summary: Opinionated framework for Ruby daemons
|
@@ -401,6 +387,7 @@ test_files:
|
|
401
387
|
- spec/configurable_spec.rb
|
402
388
|
- spec/daemon_kit_spec.rb
|
403
389
|
- spec/fixtures/env.yml
|
390
|
+
- spec/fixtures/erb.yml
|
404
391
|
- spec/fixtures/noenv.yml
|
405
392
|
- spec/fixtures/zero_two_three/Gemfile
|
406
393
|
- spec/fixtures/zero_two_three/README
|