From e42bae10bebdcde12a4381320397621c4fbf5d6a Mon Sep 17 00:00:00 2001 From: Stephen <519327+stevieing@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:06:34 +0000 Subject: [PATCH] Rubocopped. Fixed warning. --- .rubocop.yml | 2 +- lib/tasks/config.rake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2abb74ea..0ed0db94 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -24,7 +24,7 @@ Rails/ActionControllerTestCase: Enabled: false Metrics/BlockLength: - IgnoredMethods: + AllowedMethods: - describe - context - background diff --git a/lib/tasks/config.rake b/lib/tasks/config.rake index 471cd404..d7cc08f8 100644 --- a/lib/tasks/config.rake +++ b/lib/tasks/config.rake @@ -18,7 +18,7 @@ namespace :config do configuration[:searches] = {}.tap do |searches| puts 'Preparing searches ...' - api.search.all.each do |search| + api.search.find_each do |search| searches[search.name] = search.uuid end end @@ -55,7 +55,7 @@ namespace :config do configuration[:transfer_templates] = {}.tap do |transfer_templates| # Plates puts 'Preparing transfer templates ...' - api.transfer_template.all.each do |template| + api.transfer_template.find_each do |template| next unless ['Whole plate to tube', 'Transfer columns 1-12', 'Flip Plate', 'Transfer between specific tubes'].include?(template.name) transfer_templates[template.name] = template.uuid end @@ -63,7 +63,7 @@ namespace :config do configuration[:lot_types] = {}.tap do |lot_types| puts 'Preparing lot types ...' - api.lot_type.all.each do |lot_type| + api.lot_type.find_each do |lot_type| lot_types[lot_type.name] = { uuid: lot_type.uuid, template_class: lot_type.template_class, printer_type: lot_type.printer_type, qcable_name: lot_type.qcable_name } end end @@ -72,7 +72,7 @@ namespace :config do puts 'Preparing purposes ...' puts '... plates' raise 'No default purpose configuration specified.' if Gatekeeper::Application.config.default_purpose_handler.nil? - api.plate_purpose.all.each do |plate_purpose| + api.plate_purpose.find_each do |plate_purpose| # Loads the default purpose info if Gatekeeper::Application.config.default_purpose_handler[:child_name] == plate_purpose.name configuration[:default_purpose] = Gatekeeper::Application.config.default_purpose_handler.merge( @@ -88,7 +88,7 @@ namespace :config do }.merge(Gatekeeper::Application.config.purpose_handlers[plate_purpose.name] || {}) end puts '... tubes' - api.tube_purpose.all.each do |tube_purpose| + api.tube_purpose.find_each do |tube_purpose| next unless Gatekeeper::Application.config.tracked_purposes.include?(tube_purpose.name) purpose[tube_purpose.uuid] = { name: tube_purpose.name,