stealth-twilio 1.4.0 → 1.5.0

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
  SHA256:
3
- metadata.gz: 28f24f9143da55dcd8ffcb8dcedbe92110a1596876ea5b1b583168affaf4dfdf
4
- data.tar.gz: 1f79509e3720968a1d84ad8fc6b7409912117b4306b7a413a30aaecd6c0dbf23
3
+ metadata.gz: 31111a0f4b454d21f6e7185b2dbb7c1096f8cba37ccfe3f8ebae603cc9a59ec3
4
+ data.tar.gz: 06cbdac36831b7ac8fe16c5b3a965550a500fe042eb3fba7b775f24ecd6580b4
5
5
  SHA512:
6
- metadata.gz: fd360ba0993484889a8a31ed05682c890e1222629133f129f975514a556c54b92d613451d3f2252a888336bea576d9d3ab5b620c52bbd105767337b14fe281be
7
- data.tar.gz: 6558cc5fb42451d05130e6c7d7084b199ff1643c1edf5b411d3a33af07b86bf1e576fc8d8d9376a8f49991f04c251f1798274efc0f0f042ebc7f3a2dd4d04f34
6
+ metadata.gz: e541a94f861278886e11b1d12154070854cb695b78d28f602bb2285ea19e65dfb4e19bacceb555e27eca386ed0048311139d16b88b09df23a89ca23b7cfbab24
7
+ data.tar.gz: b7cd4e48704484dbf01ad75321350f613059fd5e2a6a7f508837e318ee9df839d902dfe20b735be206ab179b0360911d4f17806c32a66b3c6eb2b85936612e10
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
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.0
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-03-05 00:00:00.000000000 Z
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.2.32
125
+ rubygems_version: 3.3.7
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Stealth Twilio SMS driver