cm-sms 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cm_sms/gem_version.rb +1 -1
- data/lib/cm_sms/message.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 264589e20031771ae99c172b25f781893395a3ca
|
|
4
|
+
data.tar.gz: a375e75c644de9589dc05aa50a19081e633db0a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4fac8c38cff00e77d9fdda76257902aaefc208597ade87118ed9c95e8e15e9be5296a672ec9ac16987c573ebdfb7ab67213ced3a9514aad0fe9d9595730fdecd
|
|
7
|
+
data.tar.gz: 2bcb26b0fa9dc1e546a3bda460f3199d6e0106690f22c17951e96c0920aad14d12d47eb1f55c34fc2edd5ffc3a144652d6877fce3b0d205231000ac324d615bf
|
data/lib/cm_sms/gem_version.rb
CHANGED
data/lib/cm_sms/message.rb
CHANGED
|
@@ -4,7 +4,7 @@ require 'cm_sms/request'
|
|
|
4
4
|
|
|
5
5
|
module CmSms
|
|
6
6
|
class Message
|
|
7
|
-
class
|
|
7
|
+
class FromTooLong < ArgumentError; end
|
|
8
8
|
class FromMissing < ArgumentError; end
|
|
9
9
|
class ToMissing < ArgumentError; end
|
|
10
10
|
class BodyMissing < ArgumentError; end
|
|
@@ -69,8 +69,8 @@ module CmSms
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def deliver!
|
|
72
|
-
raise SenderTooLong.new('The value for the sender attribute must contain 1..11 characters.') unless sender_length?
|
|
73
72
|
raise FromMissing.new('The value for the from attribute is missing.') unless sender_present?
|
|
73
|
+
raise FromTooLong.new('The value for the sender attribute must contain 1..11 characters.') unless sender_length?
|
|
74
74
|
raise ToMissing.new('The value for the to attribute is missing.') unless receiver_present?
|
|
75
75
|
raise BodyMissing.new('The body of the message is missing.') unless body_present?
|
|
76
76
|
raise BodyTooLong.new('The body of the message has a length greater than 160.') unless body_correct_length?
|