style: avoid compact class/module definitions

This commit is contained in:
Gonzalo Rodriguez 2019-08-02 11:17:41 -03:00
parent f5a352b8f9
commit c8021da91c
No known key found for this signature in database
GPG key ID: 5DB8B81B049B8AB1
3 changed files with 173 additions and 164 deletions

View file

@ -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

View file

@ -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

View file

@ -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