mblox 0.2.7 → 0.2.8
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 +8 -8
- data/README.md +1 -1
- data/lib/mblox/sms.rb +2 -2
- data/lib/mblox/version.rb +1 -1
- data/spec/sms_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2M2NzBjYjMwNDk4NDkzOWUwZDNjMWZjNTgzZjYxNzY2MGNlMDM0Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjkyYjAwZWQ0ZTE5NjVhZThmMThhZjQyOWJlZDc0YzAwMzI3ZGE1Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmIyODJiOGQ4OWI0MDc3MDI1ZmFkZmFjNjVlMzAxYzllYjUzNTg3Y2M3ZmY0
|
10
|
+
ODEyNzYxNmU0OTg5MTM5MmZmN2NiZjE5MGI1ODdkYzFlMGYzZmRhODdmMjdh
|
11
|
+
NzY3MjlhZWRhNzNmYWRmYTY3MzI1NmNkNjQ3MTVhYzVmN2IxYTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDE3NTljM2NjNjkzODcyNDg5MTljZGM5ZDgzNDliY2E0YjRhY2FhNjgzMzJi
|
14
|
+
Y2M4MTM5OGEwMWZiNjY0ODBhNGEzN2Q0OGUxMTkyYzUzOGRlNjdjZDRiYmNj
|
15
|
+
ZWIyNzI2YzA0OTcxNGE1NmQ5MjQwODJmZWQ3ZDRkZTI2MzA1OWU=
|
data/README.md
CHANGED
@@ -56,7 +56,7 @@ Copy config.yml.example to config.yml and set all the values in that file. Run:
|
|
56
56
|
|
57
57
|
rspec
|
58
58
|
|
59
|
-
You should recieve
|
59
|
+
You should recieve 5 SMS messages to your phone within several seconds.
|
60
60
|
|
61
61
|
## Contributing
|
62
62
|
|
data/lib/mblox/sms.rb
CHANGED
@@ -12,8 +12,8 @@ module Mblox
|
|
12
12
|
class BatchIdOutOfRangeError < ::ArgumentError; end
|
13
13
|
MAX_LENGTH = 160
|
14
14
|
MAX_SECTION_LENGTH = MAX_LENGTH - "(MSG XXX/XXX): ".size
|
15
|
-
LEGAL_CHARACTERS = "
|
16
|
-
ILLEGAL_CHARACTERS = /([^a-zA-Z0-9#{LEGAL_CHARACTERS}])/
|
15
|
+
LEGAL_CHARACTERS = "~\`!\"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿i¡ÄÅÆÇÉÑÖØÜßáäåæèéìñòöøóùüú\n\r\tí "
|
16
|
+
ILLEGAL_CHARACTERS = /([^a-zA-Z0-9#{LEGAL_CHARACTERS}\\])/
|
17
17
|
|
18
18
|
attr_reader :phone, :message
|
19
19
|
|
data/lib/mblox/version.rb
CHANGED
data/spec/sms_spec.rb
CHANGED
@@ -147,6 +147,12 @@ describe Mblox::Sms do
|
|
147
147
|
response.size.should eq(1)
|
148
148
|
response.first.ok?.should be_true
|
149
149
|
end
|
150
|
+
|
151
|
+
it "can send a backslash" do
|
152
|
+
response = Mblox::Sms.new(TEST_NUMBER,'\\').send
|
153
|
+
response.size.should eq(1)
|
154
|
+
response.first.ok?.should be_true
|
155
|
+
end
|
150
156
|
end
|
151
157
|
|
152
158
|
describe "batch_id" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mblox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Betesh
|
@@ -176,7 +176,7 @@ summary: ! '# Mblox This gem is for subscribers to Mblox to send SMS messages.
|
|
176
176
|
to sending to must be a 10-digit number, including the area code. Can be a String
|
177
177
|
or Fixnum. phone_number = 2225555555 # or: phone_number = "2225555555" Mblox::Sms.new(phone_number,
|
178
178
|
"your message").send ## Testing Copy config.yml.example to config.yml and set
|
179
|
-
all the values in that file. Run: rspec You should recieve
|
179
|
+
all the values in that file. Run: rspec You should recieve 5 SMS messages to
|
180
180
|
your phone within several seconds. ## Contributing 1. Fork it 2. Create your feature
|
181
181
|
branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am
|
182
182
|
''Add some feature''`) 4. Push to the branch (`git push origin my-new-feature`)
|