rsmp 0.1.13 → 0.1.29

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/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.29"
3
3
  end
data/lib/rsmp/wait.rb CHANGED
@@ -1,17 +1,16 @@
1
- # Helper for waiting for an Async condition using a block
2
-
3
1
  module RSMP
4
- class Wait
5
-
6
- def self.wait_for task, condition, timeout, &block
7
- task.with_timeout(timeout) do
8
- while task.running? do
2
+ module Wait
3
+ # wait for an async condition to signal, then yield to block
4
+ # if block returns true we're done. otherwise, wait again
5
+ def wait_for condition, timeout, &block
6
+ raise RuntimeError.new("Can't wait for condition because task is not running") unless @task.running?
7
+ @task.with_timeout(timeout) do
8
+ while @task.running? do
9
9
  value = condition.wait
10
10
  result = yield value
11
11
  return result if result # return result of check, if not nil
12
12
  end
13
13
  end
14
14
  end
15
-
16
15
  end
17
16
  end
data/rsmp.gemspec CHANGED
@@ -26,33 +26,21 @@ Gem::Specification.new do |spec|
26
26
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
27
  end
28
28
 
29
- # Add schema files in rsmp_schema submodule
30
- gem_dir = Pathname.new(__dir__).expand_path
31
- submodule_path = File.expand_path 'lib/rsmp_schema/schema'
32
- Dir.chdir(submodule_path) do
33
- submodule_relative_path = Pathname.new(submodule_path).relative_path_from(gem_dir)
34
- `git ls-files`.split($\).each do |filename|
35
- # for each git file, prepend relative submodule path and add to spec
36
- spec.files << submodule_relative_path.join(filename).to_s
37
- end
38
- end
39
-
40
29
  spec.bindir = "exe"
41
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
42
31
  spec.require_paths = ["lib"]
43
32
 
44
- spec.add_dependency "async", "~> 1.23.0"
45
- spec.add_dependency "async-io", "~> 1.27.1"
33
+ spec.add_dependency "async", "~> 1.28.7"
34
+ spec.add_dependency "async-io", "~> 1.30.2"
46
35
  spec.add_dependency "colorize", "~> 0.8.1"
47
- spec.add_dependency "thor", "~> 0.20.3"
48
- spec.add_dependency "json_schemer", "~> 0.2.8"
36
+ spec.add_dependency "thor", "~> 1.0.1"
37
+ spec.add_dependency "rsmp_schemer", "~> 0.2.0"
49
38
 
50
- spec.add_development_dependency "bundler", "~> 2.0"
51
- spec.add_development_dependency "rake", "~> 10.0"
52
- spec.add_development_dependency "rspec", "~> 3.0"
53
- spec.add_development_dependency "rspec-expectations", "~> 3.8.3"
54
- spec.add_development_dependency "rspec-with_params", "~> 0.2.0"
39
+ spec.add_development_dependency "bundler", "~> 2.2.3"
40
+ spec.add_development_dependency "rake", "~> 13.0.1"
41
+ spec.add_development_dependency "rspec", "~> 3.9.0"
42
+ spec.add_development_dependency "rspec-expectations", "~> 3.9.1"
55
43
  spec.add_development_dependency "timecop", "~> 0.9.1"
56
44
  spec.add_development_dependency "cucumber", "~> 3.1.2"
57
- spec.add_development_dependency "aruba", "~> 0.14.11"
45
+ spec.add_development_dependency "aruba", "~> 1.0.0"
58
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-09 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.23.0
19
+ version: 1.28.7
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.23.0
26
+ version: 1.28.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: async-io
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.27.1
33
+ version: 1.30.2
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.27.1
40
+ version: 1.30.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: colorize
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,98 +58,84 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.20.3
61
+ version: 1.0.1
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.20.3
68
+ version: 1.0.1
69
69
  - !ruby/object:Gem::Dependency
