Fix Rails/Output cop (#24687)

lolsob-rspec
Matt Jankowski 2023-04-30 00:48:16 -04:00 committed by GitHub
parent 78f29479ab
commit 8a813615b0
2 changed files with 2 additions and 9 deletions

View File

@ -1388,13 +1388,6 @@ Rails/NegateInclude:
- 'app/workers/web/push_notification_worker.rb'
- 'lib/paperclip/color_extractor.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Include.
# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
Rails/Output:
Exclude:
- 'lib/mastodon/ip_blocks_cli.rb'
Rails/OutputSafety:
Exclude:
- 'config/initializers/simple_form.rb'

View File

@ -108,9 +108,9 @@ module Mastodon
IpBlock.where(severity: :no_access).find_each do |ip_block|
case options[:format]
when 'nginx'
puts "deny #{ip_block.ip}/#{ip_block.ip.prefix};"
say "deny #{ip_block.ip}/#{ip_block.ip.prefix};"
else
puts "#{ip_block.ip}/#{ip_block.ip.prefix}"
say "#{ip_block.ip}/#{ip_block.ip.prefix}"
end
end
end