diff --git a/.rubocop.yml b/.rubocop.yml index c0d945b70..f06669aab 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,3 +13,8 @@ AllCops: - 'db/schema*.rb' - 'saas/db/migrate/**/*' - 'saas/db/saas_schema.rb' + +Style/NegatedIf: + Enabled: true +Style/NegatedUnless: + Enabled: true diff --git a/app/models/user/avatar.rb b/app/models/user/avatar.rb index 02e437630..bdc14ba77 100644 --- a/app/models/user/avatar.rb +++ b/app/models/user/avatar.rb @@ -39,7 +39,7 @@ module User::Avatar private def avatar_content_type_allowed - if !ALLOWED_AVATAR_CONTENT_TYPES.include?(avatar.content_type) + unless ALLOWED_AVATAR_CONTENT_TYPES.include?(avatar.content_type) errors.add(:avatar, "must be a JPEG, PNG, GIF, or WebP image") end end diff --git a/config/puma.rb b/config/puma.rb index 70ca6ebb4..d3e65c671 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -22,7 +22,7 @@ if Fizzy.saas? plugin :yabeda_prometheus end -if !Rails.env.local? +unless Rails.env.local? # Because we expect fewer I/O waits than Rails apps that connect to the # database over the network, let's start with a baseline config of 1 # worker per CPU, 1 thread per worker and tune it from there.