alexa_skillsimulator 0.2.1 → 0.2.2
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_skillsimulator.rb +11 -4
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eda4c8521fe356ac3e21e4eb12ff8b34f3cebb90
|
4
|
+
data.tar.gz: 19569c55e3729175c9ca234e9dce2053ca5b96cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce586ca8ba2d70fe334a63575331611136e0f9f449fdeee6a605cb5e62c4afb02668834317016b2eee2f35aeea2d189018d0e7e5759560b319c2f00217639b9e
|
7
|
+
data.tar.gz: 7f3fdafe5ecea8292ee26375ad78646f04c356535eeefac50fc5facce88daab7e6d03cbe057ab9d7a2ba5fe94d232934ab6c9d720aa61c1aee4d598e0f114b02
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/alexa_skillsimulator.rb
CHANGED
@@ -10,9 +10,10 @@ require 'securerandom'
|
|
10
10
|
|
11
11
|
class AlexaShell < ConsoleCmdr
|
12
12
|
|
13
|
-
def initialize(manifest, model, debug: false)
|
13
|
+
def initialize(manifest, model, debug: false, userid: nil, deviceid: nil)
|
14
14
|
|
15
|
-
@alexa = AlexaSkillSimulator.new(manifest, model, debug: debug
|
15
|
+
@alexa = AlexaSkillSimulator.new(manifest, model, debug: debug,
|
16
|
+
userid: userid, deviceid: deviceid)
|
16
17
|
super(debug: debug)
|
17
18
|
|
18
19
|
end
|
@@ -78,9 +79,9 @@ class AlexaSkillSimulator
|
|
78
79
|
|
79
80
|
attr_reader :invocation, :utterances
|
80
81
|
|
81
|
-
def initialize(manifest, model, debug: false)
|
82
|
+
def initialize(manifest, model, debug: false, userid: nil, deviceid: nil)
|
82
83
|
|
83
|
-
@debug = debug
|
84
|
+
@debug, @userid, @deviceid = debug, userid, deviceid
|
84
85
|
|
85
86
|
@locale = manifest['manifest']['publishingInformation']['locales']\
|
86
87
|
.keys.first
|
@@ -180,6 +181,12 @@ class AlexaSkillSimulator
|
|
180
181
|
"request"=> {}
|
181
182
|
}
|
182
183
|
|
184
|
+
h['session']['user']['userId'] = @userid if @userid
|
185
|
+
h['context']['System']['user']['userId'] = @userid if @userid
|
186
|
+
|
187
|
+
h['context']['System']['device']['deviceId'] = @deviceid if @deviceid
|
188
|
+
|
189
|
+
|
183
190
|
h['request'] = if intent then
|
184
191
|
{
|
185
192
|
"type"=>"IntentRequest",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alexa_skillsimulator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
gYx7JRswmPvGXlAKr/p3KoEauefzGu8oNgv4HYyTterelwGlwnWJORM09hCjSoNv
|
31
31
|
3NE=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-07-
|
33
|
+
date: 2018-07-13 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rest-client
|
metadata.gz.sig
CHANGED
Binary file
|