Remove Rubocop inline directives

This commit is contained in:
Artur Beljajev 2018-06-07 19:17:16 +03:00
parent 66dd10302d
commit c44f3df7f5
28 changed files with 5 additions and 169 deletions

View file

@ -26,13 +26,9 @@ class DomainNameValidator < ActiveModel::EachValidator
value = SimpleIDN.to_unicode(value).mb_chars.downcase.strip
end
# rubocop: disable Metrics/LineLength
unicode_chars = /\u00E4\u00F5\u00F6\u00FC\u0161\u017E/ # äõöüšž
regexp = /\A[a-zA-Z0-9#{unicode_chars.source}][a-zA-Z0-9#{unicode_chars.source}-]{0,61}[a-zA-Z0-9#{unicode_chars.source}]\.#{general_domains.source}\z/
# rubocop: enable Metrics/LineLength
# rubocop: disable Style/DoubleNegation
!!(value =~ regexp)
# rubocop: enable Style/DoubleNegation
end
def validate_blocked(value)