Skip to content

Commit

Permalink
update rsmp_schema, use native bool for sOc
Browse files Browse the repository at this point in the history
  • Loading branch information
emiltin committed Nov 21, 2023
1 parent 8a1d6f9 commit b35d1a7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
22 changes: 8 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ PATH
async (~> 2.6.4)
async-io (~> 1.36.0)
colorize (~> 0.8.1)
rsmp_schema (~> 0.5)
thor (~> 1.2.2)
rsmp_schema (~> 0.5.1)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -57,28 +56,24 @@ GEM
cucumber-messages (18.0.0)
cucumber-tag-expressions (4.1.0)
diff-lcs (1.5.0)
ecma-re-validator (0.4.0)
regexp_parser (~> 2.2)
ffi (1.16.2)
fiber-annotation (0.2.0)
fiber-local (1.0.0)
hana (1.3.7)
io-event (1.3.2)
json_schemer (0.2.25)
ecma-re-validator (~> 0.3)
json_schemer (2.1.0)
hana (~> 1.3)
regexp_parser (~> 2.0)
simpleidn (~> 0.2)
uri_template (~> 0.7)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
multi_test (1.1.0)
rake (13.0.6)
regexp_parser (2.8.1)
rsmp_schema (0.5)
json_schemer (~> 0.2.21)
thor (~> 1.2.1)
regexp_parser (2.8.2)
rsmp_schema (0.5.1)
json_schemer (~> 2.1.0)
thor (~> 1.3.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -96,13 +91,12 @@ GEM
unf (~> 0.1.4)
sys-uname (1.2.3)
ffi (~> 1.1)
thor (1.2.2)
thor (1.3.0)
timecop (0.9.8)
timers (4.3.5)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
uri_template (0.7.0)
unf_ext (0.0.9.1)

PLATFORMS
arm64-darwin-22
Expand Down
2 changes: 1 addition & 1 deletion lib/rsmp/component_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def check_repeat_values message, subscription_list
uRt = subscription_list.dig(c_id,sCI,n,'uRt')
next if uRt.to_i > 0
sOc = subscription_list.dig(c_id,sCI,n,'sOc')
next if sOc == 'False'
next if sOc == false
next if @allow_repeat_updates[sCI] && @allow_repeat_updates[sCI].include?(n)
new_values = {'s'=>s,'q'=>q}
old_values = @statuses.dig(sCI,n)
Expand Down
3 changes: 1 addition & 2 deletions rsmp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "async", "~> 2.6.4"
spec.add_dependency "async-io", "~> 1.36.0"
spec.add_dependency "colorize", "~> 0.8.1"
spec.add_dependency "thor", "~> 1.2.2"
spec.add_dependency "rsmp_schema", "~> 0.5"
spec.add_dependency "rsmp_schema", "~> 0.5.1"

spec.add_development_dependency "bundler", "~> 2.4.20"
spec.add_development_dependency "rake", "~> 13.0.6"
Expand Down
2 changes: 1 addition & 1 deletion spec/message_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def sxl_version
let(:aggregated_status_str) { ' {"mType":"rSMsg","type":"AggregatedStatus","aSTS":"2019-07-11T06:37:55.913Z","fP":null,"fS":null,"se":[false,false,false,false,false,false,false,false],"mId":"d9a904cc-b39d-4b72-ad67-f7d634552d36"}' }
let(:status_request_str) { '{"mType":"rSMsg","type":"StatusRequest","ntsOId":"","xNId":"","cId":"AA+BBCCC=DDDEE002","sS":[{"sCI":"S0001","n":"signalgroupstatus"}],"mId":"859e189e-c973-4b40-90c4-45a7a25f2dda"}' }
let(:status_response_str) { '{"mType":"rSMsg","type":"StatusResponse","cId":"AA+BBCCC=DDDEE002","sTs":"2019-07-11T06:37:56.096Z","sS":[{"sCI":"S0001","n":"signalgroupstatus","s":"90","q":"recent"}],"mId":"0872f9f4-caee-4495-96ef-68a5cf56c993"}' }
let(:status_subscribe_str) { '{"mType":"rSMsg","type":"StatusSubscribe","ntsOId":"","xNId":"","cId":"AA+BBCCC=DDDEE002","sS":[{"sCI":"S0001","n":"signalgroupstatus","uRt":"4","sOc":"False"}],"mId":"6aee9e40-c6cb-4cd8-8b7a-3ee8906043c9"}' }
let(:status_subscribe_str) { '{"mType":"rSMsg","type":"StatusSubscribe","ntsOId":"","xNId":"","cId":"AA+BBCCC=DDDEE002","sS":[{"sCI":"S0001","n":"signalgroupstatus","uRt":"4","sOc":false}],"mId":"6aee9e40-c6cb-4cd8-8b7a-3ee8906043c9"}' }
let(:status_unsubscribe_str) { '{"mType":"rSMsg","type":"StatusUnsubscribe","ntsOId":"","xNId":"","cId":"AA+BBCCC=DDDEE002","sS":[{"sCI":"S0001","n":"signalgroupstatus"}],"mId":"bae361e1-7b26-48f3-9776-5aac815544da"}' }
let(:status_update_str) { '{"mType":"rSMsg","type":"StatusUpdate","cId":"AA+BBCCC=DDDEE002","sTs":"2019-07-11T06:37:56.103Z","sS":[{"sCI":"S0001","n":"signalgroupstatus","s":"98","q":"recent"}],"mId":"e0694101-4b8c-4832-9bd4-7ed598b247bd"}' }
let(:alarm_suspended) { '{"mType":"rSMsg","type":"Alarm","ntsOId":"","xNId":"","xACId":"","xNACId":"","aSp":"Suspend","cId":"TC","aCId":"A0301","aTs":"2022-08-24T13:35:07.058Z","ack":"notAcknowledged","sS":"suspended","aS":"inActive","cat":"D","pri":"2","rvs":[],"mId":"e2571baa-ce10-4f0b-aa7f-d50ae7881039"}' }
Expand Down

0 comments on commit b35d1a7

Please sign in to comment.