mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
style: avoid compact class/module definitions
This commit is contained in:
parent
f5a352b8f9
commit
c8021da91c
3 changed files with 173 additions and 164 deletions
|
|
@ -41,6 +41,11 @@ Style/BlockDelimiters:
|
||||||
Style/BracesAroundHashParameters:
|
Style/BracesAroundHashParameters:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/ClassAndModuleChildren:
|
||||||
|
Enabled: true
|
||||||
|
Exclude:
|
||||||
|
- "spec/**/*"
|
||||||
|
|
||||||
Style/Encoding:
|
Style/Encoding:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@ require 'rack/attack/path_normalizer'
|
||||||
require 'rack/attack/request'
|
require 'rack/attack/request'
|
||||||
require "ipaddr"
|
require "ipaddr"
|
||||||
|
|
||||||
class Rack::Attack
|
module Rack
|
||||||
|
class Attack
|
||||||
class MisconfiguredStoreError < StandardError; end
|
class MisconfiguredStoreError < StandardError; end
|
||||||
class MissingStoreError < StandardError; end
|
class MissingStoreError < StandardError; end
|
||||||
|
|
||||||
|
|
@ -162,3 +163,4 @@ class Rack::Attack
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
def_delegators self, :safelisted?, :blocklisted?, :throttled?, :tracked?
|
def_delegators self, :safelisted?, :blocklisted?, :throttled?, :tracked?
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Rack::Attack
|
module Rack
|
||||||
|
class Attack
|
||||||
# When using Rack::Attack with a Rails app, developers expect the request path
|
# When using Rack::Attack with a Rails app, developers expect the request path
|
||||||
# to be normalized. In particular, trailing slashes are stripped.
|
# to be normalized. In particular, trailing slashes are stripped.
|
||||||
# (See https://git.io/v0rrR for implementation.)
|
# (See https://git.io/v0rrR for implementation.)
|
||||||
|
|
@ -22,3 +23,4 @@ class Rack::Attack
|
||||||
FallbackPathNormalizer
|
FallbackPathNormalizer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue