Skip to content

Commit

Permalink
Merge pull request #344 from rsmp-nordic/sOc_boolean
Browse files Browse the repository at this point in the history
update rsmp gem, use native boolean for sOc
  • Loading branch information
emiltin committed Nov 21, 2023
2 parents f1a8f9d + b658958 commit 6c11682
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
30 changes: 12 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,40 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
async (2.6.4)
async (2.6.5)
console (~> 1.10)
fiber-annotation
io-event (~> 1.1)
timers (~> 4.1)
async-io (1.36.0)
async-io (1.36.1)
async
colorize (0.8.1)
concurrent-ruby (1.2.2)
console (1.23.2)
fiber-annotation
fiber-local
diff-lcs (1.5.0)
ecma-re-validator (0.4.0)
regexp_parser (~> 2.2)
fiber-annotation (0.2.0)
fiber-local (1.0.0)
hana (1.3.7)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-event (1.3.2)
json_schemer (0.2.25)
ecma-re-validator (~> 0.3)
io-event (1.3.3)
json_schemer (2.1.0)
hana (~> 1.3)
regexp_parser (~> 2.0)
simpleidn (~> 0.2)
uri_template (~> 0.7)
minitest (5.18.0)
rake (13.0.6)
regexp_parser (2.8.1)
rsmp (0.24.0)
regexp_parser (2.8.2)
rsmp (0.25.0)
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)
json_schemer (~> 0.2.21)
thor (~> 1.2.1)
rsmp_schema (~> 0.5.1)
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 @@ -60,14 +55,13 @@ GEM
rspec-support (3.12.0)
simpleidn (0.2.1)
unf (~> 0.1.4)
thor (1.2.2)
thor (1.3.0)
timers (4.3.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
uri_template (0.7.0)
unf_ext (0.0.9.1)
yard (0.9.34)

PLATFORMS
Expand Down
4 changes: 2 additions & 2 deletions spec/site/tlc/signal_priority_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Validator::Site.connected do |task,supervisor,site|
prepare task, site
status_list = [{'sCI'=>'S0033','n'=>'status','uRt'=>'0'}]
status_list.map! { |item| item.merge!('sOc' => 'True') } if use_sOc?(site)
status_list.map! { |item| item.merge!('sOc' => true) } if use_sOc?(site)
wait_for_status task, 'signal priority status', status_list
end
end
Expand All @@ -65,7 +65,7 @@
component = Validator.config['main_component']
log "Subscribing to signal priority request status updates"
status_list = [{'sCI'=>'S0033','n'=>'status','uRt'=>'0'}]
status_list.map! { |item| item.merge!('sOc' => 'True') } if use_sOc?(site)
status_list.map! { |item| item.merge!('sOc' => true) } if use_sOc?(site)
site.subscribe_to_status component, status_list

# start collector
Expand Down
2 changes: 1 addition & 1 deletion spec/site/tlc/subscribe_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
component = Validator.config['main_component']

status_list = [{'sCI'=>'S0001','n'=>'signalgroupstatus','uRt'=>'1'}]
status_list.map! { |item| item.merge!('sOc' => 'False') } if use_sOc?(site)
status_list.map! { |item| item.merge!('sOc' => false) } if use_sOc?(site)

site.subscribe_to_status component, status_list, collect!: {
timeout: Validator.config['timeouts']['status_update']
Expand Down
2 changes: 1 addition & 1 deletion spec/support/command_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def wait_normal_control timeout: Validator.config['timeouts']['startup_sequence'
def verify_startup_sequence &block
status_list = [{'sCI'=>'S0001','n'=>'signalgroupstatus'}]
subscribe_list = convert_status_list(status_list).map { |item| item.merge 'uRt'=>0.to_s }
subscribe_list.map! { |item| item.merge!('sOc' => 'False') } if use_sOc?(@site)
subscribe_list.map! { |item| item.merge!('sOc' => false) } if use_sOc?(@site)

unsubscribe_list = convert_status_list(status_list)
component = Validator.config['main_component']
Expand Down
2 changes: 1 addition & 1 deletion spec/support/status_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def wait_for_status parent_task, description, status_list,
update_rate = 0 unless update_rate
log "Wait for #{description}"
subscribe_list = convert_status_list(status_list).map { |item| item.merge 'uRt'=>update_rate.to_s }
subscribe_list.map! { |item| item.merge!('sOc' => 'False') } if use_sOc?(@site)
subscribe_list.map! { |item| item.merge!('sOc' => false) } if use_sOc?(@site)

begin
result = @site.subscribe_to_status Validator.config['main_component'], subscribe_list, collect!: {
Expand Down

0 comments on commit 6c11682

Please sign in to comment.