alexa_utteranceresponder 0.1.0 → 0.1.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/alexa_utteranceresponder.rb +15 -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: ef9a23e338ad6adf6bb99849783c06f41c6635251f7b2af226254ad994030319
|
|
4
|
+
data.tar.gz: ac25b386b57ac8ec2e05c15b8455c816c6a2827640a79015926dce1ea05c30d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0ec28afb698533fae5c2d44a24f587296b067718beddd29303538835d0ac88f35aaba2fa56c2c9904ed58579cb85fbd717ffed1ac1234d2464732a7355174fc
|
|
7
|
+
data.tar.gz: 98d0706467e303bd09bc10796d64ff1f2abc1bf457a78a648a1f439a9b7c87f1f6042370dc93953687b7d7f33b5c2b1c652dab996421979b8fc526a934412af3
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
|
@@ -23,7 +23,7 @@ class AlexaUtteranceResponder
|
|
|
23
23
|
@models = modelmds.inject({}) do |r,x|
|
|
24
24
|
|
|
25
25
|
amb = AlexaModelBuilder.new(x)
|
|
26
|
-
r.merge(amb.invocation => amb)
|
|
26
|
+
r.merge(amb.invocation || amb.name => amb)
|
|
27
27
|
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -48,17 +48,27 @@ class AlexaUtteranceResponder
|
|
|
48
48
|
r2 = s.downcase.gsub(/,/,'').match(regex)
|
|
49
49
|
|
|
50
50
|
puts ' debugger: r2: ' + r2.inspect if @debug
|
|
51
|
-
puts
|
|
51
|
+
puts
|
|
52
|
+
|
|
53
|
+
model_id = if r2 then
|
|
54
|
+
return respond() if r2[:action] == 'open'
|
|
55
|
+
r2[:invocation]
|
|
56
|
+
else
|
|
57
|
+
|
|
58
|
+
# attempt to find the request from utterances in all skills
|
|
59
|
+
found = @models.detect {|key, model| model.utterances.include s }
|
|
60
|
+
id, _ = found if found
|
|
61
|
+
end
|
|
52
62
|
|
|
53
63
|
return "hmmm, I don't know that one." unless r2
|
|
54
|
-
|
|
64
|
+
|
|
55
65
|
|
|
56
66
|
puts '@models: ' + @models.inspect if @debug
|
|
57
|
-
amb = @models[
|
|
67
|
+
amb = @models[model_id]
|
|
58
68
|
puts 'amb: ' + amb.inspect if @debug
|
|
59
69
|
|
|
60
70
|
aio = AskIO.new(amb.to_manifest, amb.to_model, debug: @debug,
|
|
61
|
-
userid: @userid, deviceid: deviceid)
|
|
71
|
+
userid: @userid, deviceid: deviceid, modelid: model_id)
|
|
62
72
|
|
|
63
73
|
puts 'request: ' + r2[:request].inspect if @debug
|
|
64
74
|
r = aio.ask r2[:request], &blk
|
|
@@ -68,4 +78,3 @@ class AlexaUtteranceResponder
|
|
|
68
78
|
end
|
|
69
79
|
|
|
70
80
|
end
|
|
71
|
-
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alexa_utteranceresponder
|
|
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
|
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
|
35
35
|
et+EBeqz/UE1cHo1UQJ46zhnSgmyJAzu7CkkRXvmAL/vpbmZMsnwwMHlqzNFUj3Y
|
|
36
36
|
B0fryIJrom9l8P6WHMK+0kWS
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
|
-
date: 2019-12-
|
|
38
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: askio
|
metadata.gz.sig
CHANGED
|
Binary file
|