mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
style: enabled Style/RedundantBegin rubocop
This commit is contained in:
parent
7dbb490c01
commit
8e3077c845
2 changed files with 6 additions and 5 deletions
|
|
@ -50,5 +50,8 @@ Style/FrozenStringLiteralComment:
|
||||||
Style/HashSyntax:
|
Style/HashSyntax:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/RedundantBegin:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/RedundantFreeze:
|
Style/RedundantFreeze:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,9 @@ if RUBY_ENGINE == "ruby"
|
||||||
end
|
end
|
||||||
|
|
||||||
def safe_require(name)
|
def safe_require(name)
|
||||||
begin
|
require name
|
||||||
require name
|
rescue LoadError
|
||||||
rescue LoadError
|
nil
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
safe_require "connection_pool"
|
safe_require "connection_pool"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue