rsmp 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rsmp/site_proxy.rb +3 -11
- data/lib/rsmp/version.rb +1 -1
- data/test.rb +27 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0675af3b49828fa77194f4dbec427378e6cf79e8a4923ed452cf28a39052a2
|
4
|
+
data.tar.gz: d0a681be3741ac8a87c4d1b17d1db75218cae8d8df34a0f6365052ff59578235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4012fd3e7f6c4c39c6f473ac09b115fbf67bf1651803c421e10f37e9e17b78b3d096dc7a4c36e125117f30daf5baf2e0e755bd83a06926a143ae7cb4bed91def
|
7
|
+
data.tar.gz: be15a086298d27b3cd8530685a8b654519540ac3d64f1aecd62399d513bc4c323f200e9d606c0afa28e1efc57a8d6e51c9f7dd77c4893ceb493c2613792c6567
|
data/Gemfile.lock
CHANGED
data/lib/rsmp/site_proxy.rb
CHANGED
@@ -335,20 +335,12 @@ module RSMP
|
|
335
335
|
@supervisor.notify_error e, options if @supervisor
|
336
336
|
end
|
337
337
|
|
338
|
-
def
|
339
|
-
|
340
|
-
message = collect(parent_task,options.merge(type: "Alarm", with_message: true, num: 1)) do |message|
|
341
|
-
# TODO check components
|
342
|
-
matching_alarm = nil
|
343
|
-
alarm = message
|
338
|
+
def collect_alarms parent_task, options={}
|
339
|
+
collect(parent_task,options.merge(type: "Alarm")) do |alarm|
|
344
340
|
next if options[:aCId] && options[:aCId] != alarm.attribute("aCId")
|
345
341
|
next if options[:aSp] && options[:aSp] != alarm.attribute("aSp")
|
346
342
|
next if options[:aS] && options[:aS] != alarm.attribute("aS")
|
347
|
-
|
348
|
-
break
|
349
|
-
end
|
350
|
-
if item
|
351
|
-
{ message: message, status: matching_alarm }
|
343
|
+
true
|
352
344
|
end
|
353
345
|
end
|
354
346
|
|
data/lib/rsmp/version.rb
CHANGED
data/test.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
class A
|
2
|
+
def go &block
|
3
|
+
@block = block # block will be converted automatically to a Proc
|
4
|
+
indirect
|
5
|
+
end
|
6
|
+
|
7
|
+
def call
|
8
|
+
@block.call
|
9
|
+
end
|
10
|
+
|
11
|
+
def indirect
|
12
|
+
call
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
a = A.new
|
18
|
+
|
19
|
+
a.go do
|
20
|
+
break # this is ok. break causes the block to exit, and the encasing method to return - go() will exit
|
21
|
+
end
|
22
|
+
|
23
|
+
# this raises an error. the block we passed to go() will be called again, and it tries to break
|
24
|
+
# but we're not inside a method we can exit from
|
25
|
+
|
26
|
+
|
27
|
+
a.indirect
|
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.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emil Tin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -231,6 +231,7 @@ files:
|
|
231
231
|
- lib/rsmp/version.rb
|
232
232
|
- lib/rsmp/wait.rb
|
233
233
|
- rsmp.gemspec
|
234
|
+
- test.rb
|
234
235
|
homepage: https://github.com/rsmp-nordic/rsmp
|
235
236
|
licenses:
|
236
237
|
- MIT
|