smith 0.6.2 → 0.6.3.1
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.
- checksums.yaml +4 -4
- data/lib/smith/agent_cache.rb +2 -3
- data/lib/smith/config.rb +15 -4
- data/lib/smith/version.rb +1 -1
- metadata +80 -80
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 647de83af2459d5c1d36106d946a285d0036a40e
|
4
|
+
data.tar.gz: 23e2377ae34c9dac6260f6d5eae59649d3b32544
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8190b27278ba8689cfddac882408ec75343237a1b2f8e95fa1c97fb67ad93bc06b1c590f67a761b419e802495a8aa53ac0c6110744fa713df3895946588e7bb7
|
7
|
+
data.tar.gz: b36c38be47ed043cfdeab3b0f63ada70f7aea6ec886ed8815d215b1188f2ca522398abe2656b61fd2953932b91c48b66eca5e3d145beac51991118c726a77a02
|
data/lib/smith/agent_cache.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require '
|
2
|
+
require 'gdbm'
|
3
3
|
require 'securerandom'
|
4
4
|
|
5
5
|
module Smith
|
@@ -10,8 +10,7 @@ module Smith
|
|
10
10
|
attr_accessor :path
|
11
11
|
|
12
12
|
def initialize(opts={})
|
13
|
-
|
14
|
-
@db = TDB.new(Smith.cache_path.join('agent_state.tdb').to_s)
|
13
|
+
@db = GDBM.new(Smith.cache_path.join('agent_state.gdbm').to_s, 0600, GDBM::WRCREAT | GDBM::SYNC)
|
15
14
|
end
|
16
15
|
|
17
16
|
def create(name)
|
data/lib/smith/config.rb
CHANGED
@@ -139,8 +139,9 @@ module Smith
|
|
139
139
|
|
140
140
|
# Find the config file. If it isn't in the CWD recurse up the file path
|
141
141
|
# until it reaches the user home directory. If it gets to the home
|
142
|
-
# directory without finding a config file
|
143
|
-
#
|
142
|
+
# directory without finding a config file it will read /etc/smithrc and
|
143
|
+
# then /etc/smith/config. If that fails give up and raise a
|
144
|
+
# ConfigNotFoundError exception.
|
144
145
|
#
|
145
146
|
# path: the pathname to find the config file. Defaults to CWD.
|
146
147
|
# recursive: rucures up the path. Defaults to true.
|
@@ -149,8 +150,18 @@ module Smith
|
|
149
150
|
if conf.exist?
|
150
151
|
return conf
|
151
152
|
else
|
152
|
-
if path == Pathname.new(ENV['HOME'])
|
153
|
-
|
153
|
+
if path == Pathname.new(ENV['HOME'])
|
154
|
+
p = Pathname.new("/etc/smithrc")
|
155
|
+
if p.exist?
|
156
|
+
return p
|
157
|
+
else
|
158
|
+
p = Pathname.new("/etc/smith/config")
|
159
|
+
if p.exist?
|
160
|
+
return p
|
161
|
+
else
|
162
|
+
raise ConfigNotFoundError, "Cannot find a usable config file."
|
163
|
+
end
|
164
|
+
end
|
154
165
|
end
|
155
166
|
find_config_file(path.dirname)
|
156
167
|
end
|
data/lib/smith/version.rb
CHANGED
metadata
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Heycock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amqp
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: '1.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: daemons
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.1
|
33
|
+
version: '1.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.1
|
40
|
+
version: '1.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: eventmachine
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.0
|
47
|
+
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.0
|
54
|
+
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: extlib
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.9.
|
61
|
+
version: 0.9.16
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.9.
|
68
|
+
version: 0.9.16
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: logging
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: '1.8'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: '1.8'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: protobuf
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,72 +112,72 @@ dependencies:
|
|
112
112
|
name: trollop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '2.0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: '2.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: multi_json
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: '1.10'
|
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
|
-
version: 1.
|
138
|
+
version: '1.10'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: ruby_parser
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 3.
|
145
|
+
version: '3.6'
|
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
|
-
version: 3.
|
152
|
+
version: '3.6'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: gdbm
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "
|
157
|
+
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
159
|
+
version: '1.2'
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
166
|
+
version: '1.2'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: murmurhash3
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - '='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 0.1.4
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - '='
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 0.1.4
|
181
181
|
description: Simple multi-agent framework. It uses AMQP for it's messaging layer.
|
182
182
|
email: rgh@filterfish.org
|
183
183
|
executables:
|
@@ -188,72 +188,72 @@ extensions: []
|
|
188
188
|
extra_rdoc_files: []
|
189
189
|
files:
|
190
190
|
- bin/agency
|
191
|
-
- bin/smithctl
|
192
191
|
- bin/pry-smith
|
192
|
+
- bin/smithctl
|
193
|
+
- lib/smith.rb
|
194
|
+
- lib/smith/acl_compiler.rb
|
195
|
+
- lib/smith/acl_parser.rb
|
196
|
+
- lib/smith/agent.rb
|
197
|
+
- lib/smith/agent_cache.rb
|
198
|
+
- lib/smith/agent_config.rb
|
199
|
+
- lib/smith/agent_monitoring.rb
|
200
|
+
- lib/smith/agent_process.rb
|
201
|
+
- lib/smith/amqp_errors.rb
|
193
202
|
- lib/smith/application/agency.rb
|
203
|
+
- lib/smith/bootstrap.rb
|
204
|
+
- lib/smith/cache.rb
|
205
|
+
- lib/smith/command.rb
|
206
|
+
- lib/smith/command_base.rb
|
194
207
|
- lib/smith/commands/agency/agents.rb
|
195
|
-
- lib/smith/commands/agency/metadata.rb
|
196
|
-
- lib/smith/commands/agency/version.rb
|
197
208
|
- lib/smith/commands/agency/kill.rb
|
209
|
+
- lib/smith/commands/agency/list.rb
|
210
|
+
- lib/smith/commands/agency/logger.rb
|
211
|
+
- lib/smith/commands/agency/metadata.rb
|
198
212
|
- lib/smith/commands/agency/object_count.rb
|
199
213
|
- lib/smith/commands/agency/restart.rb
|
200
214
|
- lib/smith/commands/agency/start.rb
|
201
215
|
- lib/smith/commands/agency/stop.rb
|
202
|
-
- lib/smith/commands/agency/
|
203
|
-
- lib/smith/commands/
|
204
|
-
- lib/smith/commands/smithctl/commands.rb
|
205
|
-
- lib/smith/commands/smithctl/pop.rb
|
206
|
-
- lib/smith/commands/smithctl/rm.rb
|
207
|
-
- lib/smith/commands/smithctl/subscribe.rb
|
216
|
+
- lib/smith/commands/agency/version.rb
|
217
|
+
- lib/smith/commands/common.rb
|
208
218
|
- lib/smith/commands/smithctl/acl.rb
|
219
|
+
- lib/smith/commands/smithctl/commands.rb
|
209
220
|
- lib/smith/commands/smithctl/dump.rb
|
221
|
+
- lib/smith/commands/smithctl/firehose.rb
|
222
|
+
- lib/smith/commands/smithctl/pop.rb
|
210
223
|
- lib/smith/commands/smithctl/push.rb
|
224
|
+
- lib/smith/commands/smithctl/rm.rb
|
211
225
|
- lib/smith/commands/smithctl/status.rb
|
226
|
+
- lib/smith/commands/smithctl/subscribe.rb
|
212
227
|
- lib/smith/commands/smithctl/top.rb
|
213
|
-
- lib/smith/commands/smithctl/firehose.rb
|
214
228
|
- lib/smith/commands/template.rb
|
215
|
-
- lib/smith/
|
229
|
+
- lib/smith/config.rb
|
230
|
+
- lib/smith/daemon.rb
|
231
|
+
- lib/smith/exceptions.rb
|
232
|
+
- lib/smith/logger.rb
|
233
|
+
- lib/smith/messaging/acl/agency_command.proto
|
216
234
|
- lib/smith/messaging/acl/agent_command.proto
|
217
235
|
- lib/smith/messaging/acl/agent_config_request.proto
|
218
236
|
- lib/smith/messaging/acl/agent_config_update.proto
|
219
|
-
- lib/smith/messaging/acl/search.proto
|
220
|
-
- lib/smith/messaging/acl/agency_command.proto
|
221
237
|
- lib/smith/messaging/acl/agent_keepalive.proto
|
222
238
|
- lib/smith/messaging/acl/agent_lifecycle.proto
|
223
239
|
- lib/smith/messaging/acl/agent_stats.proto
|
224
240
|
- lib/smith/messaging/acl/default.rb
|
225
|
-
- lib/smith/messaging/
|
241
|
+
- lib/smith/messaging/acl/search.proto
|
242
|
+
- lib/smith/messaging/acl_type_cache.rb
|
226
243
|
- lib/smith/messaging/amqp_options.rb
|
227
|
-
- lib/smith/messaging/message_counter.rb
|
228
|
-
- lib/smith/messaging/queue_factory.rb
|
229
244
|
- lib/smith/messaging/factory.rb
|
245
|
+
- lib/smith/messaging/message_counter.rb
|
230
246
|
- lib/smith/messaging/queue.rb
|
231
|
-
- lib/smith/messaging/requeue.rb
|
232
|
-
- lib/smith/messaging/util.rb
|
233
|
-
- lib/smith/messaging/acl_type_cache.rb
|
234
247
|
- lib/smith/messaging/queue_definition.rb
|
248
|
+
- lib/smith/messaging/queue_factory.rb
|
235
249
|
- lib/smith/messaging/receiver.rb
|
250
|
+
- lib/smith/messaging/requeue.rb
|
251
|
+
- lib/smith/messaging/responder.rb
|
236
252
|
- lib/smith/messaging/sender.rb
|
237
|
-
- lib/smith/
|
253
|
+
- lib/smith/messaging/util.rb
|
238
254
|
- lib/smith/object_count.rb
|
239
|
-
- lib/smith/amqp_errors.rb
|
240
|
-
- lib/smith/command_base.rb
|
241
|
-
- lib/smith/bootstrap.rb
|
242
|
-
- lib/smith/config.rb
|
243
255
|
- lib/smith/queue_definitions.rb
|
244
|
-
- lib/smith/acl_parser.rb
|
245
|
-
- lib/smith/agent.rb
|
246
|
-
- lib/smith/agent_cache.rb
|
247
|
-
- lib/smith/agent_monitoring.rb
|
248
|
-
- lib/smith/agent_process.rb
|
249
|
-
- lib/smith/cache.rb
|
250
|
-
- lib/smith/exceptions.rb
|
251
|
-
- lib/smith/logger.rb
|
252
|
-
- lib/smith/acl_compiler.rb
|
253
|
-
- lib/smith/command.rb
|
254
|
-
- lib/smith/daemon.rb
|
255
256
|
- lib/smith/version.rb
|
256
|
-
- lib/smith.rb
|
257
257
|
homepage: http://github.com/filterfish/smith2
|
258
258
|
licenses:
|
259
259
|
- GPL-3
|
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
version: '0'
|
275
275
|
requirements: []
|
276
276
|
rubyforge_project: smith
|
277
|
-
rubygems_version: 2.
|
277
|
+
rubygems_version: 2.2.1
|
278
278
|
signing_key:
|
279
279
|
specification_version: 4
|
280
280
|
summary: Multi-agent framework
|