mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Enable Style/BracesAroundHashParameters rubocop cop
This commit is contained in:
parent
1e9d601483
commit
86eb9f9e0a
3 changed files with 6 additions and 3 deletions
|
|
@ -30,6 +30,9 @@ Security:
|
|||
Lint:
|
||||
Enabled: true
|
||||
|
||||
Style/BracesAroundHashParameters:
|
||||
Enabled: true
|
||||
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: true
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue