chore: rubocop

chore: fix api test conventions

chore: rubocop -A spec/

chore: more rubocop -A

fix failing test

rubocop fixes

removes helper methods that are in my opinion dead code

more rubocop fixes

rubocop -a --auto-gen-config
This commit is contained in:
Philipp Rothmann 2023-05-12 13:01:12 +02:00 committed by Philipp Rothmann
parent f6fb804bbe
commit fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions

View file

@ -4,23 +4,21 @@
namespace :multicoops do
desc 'Runs a specific rake task for each registered foodcoop, use rake multicoops:run TASK=db:migrate'
task :run => :environment do
task run: :environment do
task_to_run = ENV.fetch('TASK', nil)
last_error = nil
FoodsoftConfig.each_coop do |coop|
begin
rake_say "Run '#{task_to_run}' for #{coop}"
Rake::Task[task_to_run].execute
rescue => error
last_error = error
ExceptionNotifier.notify_exception(error, data: { foodcoop: coop })
end
rake_say "Run '#{task_to_run}' for #{coop}"
Rake::Task[task_to_run].execute
rescue StandardError => e
last_error = e
ExceptionNotifier.notify_exception(e, data: { foodcoop: coop })
end
raise last_error if last_error
end
desc 'Runs a specific rake task for a single coop, use rake mutlicoops:run_single TASK=db:migrate FOODCOOP=demo'
task :run_single => :environment do
task run_single: :environment do
task_to_run = ENV.fetch('TASK', nil)
FoodsoftConfig.select_foodcoop ENV.fetch('FOODCOOP', nil)
rake_say "Run '#{task_to_run}' for #{ENV.fetch('FOODCOOP', nil)}"