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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11f9acc985f926f95e13a0685994a8969f38f61b
4
- data.tar.gz: e0ee24092f333726e9845b036c5339c77b664742
3
+ metadata.gz: c710de5e6f145bf73eaa45526b77199d342c0364
4
+ data.tar.gz: 7fc5bf7da664aa494c2c5fcf7cb47faba6f118e4
5
5
  SHA512:
6
- metadata.gz: ad2dcd264712cf45cd848e5c08c39617ad4887e31aa79a89efc2dcff13a6e861cebc3743e9d9e80e9c23aec52eeff0049107dbeb3c7bed429bcd52dcb655f80f
7
- data.tar.gz: 8e336d77cc13322fb88a8b6f4e1d7da9217fa7ebd47926b64abca8b32d7154a72761e5be81854e97fb0e75846cef0bb0e754f39e54f5b4757b97e7c365b4eed3
6
+ metadata.gz: 61ff0597555d8687e9117bbe1a8072cc5c4758e845b915c39afa0ed8820f4c3fccab9062b8a642cd668de92cd5567ad8fac7d20351932c8b1a0154191d8f19bf
7
+ data.tar.gz: afa9600d8b582aa3971cdbfd08d4daf1145ef91f6d75e761d3d26bf232438c3313452978b653a6884c108a12ed5df7bf7eb6b100cc3664ab91769b5068c28414
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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.0
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-10 00:00:00.000000000 Z
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