rubocop: fix various style issues.

This commit is contained in:
evazion
2019-12-22 16:21:58 -06:00
parent 09f6a84660
commit 309821bf73
288 changed files with 912 additions and 962 deletions

2
script/fixes/049_spam_1.rb Normal file → Executable file
View File

@@ -13,7 +13,7 @@ BAD_TITLES = ["My collection", "hi", "My private videos", "My video", "hey", "My
spammers = Set.new(Dmail.where("dmails.from_id >= ? and dmails.created_at >= ? and is_spam = ?", MIN_USER_ID, MIN_DATE, true).joins("join users on users.id = dmails.from_id").where("users.name ~ '^[a-z0-9]+[0-9]{3,}$'").pluck("users.id").map(&:to_i).uniq)
new_spammers = Set.new
User.without_timeout do
User.without_timeout do
Dmail.where("created_at >= ? and is_spam = ?", MIN_DATE, false).find_each do |dmail|
from_name = dmail.from_name
if dmail.from_id >= MIN_USER_ID && from_name =~ NAME_REGEXP