smess 1.0.5 → 1.0.6

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: bfda4dab3491c3d330309d126e50c9f57e39ba5c
4
- data.tar.gz: c46314bbba0a491a7fa9b6b442cc3f5fc490cb0e
3
+ metadata.gz: 7d27bd662c404443430183629296cecbc62c362a
4
+ data.tar.gz: 643bb0580e883812d0cdd393f79b0beafb9ea322
5
5
  SHA512:
6
- metadata.gz: 8812e709f447971d3e37395953749c6dbd4ed149426ef850f7a9b44d0a2262318fe835b6e26830890be578cb1c9ef1e9aec54711f762d8c759188c410fd5d802
7
- data.tar.gz: 16336412133c3b916ef2de6bf3c92f76279e52d92674fc2c823a17060e11604bd523749c94c3ec066a1254510585a349965c023112bac9404673831e248bc443
6
+ metadata.gz: db8efdce52b1018f4d685a9cee3932284888fd683e4c6c01201966a9e3101a9b6ed9e39e0aa8ef55f443d1b3789fbed1a47c081dbad992cde5f3bd0bb3f88393
7
+ data.tar.gz: da1094b2d4cedcbbe341a03b638117e5e5100d4699126827f311a1314ffdb6f2426983ebbbd8389ab121591d7e8e500b3085b3fbe7d7078297c75e9751843214
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smess (1.0.4)
4
+ smess (1.0.5)
5
5
  activesupport (>= 3.0)
6
6
  clickatell
7
7
  httpi
@@ -30,7 +30,7 @@ GEM
30
30
  builder (>= 2.1.2)
31
31
  httpi (1.1.1)
32
32
  rack
33
- i18n (0.6.5)
33
+ i18n (0.6.9)
34
34
  jahtml_formatter (1.0.5)
35
35
  rspec (~> 2.14)
36
36
  jwt (0.1.8)
@@ -38,10 +38,10 @@ GEM
38
38
  mail (2.5.4)
39
39
  mime-types (~> 1.16)
40
40
  treetop (~> 1.4.8)
41
- mime-types (1.25)
42
- mini_portile (0.5.1)
41
+ mime-types (1.25.1)
42
+ mini_portile (0.5.2)
43
43
  minitest (4.7.5)
44
- multi_json (1.8.0)
44
+ multi_json (1.8.2)
45
45
  nokogiri (1.6.0)
46
46
  mini_portile (~> 0.5.0)
47
47
  nori (1.1.5)
@@ -72,11 +72,11 @@ GEM
72
72
  treetop (1.4.15)
73
73
  polyglot
74
74
  polyglot (>= 0.3.1)
75
- twilio-ruby (3.11.0)
75
+ twilio-ruby (3.11.4)
76
76
  builder (>= 2.1.2)
77
77
  jwt (>= 0.1.2)
78
78
  multi_json (>= 1.3.0)
79
- tzinfo (0.3.37)
79
+ tzinfo (0.3.38)
80
80
  wasabi (2.5.1)
81
81
  httpi (~> 1.0)
82
82
  nokogiri (>= 1.4.0)
@@ -7,5 +7,11 @@ module Smess
7
7
  "ICONECTIV"
8
8
  end
9
9
 
10
+ # iConectiv asserts that this is all that is still reqquired and that it wont break other carriers.
11
+ # test of major carriers confirm this too... let's see how the small ones do.
12
+ def perform_operator_adaptation(msisdn)
13
+ adapt_for_t_mobile_us msisdn
14
+ end
15
+
10
16
  end
11
17
  end
@@ -35,13 +35,9 @@ module Smess
35
35
  Smess.separate_sms(sms.message.strip_nongsm_chars).reject {|s| s.empty? }
36
36
  end
37
37
 
38
- def client
39
- @client ||= ::Twilio::REST::Client.new(ENV["SMESS_TWILIO_SID"], ENV["SMESS_TWILIO_AUTH_TOKEN"])
40
- end
41
-
42
38
  def send_one_sms(message)
43
39
  begin
44
- response = client.account.sms.messages.create({
40
+ response = create_client_message({
45
41
  from: from,
46
42
  to: "+#{sms.to}",
47
43
  body: message,
@@ -54,6 +50,14 @@ module Smess
54
50
  result
55
51
  end
56
52
 
53
+ def create_client_message(params)
54
+ client.account.sms.messages.create(params)
55
+ end
56
+
57
+ def client
58
+ @client ||= ::Twilio::REST::Client.new(ENV["SMESS_TWILIO_SID"], ENV["SMESS_TWILIO_AUTH_TOKEN"])
59
+ end
60
+
57
61
  def normal_result(response)
58
62
  response_code = response.status
59
63
  response_code = "0" unless response.status == "failed"
@@ -1,3 +1,3 @@
1
1
  module Smess
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smess
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Westin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-12 00:00:00.000000000 Z
11
+ date: 2014-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec