stealth-twilio 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/stealth/services/twilio/reply_handler.rb +9 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31111a0f4b454d21f6e7185b2dbb7c1096f8cba37ccfe3f8ebae603cc9a59ec3
|
4
|
+
data.tar.gz: 06cbdac36831b7ac8fe16c5b3a965550a500fe042eb3fba7b775f24ecd6580b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e541a94f861278886e11b1d12154070854cb695b78d28f602bb2285ea19e65dfb4e19bacceb555e27eca386ed0048311139d16b88b09df23a89ca23b7cfbab24
|
7
|
+
data.tar.gz: b7cd4e48704484dbf01ad75321350f613059fd5e2a6a7f508837e318ee9df839d902dfe20b735be206ab179b0360911d4f17806c32a66b3c6eb2b85936612e10
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
@@ -8,7 +8,7 @@ module Stealth
|
|
8
8
|
|
9
9
|
ALPHA_ORDINALS = ('A'..'Z').to_a.freeze
|
10
10
|
|
11
|
-
attr_reader :recipient_id, :reply
|
11
|
+
attr_reader :recipient_id, :reply, :translated_reply
|
12
12
|
|
13
13
|
def initialize(recipient_id: nil, reply: nil)
|
14
14
|
@recipient_id = recipient_id
|
@@ -18,20 +18,20 @@ module Stealth
|
|
18
18
|
def text
|
19
19
|
check_text_length
|
20
20
|
|
21
|
-
translated_reply = reply['text']
|
21
|
+
@translated_reply = reply['text']
|
22
22
|
|
23
23
|
suggestions = generate_suggestions(suggestions: reply['suggestions'])
|
24
24
|
buttons = generate_buttons(buttons: reply['buttons'])
|
25
25
|
|
26
26
|
if suggestions.present?
|
27
|
-
translated_reply = [
|
28
|
-
translated_reply,
|
27
|
+
@translated_reply = [
|
28
|
+
@translated_reply,
|
29
29
|
'Reply with:'
|
30
30
|
].join("\n\n")
|
31
31
|
|
32
32
|
suggestions.each_with_index do |suggestion, i|
|
33
|
-
translated_reply = [
|
34
|
-
translated_reply,
|
33
|
+
@translated_reply = [
|
34
|
+
@translated_reply,
|
35
35
|
"\"#{ALPHA_ORDINALS[i]}\" for #{suggestion}"
|
36
36
|
].join("\n")
|
37
37
|
end
|
@@ -39,14 +39,14 @@ module Stealth
|
|
39
39
|
|
40
40
|
if buttons.present?
|
41
41
|
buttons.each do |button|
|
42
|
-
translated_reply = [
|
43
|
-
translated_reply,
|
42
|
+
@translated_reply = [
|
43
|
+
@translated_reply,
|
44
44
|
button
|
45
45
|
].join("\n\n")
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
format_response({ body: translated_reply })
|
49
|
+
format_response({ body: @translated_reply })
|
50
50
|
end
|
51
51
|
|
52
52
|
def image
|
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: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauricio Gomes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: stealth
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
125
|
+
rubygems_version: 3.3.7
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Stealth Twilio SMS driver
|