mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
style: enable Style/Semicolon rubocop
This commit is contained in:
parent
fcb89a6c12
commit
6541634fb0
3 changed files with 13 additions and 10 deletions
|
|
@ -68,5 +68,8 @@ Style/RedundantFreeze:
|
||||||
Style/RedundantSelf:
|
Style/RedundantSelf:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/Semicolon:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/SingleLineMethods:
|
Style/SingleLineMethods:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
||||||
|
|
@ -65,20 +65,20 @@ class Rack::Attack
|
||||||
tracks[name] = Track.new(name, options, &block)
|
tracks[name] = Track.new(name, options, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def safelists;
|
def safelists
|
||||||
@safelists ||= {};
|
@safelists ||= {}
|
||||||
end
|
end
|
||||||
|
|
||||||
def blocklists;
|
def blocklists
|
||||||
@blocklists ||= {};
|
@blocklists ||= {}
|
||||||
end
|
end
|
||||||
|
|
||||||
def throttles;
|
def throttles
|
||||||
@throttles ||= {};
|
@throttles ||= {}
|
||||||
end
|
end
|
||||||
|
|
||||||
def tracks;
|
def tracks
|
||||||
@tracks ||= {};
|
@tracks ||= {}
|
||||||
end
|
end
|
||||||
|
|
||||||
def safelisted?(request)
|
def safelisted?(request)
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@ module Rack
|
||||||
def stub_with_if_missing
|
def stub_with_if_missing
|
||||||
unless __getobj__.respond_to?(:with)
|
unless __getobj__.respond_to?(:with)
|
||||||
class << self
|
class << self
|
||||||
def with;
|
def with
|
||||||
yield __getobj__;
|
yield __getobj__
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue