diff --git a/.rubocop.yml b/.rubocop.yml index df5df76c2..faef60521 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -21,3 +21,17 @@ Metrics/LineLength: Exclude: - 'lib/app/modules/**/*' - 'lib/app/helpers/browser_logic.rb' + +Metrics/AbcSize: + Exclude: + - 'lib/app/endpoint/oauth2_endpoints.rb' + - 'lib/app/endpoint/test_set_endpoints.rb' + +Metrics/MethodLength: + Exclude: + - 'lib/app/endpoint/oauth2_endpoints.rb' + - 'lib/app/endpoint/test_set_endpoints.rb' + +Metrics/PerceivedComplexity: + Exclude: + - 'lib/app/endpoint/oauth2_endpoints.rb' diff --git a/lib/app/endpoint/test_set_endpoints.rb b/lib/app/endpoint/test_set_endpoints.rb index b19963a41..c58ef8cdf 100644 --- a/lib/app/endpoint/test_set_endpoints.rb +++ b/lib/app/endpoint/test_set_endpoints.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Inferno class App module TestSetEndpoints @@ -11,10 +13,14 @@ def self.included(klass) halt 404 if test_set.nil? sequence_results = instance.latest_results_by_case - erb instance.module.view_by_test_set(params[:test_set_id]), {}, instance: instance, - test_set: test_set, - sequence_results: sequence_results, - error_code: params[:error] + erb( + instance.module.view_by_test_set(params[:test_set_id]), + {}, + instance: instance, + test_set: test_set, + sequence_results: sequence_results, + error_code: params[:error] + ) end get '/:id/test_sets/:test_set_id/report?' do @@ -152,12 +158,15 @@ def self.included(klass) out << js_stayalive(timer_count * stayalive_timer_seconds) end - out << erb(instance.module.view_by_test_set(params[:test_set_id]), {}, instance: instance, - test_set: test_set, - sequence_results: instance.latest_results_by_case, - tests_running: true, - test_group: test_group.id - ) + out << erb( + instance.module.view_by_test_set(params[:test_set_id]), + {}, + instance: instance, + test_set: test_set, + sequence_results: instance.latest_results_by_case, + tests_running: true, + test_group: test_group.id + ) next_test_case = submitted_test_cases.shift finished = next_test_case.nil?