alexa_skillresponse 0.1.4 → 0.1.5
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 +32 -6
- 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: de4bae67e8384cac33492ac076d3b71150e46a504cfc89d35f1605d027003dec
|
4
|
+
data.tar.gz: 822fd05e3b2c889759df10a2bb728dd42bae343836f843a093599f2b99edecab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 130b2e9e51643b846cc18a0d97eaacf6f171c559859e7d35d6b932439fb681b6dbd1c65ac614b1cf90ff4a7a972e779d57cc5d6ac2eb8ec55612420f817f26aa
|
7
|
+
data.tar.gz: 72e58fb4fb03e9a97e90bd8a304a98e4ffa9864d9e97c4137e1eb1f65e0e366b1831c670cf6cc648886936adb013ba6ddad3644ce8e0001413ff34eeaf488135
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/alexa_skillresponse.rb
CHANGED
@@ -62,7 +62,9 @@ class AlexaSkillResponse
|
|
62
62
|
|
63
63
|
rsc = @rsc
|
64
64
|
puts 'rsc found'.info if @debug
|
65
|
+
|
65
66
|
if rsc.registry and user and device then
|
67
|
+
|
66
68
|
puts ('sending to the registry').info if @debug
|
67
69
|
rsc.registry.set_key("hkey_apps/alexa/users/" +
|
68
70
|
user.downcase.gsub(/\W+/,'_') + "/lastsession/device", device)
|
@@ -71,17 +73,41 @@ class AlexaSkillResponse
|
|
71
73
|
|
72
74
|
puts 'code:' + code.inspect if @debug
|
73
75
|
text, mimetype = eval(code)
|
76
|
+
|
77
|
+
return ssml_output text if text =~ /<speak/
|
78
|
+
|
79
|
+
case mimetype
|
80
|
+
when 'application/json'
|
81
|
+
txt_output text
|
82
|
+
when 'application/ssml'
|
83
|
+
ssml_output text
|
84
|
+
else
|
85
|
+
txt_output text, attentive: attr[:attentive]
|
86
|
+
end
|
74
87
|
|
75
|
-
|
76
|
-
|
77
|
-
output text, attentive: attr[:attentive]
|
78
|
-
=begin
|
79
|
-
=end
|
88
|
+
|
80
89
|
end
|
81
90
|
|
82
91
|
private
|
92
|
+
|
93
|
+
def ssml_output(s)
|
94
|
+
|
95
|
+
h = {
|
96
|
+
version: "1.0",
|
97
|
+
response: {
|
98
|
+
outputSpeech: {
|
99
|
+
type: "SSML",
|
100
|
+
ssml: ""
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
h[:response][:outputSpeech][:ssml] = s
|
106
|
+
|
107
|
+
h
|
108
|
+
end
|
83
109
|
|
84
|
-
def
|
110
|
+
def txt_output(s='I hear you', attentive: false)
|
85
111
|
|
86
112
|
h = {
|
87
113
|
version: "1.0",
|
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.5
|
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: 2019-
|
33
|
+
date: 2019-04-29 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rscript
|
metadata.gz.sig
CHANGED
Binary file
|