mblox 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTUwMDM4OWViYzk1MGU1MDA2ZmVmNDA0Y2Y5YzZlYjg3MzdkYmI3Yw==
4
+ ZTljMzE5Yzc5NDZiZmYyNzcyNmZlMDA4MDAyMjJjZjJkYmJiNjBlYw==
5
5
  data.tar.gz: !binary |-
6
- ZWFlMjI4MzBlNGQ2NGU5Y2U0NjM0NTkwZDkyZTg1M2ViMTFiYmZkNQ==
6
+ YjdiZjViMTNmMDc0YTNjZDA3NDlkMjEyNzFkYmRkZWFlNzRjZGYxOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzUxYTJhZGFiZmI0OGY2OTM3YTU0YjlhOWY3NmQzOTBkMzM5NWNjMWFmOWVi
10
- YmQ1ZjU0ZmRmZjM0MTJiZmUyNjVjYTA5Y2MwMjA0YjFhYzA2NmVjNDFjN2Rl
11
- ZTM5YzZmYWI5YzQ5NDQwZjkxYTA2NzA5N2RmMTYxMTM0OThmYWI=
9
+ ZjlmY2NkNzFiNzYxMzNkYzBhZDIxZjM3ODFjZGE1NmZjZDAzMDk1YTYwMjlj
10
+ NWQyMWNjMTU5MGY4NjI4ZjcwZWE0ZWM0MWVhYzQ5MmE4MzcwMThkYjlkYTc0
11
+ MzU3NzQ3ZTgyZjNmZmM2MzY4OThlOTU5N2RiZGUzNTA4MTQzYzY=
12
12
  data.tar.gz: !binary |-
13
- M2U2ZWU5YzI2N2U4Njc1ZTJkYWU1M2VjMTkxODdiM2I0YWI3MjBmZDAwZjJj
14
- NzE5YjQ1NjEzYWRlNGVlZmU0Zjg1NzcxZWVjYTAzN2U4NWMzZjhiOWEzOTQz
15
- ZGRkMzUxYjYxNmI5NjU5NjY3ODIzMjUxMWQ1NjhjNzZhMWU5ZDM=
13
+ NGNkNGNiNTczNmY0NWVlZGNmZTVjZGFmYWFjMjFjY2Y5ODY4MWI3ZDE3YjI2
14
+ YmE3OTg3ZjlmY2I0OWIxYjY5ZWQxYzRjM2Q5ZmQyYmNhZDMzNDg0MzQ1NWI3
15
+ NGUxOTBkMjkzMzAxYWEwOTMxY2Y0ZDU0OWUzNTg3MGZmZDE2MWY=
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 3 SMS messages to your phone within several seconds.
59
+ You should recieve 4 SMS messages to your phone within several seconds.
60
60
 
61
61
  ## Contributing
62
62
 
data/lib/mblox/sms.rb CHANGED
@@ -12,7 +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
- ILLEGAL_CHARACTERS = /([^a-zA-Z0-9!"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿i¡ÄÅÆÇÉÑÖØÜßáäåæèéìñòöøùü\n\r\tí ])/
15
+ LEGAL_CHARACTERS = "~\`\!\"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿i¡ÄÅÆÇÉÑÖØÜßáäåæèéìñòöøóùüú\n\r\tí "
16
+ ILLEGAL_CHARACTERS = /([^a-zA-Z0-9#{LEGAL_CHARACTERS}])/
16
17
 
17
18
  attr_reader :phone, :message
18
19
 
data/lib/mblox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mblox
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
data/spec/sms_spec.rb CHANGED
@@ -133,7 +133,7 @@ describe Mblox::Sms do
133
133
  response.first.ok?.should be_false
134
134
  end
135
135
 
136
- "\r\n!\"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿iÄÅÆÇÉÑÖØÜßáäåæèéìñòöøùü\tí¡ ".each_char do |i|
136
+ Mblox::Sms::LEGAL_CHARACTERS.each_char do |i|
137
137
  it "allows the special char #{i}, correctly escaping illegal XML characters where necessary" do
138
138
  response = Mblox::Sms.new(LANDLINE,"#{the_message}#{i}#{the_message}").send
139
139
  response.size.should eq(1)
@@ -141,6 +141,12 @@ describe Mblox::Sms do
141
141
  response.first.unroutable?.should be_true
142
142
  end
143
143
  end
144
+
145
+ it "can send all the legal characters" do
146
+ response = Mblox::Sms.new(TEST_NUMBER,Mblox::Sms::LEGAL_CHARACTERS).send
147
+ response.size.should eq(1)
148
+ response.first.ok?.should be_true
149
+ end
144
150
  end
145
151
 
146
152
  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.6
4
+ version: 0.2.7
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 3 SMS messages to
179
+ all the values in that file. Run: rspec You should recieve 4 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`)