Fix Style/RescueStandardError and Style/RegexpLiteral

This commit is contained in:
Luis Ramos
2020-10-30 16:40:40 +00:00
parent b0e889be2a
commit ca1373a366
3 changed files with 2 additions and 18 deletions

View File

@@ -1281,22 +1281,6 @@ Style/NumericPredicate:
- 'lib/spree/money_decorator.rb'
- 'lib/tasks/sample_data.rake'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Exclude:
- 'lib/spree/core/controller_helpers/auth.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit
Style/RescueStandardError:
Exclude:
- 'lib/spree/core/delegate_belongs_to.rb'
# Offense count: 231
Style/Send:
Exclude:

View File

@@ -43,7 +43,7 @@ module Spree
end
end
disallowed_urls.map!{ |url| url[/\/\w+$/] }
disallowed_urls.map!{ |url| url[%r{/\w+$}] }
return if disallowed_urls.include?(request.fullpath)
session['spree_user_return_to'] = request.fullpath.gsub('//', '/')

View File

@@ -61,7 +61,7 @@ module DelegateBelongsTo
methods.reject!{ |x| default_rejected_delegate_columns.include?(x.to_s) }
end
methods
rescue
rescue StandardError
[]
end