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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abbc370026501a523c3259fe8f621dbef48e0122
4
- data.tar.gz: 0c80e56120ec1e3e9f02d3f88e0620a284c916f1
3
+ metadata.gz: eda4c8521fe356ac3e21e4eb12ff8b34f3cebb90
4
+ data.tar.gz: 19569c55e3729175c9ca234e9dce2053ca5b96cb
5
5
  SHA512:
6
- metadata.gz: 97d68b0b36af1377cf106fa2076ecdf0ff2206a5d0a1b2be14e5416a02dd821381b16b0dc7490c92fa4fbd026c15d724518468f025e68889ea44cfccede8aa12
7
- data.tar.gz: fc88905b6d47f454d40805feb7bb356eb95920300e6425aa92227952a494d3a4b71ebadf885315ef616291e17145605fad1572b0d782d36dc1ecdc5afe5775b4
6
+ metadata.gz: ce586ca8ba2d70fe334a63575331611136e0f9f449fdeee6a605cb5e62c4afb02668834317016b2eee2f35aeea2d189018d0e7e5759560b319c2f00217639b9e
7
+ data.tar.gz: 7f3fdafe5ecea8292ee26375ad78646f04c356535eeefac50fc5facce88daab7e6d03cbe057ab9d7a2ba5fe94d232934ab6c9d720aa61c1aee4d598e0f114b02
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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.1
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-12 00:00:00.000000000 Z
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