mblox 0.6.0 → 0.6.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d2c1da153da2a5588a22d61cbcc07487c289863
4
- data.tar.gz: b2ae4e5d1be782d8d72273dcf33c6379038b751b
3
+ metadata.gz: c4afe4f1bb68705976b81afbcdac07d1a86f2752
4
+ data.tar.gz: a945756f97e91facdc964ddf88a97066b462480f
5
5
  SHA512:
6
- metadata.gz: 8ed41e839424e5100dbb082a872dd965dd49bbfed67ad48984060616542ada987692eb6395f89ac686e24f1c7890b6caa5490b004ca30c532ee76928f1232d62
7
- data.tar.gz: be52c74f37f65a1a2947481aca7bb287bf8aab149659bbd436dc6372b78d9773172895e962624055b03160f71f2578eaaff2b1572cd5551540b9511c026ba289
6
+ metadata.gz: 9c75e1e051744f8bfb70ce5bb627e1d8cb0973975cc690f9d5aae6dc39bb44af39d52be48d03fd33bb2548fe1b404dca088ae6a063be896361071fabef76e64a
7
+ data.tar.gz: d49aae35fc881f46aff618f3c59d21f15e7b9e00c3f5e137450a8dc7f583064fa6211cf3fe90408f62f9f586a884aad762f0a617bc43e913700c418f3b0352a2
@@ -11,6 +11,5 @@ module Mblox
11
11
 
12
12
  class Configuration
13
13
  attr_accessor :outbound_url, :profile_id, :sender_id, :password, :partner_name, :tariff, :service_id
14
- attr_reader :logger, :log_level, :on_message_too_long
15
14
  end
16
15
  end
@@ -10,13 +10,9 @@ module Mblox
10
10
  class Sms < SmsValidation::Sms
11
11
  class BatchIdOutOfRangeError < ::ArgumentError; end
12
12
  class InvalidSenderIdError < ::ArgumentError; end
13
- LEGAL_CHARACTERS = "~\`!\"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿i¡ÄÅÃÆÇÉÑÖØÜßâáäåãæçèéìíñòöøóùüú\n\r\t ©"
14
- ILLEGAL_CHARACTERS = /([^a-zA-Z0-9#{LEGAL_CHARACTERS}\\])/
15
13
 
16
14
  def initialize(phone, message, batch_id=nil)
17
15
  super(phone, message)
18
- illegal_characters = ILLEGAL_CHARACTERS.match(message).to_a
19
- raise InvalidMessageError, "Message cannot contain the following special characters: #{illegal_characters.uniq.join(', ')}" unless illegal_characters.size.zero?
20
16
  raise BatchIdOutOfRangeError, "batch_id must be in the range 1 to #{MAX_BATCH_ID}. The batch_id specified (#{batch_id}) is out of range." if !batch_id.blank? && (MAX_BATCH_ID < batch_id.to_i)
21
17
  @batch_id = batch_id.to_i unless batch_id.blank?
22
18
  end
@@ -1,3 +1,3 @@
1
1
  module Mblox
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.2"
3
3
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_runtime_dependency 'activemodel'
26
26
  spec.add_runtime_dependency 'activesupport'
27
27
  spec.add_runtime_dependency 'addressable'
28
- spec.add_runtime_dependency 'sms_validation'
28
+ spec.add_runtime_dependency 'sms_validation', ">= 0.0.2"
29
29
  spec.add_runtime_dependency 'builder'
30
30
  spec.add_runtime_dependency "nokogiri", ">= 1.5.0"
31
31
  end
@@ -179,24 +179,10 @@ describe Mblox::Sms do
179
179
  let(:phone_number) { LANDLINE }
180
180
 
181
181
  it { should_have_unroutable_response }
182
-
183
- described_class::LEGAL_CHARACTERS.each_char do |i|
184
- describe "when message contains legal character '#{i}'" do
185
- let(:message) { "#{super()}#{i}#{super()}" }
186
-
187
- it { should_have_unroutable_response }
188
- end
189
- end
190
- end
191
-
192
- describe "when message contains legal character '\'" do
193
- let(:message) { "#{super()}\A#{super()}" }
194
-
195
- it { should_have_ok_response }
196
182
  end
197
183
 
198
184
  describe "when all legal characters are in message" do
199
- let(:message) { described_class::LEGAL_CHARACTERS }
185
+ let(:message) { "#{described_class::LEGAL_CHARACTERS}\\" }
200
186
  it { should_have_ok_response }
201
187
  end
202
188
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mblox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Betesh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 0.0.2
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 0.0.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: builder
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  requirements: []
186
186
  rubyforge_project:
187
- rubygems_version: 2.4.3
187
+ rubygems_version: 2.2.2
188
188
  signing_key:
189
189
  specification_version: 4
190
190
  summary: '# Mblox This gem is for subscribers to Mblox to send SMS messages. ##