style: enable Style/Semicolon rubocop

This commit is contained in:
Gonzalo Rodriguez 2019-03-01 22:25:27 -03:00
parent fcb89a6c12
commit 6541634fb0
No known key found for this signature in database
GPG key ID: 5DB8B81B049B8AB1
3 changed files with 13 additions and 10 deletions

View file

@ -68,5 +68,8 @@ Style/RedundantFreeze:
Style/RedundantSelf:
Enabled: true
Style/Semicolon:
Enabled: true
Style/SingleLineMethods:
Enabled: true

View file

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

View file

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