Enable Style/BracesAroundHashParameters rubocop cop

This commit is contained in:
Gonzalo Rodriguez 2018-06-19 17:55:24 -03:00
parent 1e9d601483
commit 86eb9f9e0a
No known key found for this signature in database
GPG key ID: 5DB8B81B049B8AB1
3 changed files with 6 additions and 3 deletions

View file

@ -30,6 +30,9 @@ Security:
Lint:
Enabled: true
Style/BracesAroundHashParameters:
Enabled: true
Style/FrozenStringLiteralComment:
Enabled: true

View file

@ -18,11 +18,11 @@ module Rack
end
def read(name, options = {})
super(name, options.merge!({ raw: true }))
super(name, options.merge!(raw: true))
end
def write(name, value, options = {})
super(name, value, options.merge!({ raw: true }))
super(name, value, options.merge!(raw: true))
end
end
end

View file

@ -37,7 +37,7 @@ describe 'Rack::Attack.throttle' do
it 'should tag the env' do
last_request.env['rack.attack.matched'].must_equal 'ip/sec'
last_request.env['rack.attack.match_type'].must_equal :throttle
last_request.env['rack.attack.match_data'].must_equal({ :count => 2, :limit => 1, :period => @period })
last_request.env['rack.attack.match_data'].must_equal(:count => 2, :limit => 1, :period => @period)
last_request.env['rack.attack.match_discriminator'].must_equal('1.2.3.4')
end