alexa_modelmd 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/alexa_modelmd.rb +58 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 499eae5acbf043e53bdd1e62cfd624bb57ffcebad1e4e23df34cf96711ae657d
|
4
|
+
data.tar.gz: 1ce53b8fa1435ea666cb4f73521b84d28f418cd7a8874df38d2bc693c8dd19a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2778c94dde9a5228261b7122b4ef49d9afd0670e5158e6da34f224501d863299aae47b23dfc055a309a4eaef1e47720899ef9d87117e81bb0ab900860c417ef
|
7
|
+
data.tar.gz: 422c9b8a4fb55e1dd27a0074ea5bbd31a70f2d6ee45bd421416b4b1fe09e22e276bc816a1afec3a65ce723aa1666134a2095a39ce77dbc9a3d80e61f87b0455d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/alexa_modelmd.rb
CHANGED
@@ -49,6 +49,10 @@ class AlexaModelMd < WikiMd
|
|
49
49
|
def to_modelb
|
50
50
|
Rexslt.new(modelbuilder_xslt(), to_xml()).to_s
|
51
51
|
end
|
52
|
+
|
53
|
+
def to_rsf
|
54
|
+
Rexslt.new(rsf_xslt(), to_xml(), debug: @debug).to_xml
|
55
|
+
end
|
52
56
|
|
53
57
|
def to_xml()
|
54
58
|
|
@@ -138,6 +142,60 @@ endpoint: <xsl:value-of select='summary/endpoint' />
|
|
138
142
|
</xsl:template>
|
139
143
|
|
140
144
|
|
145
|
+
</xsl:stylesheet>
|
146
|
+
EOF
|
147
|
+
end
|
148
|
+
|
149
|
+
def rsf_xslt()
|
150
|
+
<<EOF
|
151
|
+
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
|
152
|
+
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
|
153
|
+
|
154
|
+
<xsl:template match='model'>
|
155
|
+
<xsl:element name='skill'>
|
156
|
+
<xsl:text>
|
157
|
+
</xsl:text>
|
158
|
+
<xsl:apply-templates select='entries/entry' />
|
159
|
+
<xsl:text>
|
160
|
+
</xsl:text>
|
161
|
+
</xsl:element>
|
162
|
+
</xsl:template>
|
163
|
+
|
164
|
+
<xsl:template match='entries/entry'>
|
165
|
+
<xsl:text>
|
166
|
+
</xsl:text>
|
167
|
+
<xsl:comment><xsl:text> </xsl:text><xsl:value-of select='topic' /><xsl:text> </xsl:text></xsl:comment><xsl:text>
|
168
|
+
</xsl:text>
|
169
|
+
|
170
|
+
<xsl:apply-templates select='intents/intent' />
|
171
|
+
<xsl:text> </xsl:text><xsl:comment><xsl:text> // </xsl:text><xsl:value-of select='topic' /><xsl:text> </xsl:text></xsl:comment><xsl:text>
|
172
|
+
</xsl:text>
|
173
|
+
|
174
|
+
</xsl:template>
|
175
|
+
|
176
|
+
<xsl:template match='intents/intent'><xsl:text> </xsl:text>
|
177
|
+
<xsl:element name='response'>
|
178
|
+
<xsl:attribute name='id'><xsl:value-of select='name' /></xsl:attribute><xsl:text>
|
179
|
+
</xsl:text>
|
180
|
+
<xsl:element name='script'>
|
181
|
+
<xsl:text disable-output-escaping="yes">
|
182
|
+
<![CDATA[
|
183
|
+
</xsl:text>
|
184
|
+
<xsl:value-of select='code' />
|
185
|
+
<xsl:text disable-output-escaping="yes">
|
186
|
+
]]></xsl:text>
|
187
|
+
|
188
|
+
<xsl:text>
|
189
|
+
</xsl:text>
|
190
|
+
</xsl:element>
|
191
|
+
|
192
|
+
<xsl:text>
|
193
|
+
</xsl:text>
|
194
|
+
</xsl:element><xsl:text>
|
195
|
+
</xsl:text>
|
196
|
+
</xsl:template>
|
197
|
+
|
198
|
+
|
141
199
|
</xsl:stylesheet>
|
142
200
|
EOF
|
143
201
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alexa_modelmd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
RiKpAQ+I6BbdLUJTK2K+PB/nbZ6mul1+aS64XsSo/h49h7MP3lGxHFZyfX1RuE4j
|
36
36
|
Uv6UCmrr9La+izsyIDyQli0u
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-02-
|
38
|
+
date: 2019-02-02 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: wiki_md
|
metadata.gz.sig
CHANGED
Binary file
|