alexa_modelbuilder 0.3.2 → 0.3.3
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +3 -4
- data/lib/alexa_modelbuilder.rb +21 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b2d806aee4b4ed4daddef4d0a35cec5f85244e3
|
4
|
+
data.tar.gz: da51e3ddfc2be1439135a3691b1e8bccb244d894
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66c0822010d222eab8e203afb708b6470c050394567e490ee8a3256baab3b1b5f978493c4a7426f6df875aa15f7973fb42eb6251315a27480dec3c99d2f0118f
|
7
|
+
data.tar.gz: ca532615364ca45a8e09e80a32e84c309ff47240094c631dac7cb56b147d22400454496678fcb84496a0742106195d0b75a915ea14ba9572fbda5c4e87cb0da6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
�c�Er.��<5�B<�5��sd�$v�f��µ2g����i
|
1
|
+
Q0�f��zu�~g(��ν�����{�B=L/ %o�"�f�;n^��q���d�����t��w�B�j�`C��-�wܓ��/0R=N��V"Hg����9�����)���s����ūZV0%��o�9�xΛ�8�p���V�U߰fg���@�r Ř�
|
2
|
+
���\��������}��ƫ�BW?;ъ^qU��Prl��XKqP��ݸ���8hvY����M
|
3
|
+
�¼@�~�c�λ��ݏτ&�y
|
data/lib/alexa_modelbuilder.rb
CHANGED
@@ -16,6 +16,14 @@ class AlexaModelBuilder
|
|
16
16
|
|
17
17
|
end
|
18
18
|
|
19
|
+
# fetch the intents from the document model
|
20
|
+
#
|
21
|
+
def intents()
|
22
|
+
self.to_h[:intent].map {|x| x.keys.first}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Read an Alexa Interaction Model (in JSON format)
|
26
|
+
#
|
19
27
|
def read(s)
|
20
28
|
|
21
29
|
h = JSON.parse(s, symbolize_names: true)
|
@@ -83,11 +91,17 @@ class AlexaModelBuilder
|
|
83
91
|
@h
|
84
92
|
end
|
85
93
|
|
94
|
+
# Returns a generated manifest from the document model
|
95
|
+
#
|
86
96
|
def to_manifest(json: false)
|
87
97
|
json ? JSON.pretty_generate(@manifest) : @manifest
|
88
98
|
end
|
89
99
|
|
90
|
-
|
100
|
+
|
101
|
+
# Builds an Alexa manifest from a hash object containing the values
|
102
|
+
# parsed from the document model
|
103
|
+
#
|
104
|
+
# A guideline of fields to include within the raw document
|
91
105
|
|
92
106
|
=begin
|
93
107
|
manifest
|
@@ -102,7 +116,7 @@ examplePhrases: [generate from intent utterances]
|
|
102
116
|
testingInstructions: input [generate from intent utterances]
|
103
117
|
endpoint: input
|
104
118
|
=end
|
105
|
-
|
119
|
+
#
|
106
120
|
def build_manifest(h)
|
107
121
|
|
108
122
|
manifest = {
|
@@ -183,10 +197,13 @@ endpoint: input
|
|
183
197
|
end
|
184
198
|
|
185
199
|
|
200
|
+
# Returns an Alexa Interaction model as a Hash object
|
201
|
+
#
|
186
202
|
def to_model(json: false)
|
187
203
|
json ? JSON.pretty_generate(@interact_model) : @interact_model
|
188
204
|
end
|
189
205
|
|
206
|
+
# Returns an Alexa Interaction Model in JSON format
|
190
207
|
def to_json(pretty: true)
|
191
208
|
pretty ? JSON.pretty_generate(@interact_model) : @interact_model.to_json
|
192
209
|
end
|
@@ -197,6 +214,8 @@ endpoint: input
|
|
197
214
|
|
198
215
|
private
|
199
216
|
|
217
|
+
# Parses the document model using the line-parser gem
|
218
|
+
#
|
200
219
|
def parse(lines)
|
201
220
|
|
202
221
|
puts 'inside parse' if @debug
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alexa_modelbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
EgZc9/Cpxo+WohlXR69qWm5QxX8PvdLu5ZjGD2OH5pBAPToJQyk9O8kZB9OdDMZT
|
31
31
|
tns=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-07-
|
33
|
+
date: 2018-07-28 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: lineparser
|
metadata.gz.sig
CHANGED
Binary file
|