smess 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f53211a7d1f13d0f6473fe676f52b3b8ac5c93b
4
- data.tar.gz: d8c881d72332e0e5ab8c703135a8ac6b2953818b
3
+ metadata.gz: f232022239ca55009627ad67ee16bd5f5e493885
4
+ data.tar.gz: 73d9a6886dbbf049aba069fc0db0bc002a571b78
5
5
  SHA512:
6
- metadata.gz: fbb9670d7c107825c14c8accede384d7fd832a737a451bc5e6638d15b0ec642440118bdaec880039bd9a7dc9e8737a8e6978379a5bfb22162a2218d72de06664
7
- data.tar.gz: 02b9055eca23a7b427aef52c59f120290f05f1b4c459309a94857bdebe4babd79128c2543a07ba3884d801d39299b96a8d68a6adf628e3cae94eb59bbd498f86
6
+ metadata.gz: 5569c0d2cd1d35342209a2a55f51489d181cf9d1cb854949b665c7da0f8b36081967726d05d18ddf35f6e72404c4fa636f659d9dc274fb329906ff1801e84265
7
+ data.tar.gz: 259e15b912d452c543ada8268aa51c2c8f6712453c89c15e73ddcddcb3dff3431ccb500fa1ae6587d4a2a2dafdba699b505085dd5df220e7c05b4366a1ee1c60
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smess (2.0.3)
5
- activesupport (>= 3.0)
6
- clickatell
7
- httpi
8
- mail
4
+ smess (2.0.4)
5
+ activesupport (>= 3.0.0, < 7.0.0)
6
+ clickatell (~> 0)
7
+ httpi (~> 1.1)
8
+ mail (~> 2.7)
9
9
  savon (= 1.2.0)
10
- twilio-ruby (>= 5.26.0, <= 5.30.0)
10
+ twilio-ruby (~> 5.26)
11
11
 
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (5.2.4)
15
+ activesupport (5.2.4.1)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 0.7, < 2)
18
18
  minitest (~> 5.1)
@@ -22,17 +22,17 @@ GEM
22
22
  nokogiri
23
23
  builder (3.2.4)
24
24
  clickatell (0.8.2)
25
- concurrent-ruby (1.1.5)
25
+ concurrent-ruby (1.1.6)
26
26
  diff-lcs (1.3)
27
27
  docile (1.3.2)
28
28
  dotenv (2.7.5)
29
- faraday (0.17.1)
29
+ faraday (1.0.0)
30
30
  multipart-post (>= 1.2, < 3)
31
31
  gyoku (0.4.6)
32
32
  builder (>= 2.1.2)
33
33
  httpi (1.1.1)
34
34
  rack
35
- i18n (1.7.0)
35
+ i18n (1.8.2)
36
36
  concurrent-ruby (~> 1.0)
37
37
  json (2.3.0)
38
38
  jwt (2.2.1)
@@ -40,25 +40,25 @@ GEM
40
40
  mini_mime (>= 0.1.1)
41
41
  mini_mime (1.0.2)
42
42
  mini_portile2 (2.4.0)
43
- minitest (5.13.0)
43
+ minitest (5.14.0)
44
44
  multipart-post (2.1.1)
45
- nokogiri (1.10.7)
45
+ nokogiri (1.10.9)
46
46
  mini_portile2 (~> 2.4.0)
47
47
  nori (1.1.5)
48
- rack (2.0.7)
48
+ rack (2.2.2)
49
49
  rspec (3.9.0)
50
50
  rspec-core (~> 3.9.0)
51
51
  rspec-expectations (~> 3.9.0)
52
52
  rspec-mocks (~> 3.9.0)
53
- rspec-core (3.9.0)
54
- rspec-support (~> 3.9.0)
55
- rspec-expectations (3.9.0)
53
+ rspec-core (3.9.1)
54
+ rspec-support (~> 3.9.1)
55
+ rspec-expectations (3.9.1)
56
56
  diff-lcs (>= 1.2.0, < 2.0)
57
57
  rspec-support (~> 3.9.0)
58
- rspec-mocks (3.9.0)
58
+ rspec-mocks (3.9.1)
59
59
  diff-lcs (>= 1.2.0, < 2.0)
60
60
  rspec-support (~> 3.9.0)
61
- rspec-support (3.9.0)
61
+ rspec-support (3.9.2)
62
62
  savon (1.2.0)
63
63
  akami (~> 1.2.0)
64
64
  builder (>= 2.1.2)
@@ -73,11 +73,11 @@ GEM
73
73
  simplecov-html (~> 0.10.0)
74
74
  simplecov-html (0.10.2)
75
75
  thread_safe (0.3.6)
76
- twilio-ruby (5.30.0)
77
- faraday (~> 0.9)
76
+ twilio-ruby (5.31.6)
77
+ faraday (~> 1.0.0)
78
78
  jwt (>= 1.5, <= 2.5)
79
79
  nokogiri (>= 1.6, < 2.0)
80
- tzinfo (1.2.5)
80
+ tzinfo (1.2.6)
81
81
  thread_safe (~> 0.1)
82
82
  wasabi (2.5.1)
83
83
  httpi (~> 1.0)
@@ -21,6 +21,7 @@ module Smess
21
21
  @platform_id = config.fetch(:platform_id)
22
22
  @platform_partner_id = config.fetch(:platform_partner_id)
23
23
  @gate_id = config.fetch(:gate_id)
24
+ @sender_id = config.fetch(:sender_id, @sender_id)
24
25
  end
25
26
 
26
27
  private
@@ -29,9 +30,18 @@ module Smess
29
30
  config.fetch(:url)
30
31
  end
31
32
 
33
+ def sourceTON
34
+ if !from.nil? && from[0] == "+"
35
+ "MSISDN"
36
+ else
37
+ "ALPHANUMERIC"
38
+ end
39
+ end
40
+
32
41
  def body
33
42
  {
34
43
  source: from,
44
+ sourceTON: sourceTON,
35
45
  destination: "+#{sms.to}",
36
46
  userData: sms.message.strip_nongsm_chars,
37
47
  platformId: platform_id,
@@ -1,3 +1,3 @@
1
1
  module Smess
2
- VERSION = '2.0.4'
2
+ VERSION = '2.0.5'
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: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Westin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-12 00:00:00.000000000 Z
11
+ date: 2020-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec