rubocop update, now it's green

This commit is contained in:
Priit Tamboom 2014-10-10 16:11:28 +03:00
parent 2d6ed7fa45
commit 8d189023c7
29 changed files with 190 additions and 54 deletions

View file

@ -28,10 +28,14 @@ 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}][a-zA-Z0-9#{unicode_chars}-]{0,61}[a-zA-Z0-9#{unicode_chars}]#{general_domains}\z/
# rubocop: enable Metrics/LineLength
# rubocop: disable Style/DoubleNegation
!!(value =~ regexp)
# rubocop: enable Style/DoubleNegation
end
def validate_reservation(value)