stealth 0.9.3 → 0.9.4
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 +4 -4
- data/.circleci/config.yml +5 -3
- data/VERSION +1 -1
- data/lib/stealth/services/facebook/reply_handler.rb +13 -8
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a4af7e7416f2d060aa2f12b63ac3f94d256c6000
|
|
4
|
+
data.tar.gz: 8958f75e6f6fedda6185b3558da250c94b9d6aeb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd5de759d0da73005d9ccdb4a421365af1e4c33eb18ee69b6093b01747b9b6f73572c0d1eff67ad16d40afa247120c58f18bea9d56d4eefdcbef19be37a08995
|
|
7
|
+
data.tar.gz: a9b5a1439ea011a42bdc34b08de36fd980f11211576c6d84a070dc0fb656cae199f38e10423996d45a0f943eae92a5b5cfa5a066b8d07c1fc34f42e248e208a0
|
data/.circleci/config.yml
CHANGED
|
@@ -46,9 +46,11 @@ jobs:
|
|
|
46
46
|
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
|
47
47
|
|
|
48
48
|
bundle exec rspec --format progress \
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
--format RspecJunitFormatter \
|
|
50
|
+
--out /tmp/test-results/rspec.xml \
|
|
51
|
+
--format progress \
|
|
52
|
+
-- \
|
|
53
|
+
$TEST_FILES
|
|
52
54
|
|
|
53
55
|
# collect reports
|
|
54
56
|
- store_test_results:
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.4
|
|
@@ -126,30 +126,35 @@ module Stealth
|
|
|
126
126
|
|
|
127
127
|
def cards
|
|
128
128
|
template = card_template(
|
|
129
|
-
sharable: reply["
|
|
130
|
-
aspect_ratio: reply["
|
|
129
|
+
sharable: reply["sharable"],
|
|
130
|
+
aspect_ratio: reply["aspect_ratio"]
|
|
131
131
|
)
|
|
132
132
|
|
|
133
|
-
fb_elements = generate_card_elements(elements: reply["
|
|
133
|
+
fb_elements = generate_card_elements(elements: reply["elements"])
|
|
134
134
|
template["message"]["attachment"]["payload"]["elements"] = fb_elements
|
|
135
135
|
|
|
136
|
+
if reply['suggestions'].present?
|
|
137
|
+
fb_suggestions = generate_suggestions(suggestions: reply['suggestions'])
|
|
138
|
+
template["message"]["quick_replies"] = fb_suggestions
|
|
139
|
+
end
|
|
140
|
+
|
|
136
141
|
template
|
|
137
142
|
end
|
|
138
143
|
|
|
139
144
|
def list
|
|
140
145
|
template = list_template(
|
|
141
|
-
top_element_style: reply["
|
|
146
|
+
top_element_style: reply["top_element_style"]
|
|
142
147
|
)
|
|
143
148
|
|
|
144
|
-
fb_elements = generate_list_elements(elements: reply["
|
|
149
|
+
fb_elements = generate_list_elements(elements: reply["elements"])
|
|
145
150
|
template["message"]["attachments"]["payload"]["elements"] = fb_elements
|
|
146
151
|
|
|
147
|
-
if reply["
|
|
148
|
-
if reply["
|
|
152
|
+
if reply["buttons"].present?
|
|
153
|
+
if reply["buttons"].size > 1
|
|
149
154
|
raise(ArgumentError, "Facebook lists support a single button attached to the list itsef.")
|
|
150
155
|
end
|
|
151
156
|
|
|
152
|
-
template["message"]["attachments"]["payload"]["buttons"] = generate_buttons(buttons: reply["
|
|
157
|
+
template["message"]["attachments"]["payload"]["buttons"] = generate_buttons(buttons: reply["buttons"])
|
|
153
158
|
end
|
|
154
159
|
|
|
155
160
|
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.
|
|
4
|
+
version: 0.9.4
|
|
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-11-
|
|
11
|
+
date: 2017-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sinatra
|