alexa_skills_ruby 1.0.0 → 1.1.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
  SHA1:
3
- metadata.gz: 51b36b59de95199d06f652746412db9e4c079f93
4
- data.tar.gz: 228715baaf0c2b52a3b5686c342b463fb7a69773
3
+ metadata.gz: fce21f8bad47a1e5948afe6003bacc579b5aa3dd
4
+ data.tar.gz: b47655c3d5852fdd3a6630838763b34cd56b8bed
5
5
  SHA512:
6
- metadata.gz: f24e5ef81403c726452728d74e0f66015f182244e78dcb8564a0d934d922fc06afea6c097a45fb8a21d5e248eacf26fc0d71f4c173dc3dfc4af0b103d752cc57
7
- data.tar.gz: 50a2b116aa410629118124a902b5e6ea9164212f54d2f04ebd261e7f05494f2c93c86bae7945d4260e4b116c33a621e599ac88195078281575d0e22777586866
6
+ metadata.gz: 3e3f353b870d60b3b8b26cba29c858a7b282ea69f66fad8b11917d3dc2514e24aa8a2d602d41e56f2efbcb560fb4c45c11a84bd9c4d6bded3b9f25184f229b25
7
+ data.tar.gz: 6d1255014a9199173683651da175a1be359981aef6cebd7fde11b35ee0ccebc8804063610338819ed43ccdf51e883ca644a28d408822d9e2eeb6b50a7c551374
@@ -50,9 +50,11 @@ module AlexaSkillsRuby
50
50
  if c.subject == chain.first.issuer
51
51
  failed = false
52
52
  chain.unshift(c)
53
+ certs.delete(c)
53
54
  elsif c.issuer == chain.last.subject
54
55
  failed = false
55
56
  chain << c
57
+ certs.delete(c)
56
58
  end
57
59
  end
58
60
  end
@@ -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.0.0'
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
- end
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.0.0
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: 2016-12-30 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport