diff --git a/.rubocop.yml b/.rubocop.yml index 8e210a5..705a6a6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -68,5 +68,8 @@ Style/RedundantFreeze: Style/RedundantSelf: Enabled: true +Style/Semicolon: + Enabled: true + Style/SingleLineMethods: Enabled: true diff --git a/lib/rack/attack.rb b/lib/rack/attack.rb index 8066622..8c62e7d 100644 --- a/lib/rack/attack.rb +++ b/lib/rack/attack.rb @@ -65,20 +65,20 @@ class Rack::Attack tracks[name] = Track.new(name, options, &block) end - def safelists; - @safelists ||= {}; + def safelists + @safelists ||= {} end - def blocklists; - @blocklists ||= {}; + def blocklists + @blocklists ||= {} end - def throttles; - @throttles ||= {}; + def throttles + @throttles ||= {} end - def tracks; - @tracks ||= {}; + def tracks + @tracks ||= {} end def safelisted?(request) diff --git a/lib/rack/attack/store_proxy/dalli_proxy.rb b/lib/rack/attack/store_proxy/dalli_proxy.rb index 095bfb6..360e219 100644 --- a/lib/rack/attack/store_proxy/dalli_proxy.rb +++ b/lib/rack/attack/store_proxy/dalli_proxy.rb @@ -60,8 +60,8 @@ module Rack def stub_with_if_missing unless __getobj__.respond_to?(:with) class << self - def with; - yield __getobj__; + def with + yield __getobj__ end end end