alexa_skills_ruby 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fce21f8bad47a1e5948afe6003bacc579b5aa3dd
|
4
|
+
data.tar.gz: b47655c3d5852fdd3a6630838763b34cd56b8bed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e3f353b870d60b3b8b26cba29c858a7b282ea69f66fad8b11917d3dc2514e24aa8a2d602d41e56f2efbcb560fb4c45c11a84bd9c4d6bded3b9f25184f229b25
|
7
|
+
data.tar.gz: 6d1255014a9199173683651da175a1be359981aef6cebd7fde11b35ee0ccebc8804063610338819ed43ccdf51e883ca644a28d408822d9e2eeb6b50a7c551374
|
@@ -12,6 +12,10 @@ module AlexaSkillsRuby
|
|
12
12
|
|
13
13
|
def set_output_speech_text(text)
|
14
14
|
self.output_speech = OutputSpeech.text(text)
|
15
|
+
end
|
16
|
+
|
17
|
+
def set_output_speech_ssml(ssml)
|
18
|
+
self.output_speech = OutputSpeech.ssml(ssml)
|
15
19
|
end
|
16
20
|
|
17
21
|
def set_simple_card(title, content)
|
@@ -23,6 +27,13 @@ module AlexaSkillsRuby
|
|
23
27
|
rp = Reprompt.new
|
24
28
|
rp.output_speech = os
|
25
29
|
self.reprompt = rp
|
30
|
+
end
|
31
|
+
|
32
|
+
def set_reprompt_speech_ssml(ssml)
|
33
|
+
os = OutputSpeech.ssml(ssml)
|
34
|
+
rp = Reprompt.new
|
35
|
+
rp.output_speech = os
|
36
|
+
self.reprompt = rp
|
26
37
|
end
|
27
38
|
end
|
28
39
|
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module AlexaSkillsRuby
|
2
|
-
VERSION = '1.
|
3
|
-
end
|
2
|
+
VERSION = '1.1.0'
|
3
|
+
end
|
@@ -32,6 +32,35 @@ describe AlexaSkillsRuby::JsonObjects::SkillsResponse do
|
|
32
32
|
}
|
33
33
|
}
|
34
34
|
end
|
35
|
+
let(:response_json_ssml) do
|
36
|
+
{
|
37
|
+
'version' => "1.0",
|
38
|
+
'sessionAttributes' => {
|
39
|
+
'supportedHoriscopePeriods' => {
|
40
|
+
'daily' => true,
|
41
|
+
'weekly' => false,
|
42
|
+
'monthly' => false
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"response" => {
|
46
|
+
"shouldEndSession" => false,
|
47
|
+
"outputSpeech" => {
|
48
|
+
"type" => "SSML",
|
49
|
+
"ssml" => "<speak><p>I am in the first paragraph</p><p>I am in the second paragraph</p></speak>"
|
50
|
+
},
|
51
|
+
"card" => {
|
52
|
+
"type" => "Simple",
|
53
|
+
"title" => "Horoscope",
|
54
|
+
"content" => "Today will provide you a new learning opportunity. Stick with it and the possibilities will be endless." },
|
55
|
+
"reprompt" => {
|
56
|
+
"outputSpeech" => {
|
57
|
+
"type" => "SSML",
|
58
|
+
"ssml" => "<speak><p>I am reprompting that I am in the first paragraph</p><p>I am reprompting that I am I am in the second paragraph</p></speak>"
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
end
|
35
64
|
|
36
65
|
it 'generates example json' do
|
37
66
|
sr = AlexaSkillsRuby::JsonObjects::SkillsResponse.new
|
@@ -45,4 +74,16 @@ describe AlexaSkillsRuby::JsonObjects::SkillsResponse do
|
|
45
74
|
expect(sr.as_json).to eq response_json
|
46
75
|
end
|
47
76
|
|
48
|
-
|
77
|
+
it 'generates example json for ssml' do
|
78
|
+
sr = AlexaSkillsRuby::JsonObjects::SkillsResponse.new
|
79
|
+
r = sr.response
|
80
|
+
sr.session_attributes = { 'supportedHoriscopePeriods' => { 'daily' => true, 'weekly' => false, 'monthly' => false } }
|
81
|
+
r.set_output_speech_ssml("<speak><p>I am in the first paragraph</p><p>I am in the second paragraph</p></speak>")
|
82
|
+
r.set_simple_card('Horoscope', 'Today will provide you a new learning opportunity. Stick with it and the possibilities will be endless.')
|
83
|
+
r.set_reprompt_speech_ssml("<speak><p>I am reprompting that I am in the first paragraph</p><p>I am reprompting that I am I am in the second paragraph</p></speak>")
|
84
|
+
r.should_end_session = false
|
85
|
+
|
86
|
+
expect(sr.as_json).to eq response_json_ssml
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alexa_skills_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Elbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|