stealth-twilio 0.10.1 → 0.10.2

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
  SHA256:
3
- metadata.gz: bfc8a95cee816de6848cd04fbbfa49781b5368c774b74decc2538b4e8d77b1b5
4
- data.tar.gz: 2c714b1abaaffaa2b76fe4489b5272973187029832447f9d6bc98a2e077edfad
3
+ metadata.gz: 2eb5939a3f1f07e91101041a46fc50b8e1939b2eb2aae0ea49e847cdb6a2f0e3
4
+ data.tar.gz: 9845fa288b8d58fbfc48f4ed48f2fbf9c9df5f315d8a2e7ce5a9593ee0e677ca
5
5
  SHA512:
6
- metadata.gz: e20cf9108c6659f15a5dda90bdd25df851a26324113820d1e06d923ad8a2d1dd9594016d67c11baaa0cfd4bf783ba44a803ea6a7eb069afe2c53cf2b46edf7b5
7
- data.tar.gz: fd18922cbafde792e75bada15cf28f4624b5a060a74129835944c6b031116ac29ef0b6366b67c368c636283c04f4710e6e3ba77173e03f432777b9772980feec
6
+ metadata.gz: d142bb93915aa3d31ca257d11be4390a596cfa1fb440361bebd44c63fa3ebc85c73fa8f34a77f87774c658dd39327b6c0f9860d9f4fce3691acab657ea9f27f2
7
+ data.tar.gz: 3fd2660758d144bd964db3bacb9089c40ba57b24a9723b36d992a678a1f183921e7cabb9c487af080f6a7c7ecfb37207abfd186b3815194110ae0ce4a4e05a86
data/Gemfile.lock CHANGED
@@ -8,72 +8,33 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (5.2.1)
12
- actionview (= 5.2.1)
13
- activesupport (= 5.2.1)
14
- rack (~> 2.0)
15
- rack-test (>= 0.6.3)
16
- rails-dom-testing (~> 2.0)
17
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
- actionview (5.2.1)
19
- activesupport (= 5.2.1)
20
- builder (~> 3.1)
21
- erubi (~> 1.4)
22
- rails-dom-testing (~> 2.0)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
- activemodel (5.2.1)
25
- activesupport (= 5.2.1)
26
- activerecord (5.2.1)
27
- activemodel (= 5.2.1)
28
- activesupport (= 5.2.1)
29
- arel (>= 9.0)
30
- activesupport (5.2.1)
11
+ activesupport (5.2.2)
31
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
13
  i18n (>= 0.7, < 2)
33
14
  minitest (~> 5.1)
34
15
  tzinfo (~> 1.1)
35
- arel (9.0.0)
36
- builder (3.2.3)
37
- concurrent-ruby (1.0.5)
16
+ concurrent-ruby (1.1.4)
38
17
  connection_pool (2.2.2)
39
- crass (1.0.4)
40
18
  diff-lcs (1.3)
41
- erubi (1.7.1)
42
- faraday (0.15.3)
19
+ faraday (0.15.4)
43
20
  multipart-post (>= 1.2, < 3)
44
- i18n (1.1.1)
21
+ i18n (1.2.0)
45
22
  concurrent-ruby (~> 1.0)
46
23
  jwt (2.1.0)
47
- loofah (2.2.3)
48
- crass (~> 1.0.2)
49
- nokogiri (>= 1.5.9)
50
- method_source (0.9.0)
51
- mini_portile2 (2.3.0)
24
+ mini_portile2 (2.4.0)
52
25
  minitest (5.11.3)
53
26
  multi_json (1.13.1)
54
27
  multipart-post (2.0.0)
55
28
  mustermann (1.0.3)
56
- nokogiri (1.8.5)
57
- mini_portile2 (~> 2.3.0)
29
+ nokogiri (1.9.0)
30
+ mini_portile2 (~> 2.4.0)
58
31
  puma (3.12.0)
59
32
  rack (2.0.6)
60
33
  rack-protection (2.0.4)
61
34
  rack
62
35
  rack-test (1.1.0)
63
36
  rack (>= 1.0, < 3)
64
- rails-dom-testing (2.0.3)
65
- activesupport (>= 4.2.0)
66
- nokogiri (>= 1.6)
67
- rails-html-sanitizer (1.0.4)
68
- loofah (~> 2.2, >= 2.2.2)
69
- railties (5.2.1)
70
- actionpack (= 5.2.1)
71
- activesupport (= 5.2.1)
72
- method_source
73
- rake (>= 0.8.7)
74
- thor (>= 0.19.0, < 2.0)
75
- rake (12.3.1)
76
- redis (4.0.2)
37
+ redis (4.1.0)
77
38
  rspec (3.8.0)
78
39
  rspec-core (~> 3.8.0)
79
40
  rspec-expectations (~> 3.8.0)
@@ -89,7 +50,7 @@ GEM
89
50
  rspec-support (3.8.0)
90
51
  rspec_junit_formatter (0.4.1)
91
52
  rspec-core (>= 2, < 4, != 2.12.0)
92
- sidekiq (5.2.2)
53
+ sidekiq (5.2.3)
93
54
  connection_pool (~> 2.2, >= 2.2.2)
94
55
  rack-protection (>= 1.5.0)
95
56
  redis (>= 3.3.5, < 5)
@@ -98,19 +59,17 @@ GEM
98
59
  rack (~> 2.0)
99
60
  rack-protection (= 2.0.4)
100
61
  tilt (~> 2.0)
101
- stealth (1.0.4)
102
- activerecord (~> 5.2)
62
+ stealth (1.1.2)
103
63
  activesupport (~> 5.2)
104
64
  multi_json (~> 1.12)
105
65
  puma (~> 3.10)
106
- railties (~> 5.2)
107
66
  sidekiq (~> 5.0)
108
67
  sinatra (~> 2.0)
109
68
  thor (~> 0.20)
110
- thor (0.20.0)
69
+ thor (0.20.3)
111
70
  thread_safe (0.3.6)
112
- tilt (2.0.8)
113
- twilio-ruby (5.15.2)
71
+ tilt (2.0.9)
72
+ twilio-ruby (5.18.0)
114
73
  faraday (~> 0.9)
115
74
  jwt (>= 1.5, <= 2.5)
116
75
  nokogiri (>= 1.6, < 2.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.1
1
+ 0.10.2
@@ -4,9 +4,7 @@
4
4
  module Stealth
5
5
  module Services
6
6
  module Twilio
7
-
8
7
  class MessageHandler < Stealth::Services::BaseMessageHandler
9
-
10
8
  attr_reader :service_message, :params, :headers
11
9
 
12
10
  def initialize(params:, headers:)
@@ -31,20 +29,13 @@ module Stealth
31
29
  service_message.message = params['Body']
32
30
 
33
31
  # Check for media attachments
34
- attachment_count = 0
35
- begin
36
- attachment_count = Integer(params['NumMedia'])
37
- rescue ArgumentError
38
-
39
- end
32
+ attachment_count = params['NumMedia'].to_i
40
33
 
41
- if attachment_count > 0
42
- for i in (0..attachment_count) do
43
- service_message.attachments << {
44
- type: params["MediaContentType#{i}"],
45
- url: params["MediaUrl#{i}"]
46
- }
47
- end
34
+ attachment_count.times do |i|
35
+ service_message.attachments << {
36
+ type: params["MediaContentType#{i}"],
37
+ url: params["MediaUrl#{i}"]
38
+ }
48
39
  end
49
40
 
50
41
  service_message
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stealth-twilio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauricio Gomes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-29 00:00:00.000000000 Z
11
+ date: 2018-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stealth