70
- name: json_schemer
70
+ name: rsmp_schemer
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.2.8
75
+ version: 0.2.0
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: 0.2.8
82
+ version: 0.2.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '2.0'
89
+ version: 2.2.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
- version: '2.0'
96
+ version: 2.2.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '10.0'
103
+ version: 13.0.1
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
- version: '10.0'
110
+ version: 13.0.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3.0'
117
+ version: 3.9.0
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
- version: '3.0'
124
+ version: 3.9.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec-expectations
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 3.8.3
131
+ version: 3.9.1
132
132
  type: :development
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: 3.8.3
139
- - !ruby/object:Gem::Dependency
140
- name: rspec-with_params
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 0.2.0
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 0.2.0
138
+ version: 3.9.1
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: timecop
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +170,14 @@ dependencies:
184
170
  requirements:
185
171
  - - "~>"
186
172
  - !ruby/object:Gem::Version
187
- version: 0.14.11
173
+ version: 1.0.0
188
174
  type: :development
189
175
  prerelease: false
190
176
  version_requirements: !ruby/object:Gem::Requirement
191
177
  requirements:
192
178
  - - "~>"
193
179
  - !ruby/object:Gem::Version
194
- version: 0.14.11
180
+ version: 1.0.0
195
181
  description: Easy RSMP site and supervisor communication.
196
182
  email:
197
183
  - zf0f@kk.dk
@@ -211,130 +197,39 @@ files:
211
197
  - Rakefile
212
198
  - bin/console
213
199
  - bin/setup
214
- - config/site.yaml
215
200
  - config/supervisor.yaml
216
201
  - config/tlc.yaml
202
+ - documentation/classes_and_modules.md
203
+ - documentation/message_distribution.md
217
204
  - exe/rsmp
218
205
  - lib/rsmp.rb
219
206
  - lib/rsmp/alarm.rb
220
207
  - lib/rsmp/archive.rb
221
- - lib/rsmp/base.rb
222
208
  - lib/rsmp/cli.rb
209
+ - lib/rsmp/collector.rb
223
210
  - lib/rsmp/component.rb
211
+ - lib/rsmp/components.rb
212
+ - lib/rsmp/convert/export/json_schema.rb
213
+ - lib/rsmp/convert/import/yaml.rb
214
+ - lib/rsmp/deep_merge.rb
224
215
  - lib/rsmp/error.rb
216
+ - lib/rsmp/inspect.rb
217
+ - lib/rsmp/listener.rb
225
218
  - lib/rsmp/logger.rb
219
+ - lib/rsmp/logging.rb
226
220
  - lib/rsmp/message.rb
227
221
  - lib/rsmp/node.rb
228
- - lib/rsmp/probe.rb
229
- - lib/rsmp/probe_collection.rb
222
+ - lib/rsmp/notifier.rb
230
223
  - lib/rsmp/proxy.rb
231
224
  - lib/rsmp/rsmp.rb
232
225
  - lib/rsmp/site.rb
233
- - lib/rsmp/site_base.rb
234
226
  - lib/rsmp/site_proxy.rb
227
+ - lib/rsmp/site_proxy_wait.rb
235
228
  - lib/rsmp/supervisor.rb
236
- - lib/rsmp/supervisor_base.rb
237
229
  - lib/rsmp/supervisor_proxy.rb
238
230
  - lib/rsmp/tlc.rb
239
231
  - lib/rsmp/version.rb
240
232
  - lib/rsmp/wait.rb
241
- - lib/rsmp_schema/schema/core/aggregated_status.json
242
- - lib/rsmp_schema/schema/core/alarm.json
243
- - lib/rsmp_schema/schema/core/command_request.json
244
- - lib/rsmp_schema/schema/core/command_response.json
245
- - lib/rsmp_schema/schema/core/core.json
246
- - lib/rsmp_schema/schema/core/definitions.json
247
- - lib/rsmp_schema/schema/core/message_ack.json
248
- - lib/rsmp_schema/schema/core/message_not_ack.json
249
- - lib/rsmp_schema/schema/core/rsmp.json
250
- - lib/rsmp_schema/schema/core/status.json
251
- - lib/rsmp_schema/schema/core/status_request.json
252
- - lib/rsmp_schema/schema/core/status_response.json
253
- - lib/rsmp_schema/schema/core/status_subscribe.json
254
- - lib/rsmp_schema/schema/core/status_unsubscribe.json
255
- - lib/rsmp_schema/schema/core/status_update.json
256
- - lib/rsmp_schema/schema/core/version.json
257
- - lib/rsmp_schema/schema/core/watchdog.json
258
- - lib/rsmp_schema/schema/tlc/alarms/A0001.json
259
- - lib/rsmp_schema/schema/tlc/alarms/A0002.json
260
- - lib/rsmp_schema/schema/tlc/alarms/A0003.json
261
- - lib/rsmp_schema/schema/tlc/alarms/A0004.json
262
- - lib/rsmp_schema/schema/tlc/alarms/A0005.json
263
- - lib/rsmp_schema/schema/tlc/alarms/A0006.json
264
- - lib/rsmp_schema/schema/tlc/alarms/A0007.json
265
- - lib/rsmp_schema/schema/tlc/alarms/A0008.json
266
- - lib/rsmp_schema/schema/tlc/alarms/A0009.json
267
- - lib/rsmp_schema/schema/tlc/alarms/A0101.json
268
- - lib/rsmp_schema/schema/tlc/alarms/A0201.json
269
- - lib/rsmp_schema/schema/tlc/alarms/A0202.json
270
- - lib/rsmp_schema/schema/tlc/alarms/A0301.json
271
- - lib/rsmp_schema/schema/tlc/alarms/A0302.json
272
- - lib/rsmp_schema/schema/tlc/alarms/alarms.json
273
- - lib/rsmp_schema/schema/tlc/commands/M0001.json
274
- - lib/rsmp_schema/schema/tlc/commands/M0002.json
275
- - lib/rsmp_schema/schema/tlc/commands/M0003.json
276
- - lib/rsmp_schema/schema/tlc/commands/M0004.json
277
- - lib/rsmp_schema/schema/tlc/commands/M0005.json
278
- - lib/rsmp_schema/schema/tlc/commands/M0006.json
279
- - lib/rsmp_schema/schema/tlc/commands/M0007.json
280
- - lib/rsmp_schema/schema/tlc/commands/M0008.json
281
- - lib/rsmp_schema/schema/tlc/commands/M0010.json
282
- - lib/rsmp_schema/schema/tlc/commands/M0011.json
283
- - lib/rsmp_schema/schema/tlc/commands/M0012.json
284
- - lib/rsmp_schema/schema/tlc/commands/M0013.json
285
- - lib/rsmp_schema/schema/tlc/commands/M0014.json
286
- - lib/rsmp_schema/schema/tlc/commands/M0015.json
287
- - lib/rsmp_schema/schema/tlc/commands/M0016.json
288
- - lib/rsmp_schema/schema/tlc/commands/M0017.json
289
- - lib/rsmp_schema/schema/tlc/commands/M0018.json
290
- - lib/rsmp_schema/schema/tlc/commands/M0019.json
291
- - lib/rsmp_schema/schema/tlc/commands/M0103.json
292
- - lib/rsmp_schema/schema/tlc/commands/command_requests.json
293
- - lib/rsmp_schema/schema/tlc/commands/command_responses.json
294
- - lib/rsmp_schema/schema/tlc/commands/commands.json
295
- - lib/rsmp_schema/schema/tlc/statuses/S0001.json
296
- - lib/rsmp_schema/schema/tlc/statuses/S0002.json
297
- - lib/rsmp_schema/schema/tlc/statuses/S0003.json
298
- - lib/rsmp_schema/schema/tlc/statuses/S0004.json
299
- - lib/rsmp_schema/schema/tlc/statuses/S0005.json
300
- - lib/rsmp_schema/schema/tlc/statuses/S0006.json
301
- - lib/rsmp_schema/schema/tlc/statuses/S0007.json
302
- - lib/rsmp_schema/schema/tlc/statuses/S0008.json
303
- - lib/rsmp_schema/schema/tlc/statuses/S0009.json
304
- - lib/rsmp_schema/schema/tlc/statuses/S0010.json
305
- - lib/rsmp_schema/schema/tlc/statuses/S0011.json
306
- - lib/rsmp_schema/schema/tlc/statuses/S0012.json
307
- - lib/rsmp_schema/schema/tlc/statuses/S0013.json
308
- - lib/rsmp_schema/schema/tlc/statuses/S0014.json
309
- - lib/rsmp_schema/schema/tlc/statuses/S0015.json
310
- - lib/rsmp_schema/schema/tlc/statuses/S0016.json
311
- - lib/rsmp_schema/schema/tlc/statuses/S0017.json
312
- - lib/rsmp_schema/schema/tlc/statuses/S0018.json
313
- - lib/rsmp_schema/schema/tlc/statuses/S0019.json
314
- - lib/rsmp_schema/schema/tlc/statuses/S0020.json
315
- - lib/rsmp_schema/schema/tlc/statuses/S0021.json
316
- - lib/rsmp_schema/schema/tlc/statuses/S0022.json
317
- - lib/rsmp_schema/schema/tlc/statuses/S0023.json
318
- - lib/rsmp_schema/schema/tlc/statuses/S0024.json
319
- - lib/rsmp_schema/schema/tlc/statuses/S0025.json
320
- - lib/rsmp_schema/schema/tlc/statuses/S0026.json
321
- - lib/rsmp_schema/schema/tlc/statuses/S0027.json
322
- - lib/rsmp_schema/schema/tlc/statuses/S0028.json
323
- - lib/rsmp_schema/schema/tlc/statuses/S0029.json
324
- - lib/rsmp_schema/schema/tlc/statuses/S0091.json
325
- - lib/rsmp_schema/schema/tlc/statuses/S0092.json
326
- - lib/rsmp_schema/schema/tlc/statuses/S0095.json
327
- - lib/rsmp_schema/schema/tlc/statuses/S0096.json
328
- - lib/rsmp_schema/schema/tlc/statuses/S0201.json
329
- - lib/rsmp_schema/schema/tlc/statuses/S0202.json
330
- - lib/rsmp_schema/schema/tlc/statuses/S0203.json
331
- - lib/rsmp_schema/schema/tlc/statuses/S0204.json
332
- - lib/rsmp_schema/schema/tlc/statuses/S0205.json
333
- - lib/rsmp_schema/schema/tlc/statuses/S0206.json
334
- - lib/rsmp_schema/schema/tlc/statuses/S0207.json
335
- - lib/rsmp_schema/schema/tlc/statuses/S0208.json
336
- - lib/rsmp_schema/schema/tlc/statuses/statuses.json
337
- - lib/rsmp_schema/schema/tlc/sxl.json
338
233
  - rsmp.gemspec
