Fix Rails/Output cop (#24687)
parent
5a2aa06a51
commit
2e43461100
|
@ -1388,13 +1388,6 @@ Rails/NegateInclude:
|
||||||
- 'app/workers/web/push_notification_worker.rb'
|
- 'app/workers/web/push_notification_worker.rb'
|
||||||
- 'lib/paperclip/color_extractor.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:
|
Rails/OutputSafety:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'config/initializers/simple_form.rb'
|
- 'config/initializers/simple_form.rb'
|
||||||
|
|
|
@ -108,9 +108,9 @@ module Mastodon
|
||||||
IpBlock.where(severity: :no_access).find_each do |ip_block|
|
IpBlock.where(severity: :no_access).find_each do |ip_block|
|
||||||
case options[:format]
|
case options[:format]
|
||||||
when 'nginx'
|
when 'nginx'
|
||||||
puts "deny #{ip_block.ip}/#{ip_block.ip.prefix};"
|
say "deny #{ip_block.ip}/#{ip_block.ip.prefix};"
|
||||||
else
|
else
|
||||||
puts "#{ip_block.ip}/#{ip_block.ip.prefix}"
|
say "#{ip_block.ip}/#{ip_block.ip.prefix}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue