From 5962d39afab09f0ee18846f88fd15013a17bd725 Mon Sep 17 00:00:00 2001 From: Lee Sheppard Date: Sat, 16 Dec 2023 14:11:42 +1100 Subject: [PATCH] Rubocop fixes --- .rubocop.yml | 1 + app/lib/mailing_list/create_webhooks.rb | 2 +- app/lib/mailing_list/setup.rb | 2 +- app/lib/mailing_list/sync.rb | 2 +- lib/tasks/users.rake | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7f238c0..46a30a5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,6 +12,7 @@ AllCops: - 'node_modules/**/*' DisplayCopNames: true TargetRubyVersion: 3.0 + NewCops: disable Layout/LineLength: Enabled: false diff --git a/app/lib/mailing_list/create_webhooks.rb b/app/lib/mailing_list/create_webhooks.rb index b0006a1..bcbbc80 100644 --- a/app/lib/mailing_list/create_webhooks.rb +++ b/app/lib/mailing_list/create_webhooks.rb @@ -2,7 +2,7 @@ class MailingList::CreateWebhooks def self.call - MailingList.all.find_each do |list| + MailingList.all.find do |list| new(list).call end end diff --git a/app/lib/mailing_list/setup.rb b/app/lib/mailing_list/setup.rb index 4dd9b00..ce9db92 100644 --- a/app/lib/mailing_list/setup.rb +++ b/app/lib/mailing_list/setup.rb @@ -2,7 +2,7 @@ class MailingList::Setup def self.call(user) - MailingList.all.find_each do |list| + MailingList.all.find do |list| new(user, list).call end end diff --git a/app/lib/mailing_list/sync.rb b/app/lib/mailing_list/sync.rb index 752b03d..173e6f1 100644 --- a/app/lib/mailing_list/sync.rb +++ b/app/lib/mailing_list/sync.rb @@ -2,7 +2,7 @@ class MailingList::Sync def self.call - MailingList.all.find_each do |list| + MailingList.all.find do |list| new(list).call end end diff --git a/lib/tasks/users.rake b/lib/tasks/users.rake index a4017a7..032dcc3 100644 --- a/lib/tasks/users.rake +++ b/lib/tasks/users.rake @@ -3,7 +3,7 @@ namespace :users do task unsubscribe_spammers: :environment do User.unconfirmed.subscribed_to_any_list.each do |user| - MailingList.all.find_each do |list| + MailingList.all.find do |list| next unless user.mailing_lists[list.name] == "true" begin