339
234
  homepage: https://github.com/rsmp-nordic/rsmp
340
235
  licenses:
@@ -344,7 +239,7 @@ metadata:
344
239
  source_code_uri: https://github.com/rsmp-nordic/rsmp
345
240
  changelog_uri: https://github.com/rsmp-nordic/rsmp/blob/master/CHANGELOG.md
346
241
  bug_tracker_uri: https://github.com/rsmp-nordic/rsmp/issues
347
- post_install_message:
242
+ post_install_message:
348
243
  rdoc_options: []
349
244
  require_paths:
350
245
  - lib
@@ -359,8 +254,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
254
  - !ruby/object:Gem::Version
360
255
  version: '0'
361
256
  requirements: []
362
- rubygems_version: 3.0.3
363
- signing_key:
257
+ rubygems_version: 3.2.3
258
+ signing_key:
364
259
  specification_version: 4
365
260
  summary: RoadSide Message Protocol (RSMP) library.
366
261
  test_files: []
data/config/site.yaml DELETED
@@ -1,40 +0,0 @@
1
- site_id: RN+SI0001
2
- supervisors:
3
- - ip: 127.0.0.1
4
- port: 12111
5
-
6
- sxl: traffic_light_controller
7
-
8
- rsmp_versions:
9
- - 3.1.1
10
- - 3.1.2
11
- - 3.1.3
12
- - 3.1.4
13
-
14
- components:
15
- C1:
16
- type: main
17
-
18
- watchdog_interval: 1
19
- watchdog_timeout: 2
20
- acknowledgement_timeout: 1
21
- command_response_timeout: 1
22
- status_response_timeout: 1
23
- status_update_timeout: 1
24
- reconnect_interval: 0.1
25
-
26
- log:
27
- active: true
28
- color: true
29
- timestamp: true
30
- id: true
31
- component: true
32
- ip: false
33
- site_id: true
34
- level: false
35
- text: true
36
- direction: true
37
- json: true
38
- acknowledgements: false
39
- watchdogs: false
40
-