alexa_objects 1.0.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 +7 -0
- data/.gitignore +137 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +122 -0
- data/Guardfile +54 -0
- data/Rakefile +1 -0
- data/alexa_objects.gemspec +29 -0
- data/lib/alexa_objects.rb +5 -0
- data/lib/alexa_objects/echo_request.rb +58 -0
- data/lib/alexa_objects/response.rb +57 -0
- data/lib/alexa_objects/version.rb +3 -0
- metadata +139 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: e73ca1673c0350109048a377aa01f69a6257bbe7
|
|
4
|
+
data.tar.gz: f09d3cbc20333c277d094dcf1c43ce8b71372efb
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d5399cc9e355af08205d04dfc8bc085ebd05f50b8ea6ab0c686ecc01d26be4c27f8975cffaf2deb9c4b25b3f8c6b9e5d339b73dce181a6bec9734674c69ca487
|
|
7
|
+
data.tar.gz: 02aa48929d347f07e7d6a02aafe5eaa914434fab6d54b20d85304a9d4a4400a780ec6f31722fde323b608f829dde56203e9121f38e267b7e547fcf2757f491ef
|
data/.gitignore
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
.bundle
|
|
4
|
+
.config
|
|
5
|
+
.yardoc
|
|
6
|
+
InstalledFiles
|
|
7
|
+
_yardoc
|
|
8
|
+
coverage
|
|
9
|
+
doc/
|
|
10
|
+
lib/bundler/man
|
|
11
|
+
pkg
|
|
12
|
+
rdoc
|
|
13
|
+
spec/reports
|
|
14
|
+
test/tmp
|
|
15
|
+
test/version_tmp
|
|
16
|
+
tmp
|
|
17
|
+
*.bundle
|
|
18
|
+
*.so
|
|
19
|
+
*.o
|
|
20
|
+
*.a
|
|
21
|
+
mkmf.log
|
|
22
|
+
|
|
23
|
+
# Created by https://www.gitignore.io
|
|
24
|
+
|
|
25
|
+
### RubyMine ###
|
|
26
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
|
|
27
|
+
|
|
28
|
+
*.iml
|
|
29
|
+
|
|
30
|
+
## Directory-based project format:
|
|
31
|
+
.idea/
|
|
32
|
+
# if you remove the above rule, at least ignore the following:
|
|
33
|
+
|
|
34
|
+
# User-specific stuff:
|
|
35
|
+
# .idea/workspace.xml
|
|
36
|
+
# .idea/tasks.xml
|
|
37
|
+
# .idea/dictionaries
|
|
38
|
+
|
|
39
|
+
# Sensitive or high-churn files:
|
|
40
|
+
# .idea/dataSources.ids
|
|
41
|
+
# .idea/dataSources.xml
|
|
42
|
+
# .idea/sqlDataSources.xml
|
|
43
|
+
# .idea/dynamic.xml
|
|
44
|
+
# .idea/uiDesigner.xml
|
|
45
|
+
|
|
46
|
+
# Gradle:
|
|
47
|
+
# .idea/gradle.xml
|
|
48
|
+
# .idea/libraries
|
|
49
|
+
|
|
50
|
+
# Mongo Explorer plugin:
|
|
51
|
+
# .idea/mongoSettings.xml
|
|
52
|
+
|
|
53
|
+
## File-based project format:
|
|
54
|
+
*.ipr
|
|
55
|
+
*.iws
|
|
56
|
+
|
|
57
|
+
## Plugin-specific files:
|
|
58
|
+
|
|
59
|
+
# IntelliJ
|
|
60
|
+
/out/
|
|
61
|
+
|
|
62
|
+
# mpeltonen/sbt-idea plugin
|
|
63
|
+
.idea_modules/
|
|
64
|
+
|
|
65
|
+
# JIRA plugin
|
|
66
|
+
atlassian-ide-plugin.xml
|
|
67
|
+
|
|
68
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
69
|
+
com_crashlytics_export_strings.xml
|
|
70
|
+
crashlytics.properties
|
|
71
|
+
crashlytics-build.properties
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### SublimeText ###
|
|
75
|
+
# cache files for sublime text
|
|
76
|
+
*.tmlanguage.cache
|
|
77
|
+
*.tmPreferences.cache
|
|
78
|
+
*.stTheme.cache
|
|
79
|
+
|
|
80
|
+
# workspace files are user-specific
|
|
81
|
+
*.sublime-workspace
|
|
82
|
+
|
|
83
|
+
# project files should be checked into the repository, unless a significant
|
|
84
|
+
# proportion of contributors will probably not be using SublimeText
|
|
85
|
+
# *.sublime-project
|
|
86
|
+
|
|
87
|
+
# sftp configuration file
|
|
88
|
+
sftp-config.json
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Vim ###
|
|
92
|
+
[._]*.s[a-w][a-z]
|
|
93
|
+
[._]s[a-w][a-z]
|
|
94
|
+
*.un~
|
|
95
|
+
Session.vim
|
|
96
|
+
.netrwhist
|
|
97
|
+
*~
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Ruby ###
|
|
101
|
+
*.gem
|
|
102
|
+
*.rbc
|
|
103
|
+
/.config
|
|
104
|
+
/coverage/
|
|
105
|
+
/InstalledFiles
|
|
106
|
+
/pkg/
|
|
107
|
+
/spec/reports/
|
|
108
|
+
/test/tmp/
|
|
109
|
+
/test/version_tmp/
|
|
110
|
+
/tmp/
|
|
111
|
+
|
|
112
|
+
## Specific to RubyMotion:
|
|
113
|
+
.dat*
|
|
114
|
+
.repl_history
|
|
115
|
+
build/
|
|
116
|
+
|
|
117
|
+
## Documentation cache and generated files:
|
|
118
|
+
/.yardoc/
|
|
119
|
+
/_yardoc/
|
|
120
|
+
/doc/
|
|
121
|
+
/rdoc/
|
|
122
|
+
|
|
123
|
+
## Environment normalisation:
|
|
124
|
+
/.bundle/
|
|
125
|
+
/vendor/bundle
|
|
126
|
+
/lib/bundler/man/
|
|
127
|
+
|
|
128
|
+
# for a library or gem, you might want to ignore these files since the code is
|
|
129
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
130
|
+
# Gemfile.lock
|
|
131
|
+
# .ruby-version
|
|
132
|
+
# .ruby-gemset
|
|
133
|
+
|
|
134
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
135
|
+
.rvmrc
|
|
136
|
+
|
|
137
|
+
.idea
|
data/Gemfile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# Specify your gem's dependencies in takeout.gemspec
|
|
4
|
+
gemspec
|
|
5
|
+
|
|
6
|
+
group :development do
|
|
7
|
+
gem "guard", "2.12.5", require: false
|
|
8
|
+
gem "guard-rspec", '4.5.0', require: false
|
|
9
|
+
gem "guard-bundler", require: false
|
|
10
|
+
gem "guard-rake", require: false
|
|
11
|
+
gem "terminal-notifier-guard", require: false
|
|
12
|
+
gem 'guard-yard', require: false
|
|
13
|
+
end
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
alexa_objects (1.0.0)
|
|
5
|
+
|
|
6
|
+
GEM
|
|
7
|
+
remote: https://rubygems.org/
|
|
8
|
+
specs:
|
|
9
|
+
addressable (2.3.8)
|
|
10
|
+
celluloid (0.16.0)
|
|
11
|
+
timers (~> 4.0.0)
|
|
12
|
+
codeclimate-test-reporter (0.4.7)
|
|
13
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
|
14
|
+
coderay (1.1.0)
|
|
15
|
+
crack (0.4.2)
|
|
16
|
+
safe_yaml (~> 1.0.0)
|
|
17
|
+
diff-lcs (1.2.5)
|
|
18
|
+
docile (1.1.5)
|
|
19
|
+
ffi (1.9.8)
|
|
20
|
+
formatador (0.2.5)
|
|
21
|
+
guard (2.12.5)
|
|
22
|
+
formatador (>= 0.2.4)
|
|
23
|
+
listen (~> 2.7)
|
|
24
|
+
lumberjack (~> 1.0)
|
|
25
|
+
nenv (~> 0.1)
|
|
26
|
+
notiffany (~> 0.0)
|
|
27
|
+
pry (>= 0.9.12)
|
|
28
|
+
shellany (~> 0.0)
|
|
29
|
+
thor (>= 0.18.1)
|
|
30
|
+
guard-bundler (2.1.0)
|
|
31
|
+
bundler (~> 1.0)
|
|
32
|
+
guard (~> 2.2)
|
|
33
|
+
guard-compat (~> 1.1)
|
|
34
|
+
guard-compat (1.2.1)
|
|
35
|
+
guard-rake (1.0.0)
|
|
36
|
+
guard
|
|
37
|
+
rake
|
|
38
|
+
guard-rspec (4.5.0)
|
|
39
|
+
guard (~> 2.1)
|
|
40
|
+
guard-compat (~> 1.1)
|
|
41
|
+
rspec (>= 2.99.0, < 4.0)
|
|
42
|
+
guard-yard (2.1.4)
|
|
43
|
+
guard (>= 1.1.0)
|
|
44
|
+
yard (>= 0.7.0)
|
|
45
|
+
hitimes (1.2.2)
|
|
46
|
+
json (1.8.3)
|
|
47
|
+
listen (2.10.0)
|
|
48
|
+
celluloid (~> 0.16.0)
|
|
49
|
+
rb-fsevent (>= 0.9.3)
|
|
50
|
+
rb-inotify (>= 0.9)
|
|
51
|
+
lumberjack (1.0.9)
|
|
52
|
+
method_source (0.8.2)
|
|
53
|
+
nenv (0.2.0)
|
|
54
|
+
notiffany (0.0.6)
|
|
55
|
+
nenv (~> 0.1)
|
|
56
|
+
shellany (~> 0.0)
|
|
57
|
+
pry (0.10.1)
|
|
58
|
+
coderay (~> 1.1.0)
|
|
59
|
+
method_source (~> 0.8.1)
|
|
60
|
+
slop (~> 3.4)
|
|
61
|
+
rack (1.6.4)
|
|
62
|
+
rack-protection (1.5.3)
|
|
63
|
+
rack
|
|
64
|
+
rake (10.5.0)
|
|
65
|
+
rb-fsevent (0.9.5)
|
|
66
|
+
rb-inotify (0.9.5)
|
|
67
|
+
ffi (>= 0.5.0)
|
|
68
|
+
rspec (3.2.0)
|
|
69
|
+
rspec-core (~> 3.2.0)
|
|
70
|
+
rspec-expectations (~> 3.2.0)
|
|
71
|
+
rspec-mocks (~> 3.2.0)
|
|
72
|
+
rspec-core (3.2.3)
|
|
73
|
+
rspec-support (~> 3.2.0)
|
|
74
|
+
rspec-expectations (3.2.1)
|
|
75
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
76
|
+
rspec-support (~> 3.2.0)
|
|
77
|
+
rspec-mocks (3.2.1)
|
|
78
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
79
|
+
rspec-support (~> 3.2.0)
|
|
80
|
+
rspec-support (3.2.2)
|
|
81
|
+
safe_yaml (1.0.4)
|
|
82
|
+
shellany (0.0.1)
|
|
83
|
+
simplecov (0.10.0)
|
|
84
|
+
docile (~> 1.1.0)
|
|
85
|
+
json (~> 1.8)
|
|
86
|
+
simplecov-html (~> 0.10.0)
|
|
87
|
+
simplecov-html (0.10.0)
|
|
88
|
+
sinatra (1.4.7)
|
|
89
|
+
rack (~> 1.5)
|
|
90
|
+
rack-protection (~> 1.4)
|
|
91
|
+
tilt (>= 1.3, < 3)
|
|
92
|
+
slop (3.6.0)
|
|
93
|
+
terminal-notifier-guard (1.6.4)
|
|
94
|
+
thor (0.19.1)
|
|
95
|
+
tilt (2.0.2)
|
|
96
|
+
timers (4.0.1)
|
|
97
|
+
hitimes
|
|
98
|
+
webmock (1.20.4)
|
|
99
|
+
addressable (>= 2.3.6)
|
|
100
|
+
crack (>= 0.3.2)
|
|
101
|
+
yard (0.8.7.6)
|
|
102
|
+
|
|
103
|
+
PLATFORMS
|
|
104
|
+
ruby
|
|
105
|
+
|
|
106
|
+
DEPENDENCIES
|
|
107
|
+
alexa_objects!
|
|
108
|
+
bundler (~> 1.6)
|
|
109
|
+
codeclimate-test-reporter
|
|
110
|
+
guard (= 2.12.5)
|
|
111
|
+
guard-bundler
|
|
112
|
+
guard-rake
|
|
113
|
+
guard-rspec (= 4.5.0)
|
|
114
|
+
guard-yard
|
|
115
|
+
rake
|
|
116
|
+
rspec
|
|
117
|
+
sinatra
|
|
118
|
+
terminal-notifier-guard
|
|
119
|
+
webmock
|
|
120
|
+
|
|
121
|
+
BUNDLED WITH
|
|
122
|
+
1.10.6
|
data/Guardfile
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# A sample Guardfile
|
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
|
3
|
+
|
|
4
|
+
guard :bundler do
|
|
5
|
+
require 'guard/bundler'
|
|
6
|
+
require 'guard/bundler/verify'
|
|
7
|
+
helper = Guard::Bundler::Verify.new
|
|
8
|
+
|
|
9
|
+
files = ['Gemfile']
|
|
10
|
+
files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
|
|
11
|
+
|
|
12
|
+
# Assume files are symlinked from somewhere
|
|
13
|
+
files.each { |file| watch(helper.real_path(file)) }
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
|
17
|
+
# rspec may be run, below are examples of the most common uses.
|
|
18
|
+
# * bundler: 'bundle exec rspec'
|
|
19
|
+
# * bundler binstubs: 'bin/rspec'
|
|
20
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
|
21
|
+
# installed the spring binstubs per the docs)
|
|
22
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
|
23
|
+
# * 'just' rspec: 'rspec'
|
|
24
|
+
|
|
25
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
|
26
|
+
require "guard/rspec/dsl"
|
|
27
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
|
28
|
+
|
|
29
|
+
# Feel free to open issues for suggestions and improvements
|
|
30
|
+
|
|
31
|
+
# RSpec files
|
|
32
|
+
rspec = dsl.rspec
|
|
33
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
|
34
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
|
35
|
+
watch(rspec.spec_files)
|
|
36
|
+
|
|
37
|
+
# Ruby files
|
|
38
|
+
watch(%r{^lib/alexa_objects/(.+)\.rb$}) { |m| puts m; "spec/#{m.last}_spec.rb" }
|
|
39
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m.last}_spec.rb" }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
guard 'rake', task: 'build', run_on_all: true, run_on_start: true do
|
|
43
|
+
watch(%r{^lib/alexa_objects})
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
guard 'rake', task: 'install', run_on_all: true, run_on_start: true do
|
|
47
|
+
watch(%r{^lib/alexa_objects/})
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
guard 'yard' do
|
|
51
|
+
watch(%r{app/.+\.rb})
|
|
52
|
+
watch(%r{lib/.+\.rb})
|
|
53
|
+
watch(%r{ext/.+\.c})
|
|
54
|
+
end
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'alexa_objects/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "alexa_objects"
|
|
8
|
+
spec.version = AlexaObjects::VERSION
|
|
9
|
+
spec.authors = ["Kyle Lucas"]
|
|
10
|
+
spec.email = ["kglucas93@gmail.com"]
|
|
11
|
+
spec.summary = %q{A pairing of objects for parsing Amazon Echo/Alexa skill requests.}
|
|
12
|
+
spec.description = %q{}
|
|
13
|
+
spec.homepage = "http://github.com/kylegrantlucas/alexa_objects"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
spec.required_ruby_version = '>= 1.9.3'
|
|
16
|
+
|
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
20
|
+
spec.require_paths = ["lib"]
|
|
21
|
+
|
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
|
23
|
+
spec.add_development_dependency "rake"
|
|
24
|
+
spec.add_development_dependency "rspec"
|
|
25
|
+
spec.add_development_dependency "sinatra"
|
|
26
|
+
spec.add_development_dependency "webmock"
|
|
27
|
+
|
|
28
|
+
spec.add_development_dependency "codeclimate-test-reporter"
|
|
29
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module AlexaObjects
|
|
2
|
+
class EchoRequest
|
|
3
|
+
attr_reader :intent_name, :slots, :timestamp, :request_type, :session_new, :user_id, :access_token, :application_id
|
|
4
|
+
attr_accessor :attributes
|
|
5
|
+
alias :session_new? :session_new
|
|
6
|
+
|
|
7
|
+
def initialize(response_hash)
|
|
8
|
+
@attributes = response_hash["session"]["attributes"] ? response_hash["session"]["attributes"] : {}
|
|
9
|
+
|
|
10
|
+
session = response_hash["request"]
|
|
11
|
+
request = response_hash["request"]
|
|
12
|
+
|
|
13
|
+
if session
|
|
14
|
+
@user_id = session["user"]["userId"]
|
|
15
|
+
@access_token = session["user"]["accessToken"]
|
|
16
|
+
@application_id = session["application"]["applicationId"]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
if request
|
|
20
|
+
@request_type = request["type"]
|
|
21
|
+
@timestamp = request["timestamp"]
|
|
22
|
+
@session_new = request["new"]
|
|
23
|
+
|
|
24
|
+
if request["intent"]
|
|
25
|
+
@intent_name = request["intent"]["name"]
|
|
26
|
+
@slots = build_struct(request["intent"]["slots"])
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def filled_slots
|
|
32
|
+
@slots.select { |slot| slot != nil}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def intent_request?
|
|
36
|
+
request_type == "IntentRequest"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def launch_request?
|
|
40
|
+
request_type == "LaunchRequest"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def session_ended_request?
|
|
44
|
+
request_type == "SessionEndedRequest"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
private
|
|
48
|
+
def build_struct(hash)
|
|
49
|
+
if hash.nil?
|
|
50
|
+
nil
|
|
51
|
+
else
|
|
52
|
+
slot_names = hash.keys.map {|k| k.to_sym.downcase }
|
|
53
|
+
slot_values = hash.values.map { |v| v["value"] }
|
|
54
|
+
Struct.new(*slot_names).new(*slot_values)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module AlexaObjects
|
|
2
|
+
class Response
|
|
3
|
+
attr_accessor :session_attributes, :spoken_response, :card_title, :card_content, :reprompt_text, :end_session, :speech_type, :text_type
|
|
4
|
+
|
|
5
|
+
def initialize
|
|
6
|
+
@session_attributes = {}
|
|
7
|
+
@speech_type = "PlainText"
|
|
8
|
+
@spoken_response = nil
|
|
9
|
+
@card_title = nil
|
|
10
|
+
@card_content = nil
|
|
11
|
+
@reprompt_text = nil
|
|
12
|
+
@text_type = "text"
|
|
13
|
+
@end_session = true
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def add_attribute(key, value)
|
|
17
|
+
@session_attributes.merge!(key => value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def append_attribute(key, value)
|
|
21
|
+
@session_attributes[key] << value if @session_attributes[key]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def with_card
|
|
25
|
+
{
|
|
26
|
+
"version" => "2.0",
|
|
27
|
+
"sessionAttributes" => @session_attributes,
|
|
28
|
+
"response" => {
|
|
29
|
+
"outputSpeech" => {
|
|
30
|
+
"type" => speech_type,
|
|
31
|
+
"#{text_type}" => spoken_response
|
|
32
|
+
},
|
|
33
|
+
"card" => {
|
|
34
|
+
"type" => "Simple",
|
|
35
|
+
"title" => card_title,
|
|
36
|
+
"content" => card_content
|
|
37
|
+
},
|
|
38
|
+
"reprompt" => {
|
|
39
|
+
"outputSpeech" => {
|
|
40
|
+
"type" => speech_type,
|
|
41
|
+
"text" => reprompt_text
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"shouldEndSession" => end_session
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def link_card
|
|
50
|
+
self.with_card.tap { |hs| hs[:response][:card] = {"type" => "LinkAccount"} }
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def without_card
|
|
54
|
+
self.with_card.tap { |hs| hs[:response].delete(:card) }
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: alexa_objects
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Kyle Lucas
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.6'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.6'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: sinatra
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: webmock
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: codeclimate-test-reporter
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
description: ''
|
|
98
|
+
email:
|
|
99
|
+
- kglucas93@gmail.com
|
|
100
|
+
executables: []
|
|
101
|
+
extensions: []
|
|
102
|
+
extra_rdoc_files: []
|
|
103
|
+
files:
|
|
104
|
+
- ".gitignore"
|
|
105
|
+
- Gemfile
|
|
106
|
+
- Gemfile.lock
|
|
107
|
+
- Guardfile
|
|
108
|
+
- Rakefile
|
|
109
|
+
- alexa_objects.gemspec
|
|
110
|
+
- lib/alexa_objects.rb
|
|
111
|
+
- lib/alexa_objects/echo_request.rb
|
|
112
|
+
- lib/alexa_objects/response.rb
|
|
113
|
+
- lib/alexa_objects/version.rb
|
|
114
|
+
homepage: http://github.com/kylegrantlucas/alexa_objects
|
|
115
|
+
licenses:
|
|
116
|
+
- MIT
|
|
117
|
+
metadata: {}
|
|
118
|
+
post_install_message:
|
|
119
|
+
rdoc_options: []
|
|
120
|
+
require_paths:
|
|
121
|
+
- lib
|
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
|
+
requirements:
|
|
124
|
+
- - ">="
|
|
125
|
+
- !ruby/object:Gem::Version
|
|
126
|
+
version: 1.9.3
|
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - ">="
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '0'
|
|
132
|
+
requirements: []
|
|
133
|
+
rubyforge_project:
|
|
134
|
+
rubygems_version: 2.2.2
|
|
135
|
+
signing_key:
|
|
136
|
+
specification_version: 4
|
|
137
|
+
summary: A pairing of objects for parsing Amazon Echo/Alexa skill requests.
|
|
138
|
+
test_files: []
|
|
139
|
+
has_rdoc:
|