rsmp 0.33.2 → 0.33.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5f45a8754f0d229c77dd94069219416b680bf5e1beaa23412732980231cf634
4
- data.tar.gz: 5855e1ea8d0cb8f7aec66e652f5e5553a296b3cdef08aee9b514fed43c838640
3
+ metadata.gz: 7695095d716cbc6f3b6713584bf7b78fc2323a6d9ea80abe28c0ebd8eddfa14b
4
+ data.tar.gz: b9efc9a38e5ea2020a2038c28bfbf6c45e2555b4804f763726750995e0c40d5c
5
5
  SHA512:
6
- metadata.gz: d2d37ad752b3b9ebcfe13d544a594d642cd5b887b647bfc54a5d5af898609f77b1bfd8402d66759abfe5b2fc43657615befc4f9be4d1bb176e84c364da5a9449
7
- data.tar.gz: 653a2f991a9aecf1ecd46a12a6179cac1d4b830edf75880f4c078fa3f7309eb10430415c9e3c9db1e2de247a9263bcc0ae9edf8e9b39b432267ee163564a82f3
6
+ metadata.gz: 9ccd49421abfa90e1d0dd3c8e84e6346623a4ee3eaf7aa9af8183974e0f867f520c37562d8468338179dd4425aded09f18cd169b9921744f61d368a975c7cf52
7
+ data.tar.gz: 6feabda3a5a2ba01042fb594e7c479545d15c48b4d41d22c0f0d0121f15d4d3e4f3c23b2e3e4f7da7f853e4746146bf91c8999e6decddb33846ef60d2a98cd0a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.33.2)
4
+ rsmp (0.33.4)
5
5
  async (~> 2.16)
6
6
  async-io (~> 1.43)
7
7
  colorize (~> 1.1)
@@ -18,8 +18,8 @@ GEM
18
18
  cucumber (>= 8.0, < 10.0)
19
19
  rspec-expectations (~> 3.4)
20
20
  thor (~> 1.0)
21
- async (2.17.0)
22
- console (~> 1.26)
21
+ async (2.21.1)
22
+ console (~> 1.29)
23
23
  fiber-annotation
24
24
  io-event (~> 1.6, >= 1.6.5)
25
25
  async-io (1.43.2)
@@ -27,11 +27,11 @@ GEM
27
27
  bigdecimal (3.1.8)
28
28
  builder (3.3.0)
29
29
  colorize (1.1.0)
30
- console (1.27.0)
30
+ console (1.29.2)
31
31
  fiber-annotation
32
32
  fiber-local (~> 1.1)
33
33
  json
34
- contracts (0.17)
34
+ contracts (0.17.2)
35
35
  cucumber (9.2.0)
36
36
  builder (~> 3.2)
37
37
  cucumber-ci-environment (> 9, < 11)
@@ -56,7 +56,7 @@ GEM
56
56
  cucumber-html-formatter (21.7.0)
57
57
  cucumber-messages (> 19, < 27)
58
58
  cucumber-messages (22.0.0)
59
- cucumber-tag-expressions (6.1.0)
59
+ cucumber-tag-expressions (6.1.1)
60
60
  diff-lcs (1.5.1)
61
61
  ffi (1.17.0)
62
62
  fiber-annotation (0.2.0)
@@ -64,19 +64,19 @@ GEM
64
64
  fiber-storage
65
65
  fiber-storage (1.0.0)
66
66
  hana (1.3.7)
67
- io-event (1.6.5)
68
- json (2.7.2)
67
+ io-event (1.7.4)
68
+ json (2.9.0)
69
69
  json_schemer (2.3.0)
70
70
  bigdecimal
71
71
  hana (~> 1.3)
72
72
  regexp_parser (~> 2.0)
73
73
  simpleidn (~> 0.2)
74
- logger (1.6.1)
74
+ logger (1.6.2)
75
75
  mini_mime (1.1.5)
76
76
  multi_test (1.1.0)
77
- ostruct (0.6.0)
77
+ ostruct (0.6.1)
78
78
  rake (13.2.1)
79
- regexp_parser (2.9.2)
79
+ regexp_parser (2.9.3)
80
80
  rsmp_schema (0.8.4)
81
81
  json_schemer (~> 2.3.0)
82
82
  thor (~> 1.3.1)
@@ -84,17 +84,17 @@ GEM
84
84
  rspec-core (~> 3.13.0)
85
85
  rspec-expectations (~> 3.13.0)
86
86
  rspec-mocks (~> 3.13.0)
87
- rspec-core (3.13.1)
87
+ rspec-core (3.13.2)
88
88
  rspec-support (~> 3.13.0)
89
- rspec-expectations (3.13.2)
89
+ rspec-expectations (3.13.3)
90
90
  diff-lcs (>= 1.2.0, < 2.0)
91
91
  rspec-support (~> 3.13.0)
92
- rspec-mocks (3.13.1)
92
+ rspec-mocks (3.13.2)
93
93
  diff-lcs (>= 1.2.0, < 2.0)
94
94
  rspec-support (~> 3.13.0)
95
- rspec-support (3.13.1)
95
+ rspec-support (3.13.2)
96
96
  simpleidn (0.2.3)
97
- sys-uname (1.3.0)
97
+ sys-uname (1.3.1)
98
98
  ffi (~> 1.1)
99
99
  thor (1.3.2)
100
100
  timecop (0.9.10)
@@ -137,7 +137,7 @@ module RSMP
137
137
 
138
138
  def process_aggregated_status message
139
139
  se = message.attribute("se")
140
- validate_aggregated_status(message,se) == false
140
+ validate_aggregated_status(message,se)
141
141
  c_id = message.attributes["cId"]
142
142
  component = find_component c_id
143
143
  unless component
@@ -172,19 +172,24 @@ module RSMP
172
172
 
173
173
  def send_aggregated_status component, options={}
174
174
  m_id = options[:m_id] || RSMP::Message.make_m_id
175
+
176
+ # For core <=3.1.2, se items must be send as strings
177
+ # For core > 3.1.2, se items must be send as booleans
178
+ if Proxy::version_meets_requirement?(core_version,"<=3.1.2")
179
+ se = component.aggregated_status_bools.map {|bool| bool ? "true" : "false"}
180
+ else
181
+ se = component.aggregated_status_bools
182
+ end
183
+
175
184
  message = AggregatedStatus.new({
176
185
  "aSTS" => clock.to_s,
177
186
  "cId" => component.c_id,
178
187
  "fP" => nil,
179
188
  "fS" => nil,
180
- "se" => component.aggregated_status_bools,
189
+ "se" => se,
181
190
  "mId" => m_id,
182
191
  })
183
192
 
184
- # Core 3.1.2 or earlier requires that se items to be send as strings
185
- if Proxy::version_meets_requirement?(core_version,"<=3.1.2")
186
- message.attributes["se"].map! {|bool| bool ? "true" : "false"}
187
- end
188
193
 
189
194
  set_nts_message_attributes message
190
195
  send_and_optionally_collect message, options do |collect_options|
@@ -200,7 +205,7 @@ module RSMP
200
205
 
201
206
  def process_aggregated_status message
202
207
  se = message.attribute("se")
203
- validate_aggregated_status(message,se) == false
208
+ validate_aggregated_status(message,se)
204
209
  on = set_aggregated_status se
205
210
  log "Received #{message.type} status [#{on.join(', ')}]", message: message, level: :log
206
211
  acknowledge message
data/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.33.2"
2
+ VERSION = "0.33.4"
3
3
  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.33.2
4
+ version: 0.33.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
11
+ date: 2024-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger