lib/mblox/sms.rb in mblox-0.2.7 vs lib/mblox/sms.rb in mblox-0.2.8

- old
+ new

@@ -10,11 +10,11 @@ class InvalidPhoneNumberError < ::ArgumentError; end class InvalidMessageError < ::ArgumentError; end class BatchIdOutOfRangeError < ::ArgumentError; end MAX_LENGTH = 160 MAX_SECTION_LENGTH = MAX_LENGTH - "(MSG XXX/XXX): ".size - LEGAL_CHARACTERS = "~\`\!\"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿i¡ÄÅÆÇÉÑÖØÜßáäåæèéìñòöøóùüú\n\r\tí " - ILLEGAL_CHARACTERS = /([^a-zA-Z0-9#{LEGAL_CHARACTERS}])/ + LEGAL_CHARACTERS = "~\`!\"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿i¡ÄÅÆÇÉÑÖØÜßáäåæèéìñòöøóùüú\n\r\tí " + ILLEGAL_CHARACTERS = /([^a-zA-Z0-9#{LEGAL_CHARACTERS}\\])/ attr_reader :phone, :message ON_MESSAGE_TOO_LONG_HANDLER = { :raise_error => Proc.new { raise InvalidMessageError, "Message cannot be longer than #{MAX_LENGTH} characters" },