alexa_skillresponse 0.1.0 → 0.1.1
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_skillresponse.rb +8 -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: c710de5e6f145bf73eaa45526b77199d342c0364
|
4
|
+
data.tar.gz: 7fc5bf7da664aa494c2c5fcf7cb47faba6f118e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61ff0597555d8687e9117bbe1a8072cc5c4758e845b915c39afa0ed8820f4c3fccab9062b8a642cd668de92cd5567ad8fac7d20351932c8b1a0154191d8f19bf
|
7
|
+
data.tar.gz: afa9600d8b582aa3971cdbfd08d4daf1145ef91f6d75e761d3d26bf232438c3313452978b653a6884c108a12ed5df7bf7eb6b100cc3664ab91769b5068c28414
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/alexa_skillresponse.rb
CHANGED
@@ -8,10 +8,12 @@ require 'rscript'
|
|
8
8
|
|
9
9
|
class AlexaSkillResponse
|
10
10
|
|
11
|
-
def initialize(package, debug: false)
|
11
|
+
def initialize(package, debug: false, rsc: nil)
|
12
|
+
|
12
13
|
@rscript = RScript.new(type: 'response', debug: debug)
|
13
|
-
@package, @debug = package, debug
|
14
|
+
@package, @debug, @rsc = package, debug, rsc
|
14
15
|
puts '@package: ' + @package.inspect if @debug
|
16
|
+
|
15
17
|
end
|
16
18
|
|
17
19
|
def run(h)
|
@@ -21,12 +23,16 @@ class AlexaSkillResponse
|
|
21
23
|
puts 'id: ' + id.inspect if @debug
|
22
24
|
|
23
25
|
code, _, attr = @rscript.read ['//response:' + id, @package]
|
26
|
+
rsc = @rsc if @rsc
|
24
27
|
text, mimetype = eval(code)
|
25
28
|
|
26
29
|
return out if mimetype == 'application/json'
|
27
30
|
|
28
31
|
output text, attr[:attentive]
|
32
|
+
|
29
33
|
end
|
34
|
+
|
35
|
+
private
|
30
36
|
|
31
37
|
def output(s='I hear you', attentive)
|
32
38
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alexa_skillresponse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
LlGV+1M7EF/3KD6gOhEYz1EWlT542WsvEMRT4NNheh4sollCx//BxyUcXIXUB3Af
|
31
31
|
vMQ=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-07-
|
33
|
+
date: 2018-07-12 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rscript
|
metadata.gz.sig
CHANGED
Binary file
|