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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b20c6194beeaa1d8fb84f9ce5a59c3f9bf549b0b7d5d5a1637e2a04747d06e21
4
- data.tar.gz: 712fbd8174c146dba3bc30b56d50d771998b0c163dd72bd3fb7a0aa6a5fb6f1a
3
+ metadata.gz: 499eae5acbf043e53bdd1e62cfd624bb57ffcebad1e4e23df34cf96711ae657d
4
+ data.tar.gz: 1ce53b8fa1435ea666cb4f73521b84d28f418cd7a8874df38d2bc693c8dd19a7
5
5
  SHA512:
6
- metadata.gz: c89604e28796aafd4ed1a051d71fc960e24cad40ea9c620e5d05dd41b18bdcf1957f80ef58e2d6386fe94b798beada50b418c76d0039e8543abd61a2b133dfcd
7
- data.tar.gz: dadea5aa25be37daf2dbbb62c6f6772d0403bf35e6c9c635f2fc6b465eaf5ded93b15cdca81243faded6375b9e40ad27ed7bd53b471a800a725bed7885cc9f5c
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
+ &lt;![CDATA[
183
+ </xsl:text>
184
+ <xsl:value-of select='code' />
185
+ <xsl:text disable-output-escaping="yes">
186
+ ]]&gt;</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.2.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-01 00:00:00.000000000 Z
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