mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
style: enable Style/RaiseArgs rubocop
This commit is contained in:
parent
92bc56b7b7
commit
2240e8f2c6
2 changed files with 4 additions and 1 deletions
|
|
@ -50,6 +50,9 @@ Style/FrozenStringLiteralComment:
|
||||||
Style/HashSyntax:
|
Style/HashSyntax:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/RaiseArgs:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/RedundantBegin:
|
Style/RedundantBegin:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ module Rack
|
||||||
def initialize(name, options, block)
|
def initialize(name, options, block)
|
||||||
@name, @block = name, block
|
@name, @block = name, block
|
||||||
MANDATORY_OPTIONS.each do |opt|
|
MANDATORY_OPTIONS.each do |opt|
|
||||||
raise ArgumentError.new("Must pass #{opt.inspect} option") unless options[opt]
|
raise ArgumentError, "Must pass #{opt.inspect} option" unless options[opt]
|
||||||
end
|
end
|
||||||
@limit = options[:limit]
|
@limit = options[:limit]
|
||||||
@period = options[:period].respond_to?(:call) ? options[:period] : options[:period].to_i
|
@period = options[:period].respond_to?(:call) ? options[:period] : options[:period].to_i
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue