stealth 0.9.2 → 0.9.3

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: 7afe514bbdd62d9e4da0b6c5307986c04d885cc6
4
- data.tar.gz: f3f79181dfa0dfd103466f02b39f220e0eeab107
3
+ metadata.gz: d4d8bf015a587aee5dd4f1da0a2cddc1317036d3
4
+ data.tar.gz: a8d3888b2532d9504bcdbf0049a31354f02ab493
5
5
  SHA512:
6
- metadata.gz: 4635e842cafd7f888e1f3c90588231ac9ec938a6a7d58bc88a61aa10a55396103175715c302d32ee160d1eabb7deb31b6bdcaec63eee03d452f1542e623be126
7
- data.tar.gz: 78455052bce5e7cd23a19058f4c56eef60e7349653170e25342dd3dca512a83f8bc686b31e6743472a3c3d30b2698ba6a6ea1301f9c72f6017130abe4cc2f9b4
6
+ metadata.gz: a97b02e1818c1b0d465d3910a5fec85b24c3ce030da4cbe07adcf23008e2daeceacec1a33209710da67b24679b3e1cd0061a460db40fba8c93eae390be36d224
7
+ data.tar.gz: adfa7be72b22fe1d4d8cef6933a6ef3cf5213ef2ef531f6a17f2bbf7962d1343a3f0f34529234a490189d71154572201cf305cbbfbad93a760bacd4e2b79af05
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.9.3
@@ -131,7 +131,7 @@ module Stealth
131
131
  )
132
132
 
133
133
  fb_elements = generate_card_elements(elements: reply["details"]["elements"])
134
- template["message"]["attachments"]["payload"]["elements"] = fb_elements
134
+ template["message"]["attachment"]["payload"]["elements"] = fb_elements
135
135
 
136
136
  template
137
137
  end
@@ -202,10 +202,12 @@ module Stealth
202
202
  "id" => recipient_id
203
203
  },
204
204
  "message" => {
205
- "type" => "template",
206
- "payload" => {
207
- "template_type" => "generic",
208
- "elements" => []
205
+ "attachment" => {
206
+ "type" => "template",
207
+ "payload" => {
208
+ "template_type" => "generic",
209
+ "elements" => []
210
+ }
209
211
  }
210
212
  }
211
213
  }
@@ -227,10 +229,12 @@ module Stealth
227
229
  "id" => recipient_id
228
230
  },
229
231
  "message" => {
230
- "type" => "template",
231
- "payload" => {
232
- "template_type" => "list",
233
- "elements" => []
232
+ "attachment" => {
233
+ "type" => "template",
234
+ "payload" => {
235
+ "template_type" => "list",
236
+ "elements" => []
237
+ }
234
238
  }
235
239
  }
236
240
  }
@@ -255,8 +259,8 @@ module Stealth
255
259
  end
256
260
 
257
261
  def element_template(element_type:, element:)
258
- unless element["text"].present?
259
- raise(ArgumentError, "Facebook card and list elements must have a 'text' attribute.")
262
+ unless element["title"].present?
263
+ raise(ArgumentError, "Facebook card and list elements must have a 'title' attribute.")
260
264
  end
261
265
 
262
266
  template = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauricio Gomes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-27 00:00:00.000000000 Z
11
+ date: 2017-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  version: '0'
232
232
  requirements: []
233
233
  rubyforge_project:
234
- rubygems_version: 2.6.12
234
+ rubygems_version: 2.6.11
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: Ruby framework for conversational bots