From b658958e90b5e297d3184d77d322689df04607d7 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Tue, 21 Nov 2023 14:13:05 +0100 Subject: [PATCH] update rsmp gem, use native boolean for sOc --- Gemfile.lock | 30 +++++++++++---------------- spec/site/tlc/signal_priority_spec.rb | 4 ++-- spec/site/tlc/subscribe_spec.rb | 2 +- spec/support/command_helpers.rb | 2 +- spec/support/status_helpers.rb | 2 +- 5 files changed, 17 insertions(+), 23 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cc007806..f2ea48df 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,12 +6,12 @@ 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) @@ -19,32 +19,27 @@ GEM 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) @@ -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 diff --git a/spec/site/tlc/signal_priority_spec.rb b/spec/site/tlc/signal_priority_spec.rb index 0e2cc8ec..ba6d3a0d 100644 --- a/spec/site/tlc/signal_priority_spec.rb +++ b/spec/site/tlc/signal_priority_spec.rb @@ -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 @@ -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 diff --git a/spec/site/tlc/subscribe_spec.rb b/spec/site/tlc/subscribe_spec.rb index 60b33e7a..5f0d6f77 100644 --- a/spec/site/tlc/subscribe_spec.rb +++ b/spec/site/tlc/subscribe_spec.rb @@ -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'] diff --git a/spec/support/command_helpers.rb b/spec/support/command_helpers.rb index 1c1bc8a0..27a09589 100644 --- a/spec/support/command_helpers.rb +++ b/spec/support/command_helpers.rb @@ -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'] diff --git a/spec/support/status_helpers.rb b/spec/support/status_helpers.rb index 51c0d5f7..9d6316db 100644 --- a/spec/support/status_helpers.rb +++ b/spec/support/status_helpers.rb @@ -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!: {