amazonecho 1.0.7 → 1.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa761a052362e5453b8433aa37a807f87f2c22b6
4
- data.tar.gz: 6877f5ce0da769ecc4e3632ddd74160fab306882
3
+ metadata.gz: 969dc42030969279e5d97b3b81da896b4cd63d95
4
+ data.tar.gz: 7363e78d8cd92699fb290794b9bdeb1e460ce39c
5
5
  SHA512:
6
- metadata.gz: a641f031edd169e68e04b08d0d8f1824a4ae02434c5417c066ed56c46e6f0c15c2f21e9386eb861e9efcf093fddad7013ea601bf230c7f9770c8613b6b53d002
7
- data.tar.gz: 16d2bff6b808e29eba40ee44bee29371b0d8047367ef6804c3db66c86917b3565f0a1b48f937e603ddf0a0b48b71c8961f74715b3c7fcc5a81360d98bc59c776
6
+ metadata.gz: 5956e272a18327008afe4252aef982b6114f05f83c1bbf219159a92f3d7c9e1f68bdc79981999004312340a4b7dd42e711bc1d82949514b9b526edd18e8adcc0
7
+ data.tar.gz: 28d84a3928e9df92cce233f0112fbc2d1bb2888223a5581943fbff19c1bbc3e69b3cd28d042c7459be472cd7b37218fade064f29327fd443cfbb3e3d3a0e3859
data/lib/amazonecho.rb CHANGED
@@ -12,9 +12,9 @@ class AmazonEcho
12
12
  end
13
13
 
14
14
 
15
- def session
16
- self.session_attributes[:session]
17
- end
15
+ # def session
16
+ # self.session_attributes[:session]
17
+ # end
18
18
 
19
19
  def self.intention_selector(alexa)
20
20
  Responsible.slots_passer(alexa)
@@ -80,3 +80,4 @@ require 'amazonecho/initializable'
80
80
  require 'amazonecho/responsible'
81
81
  require 'amazonecho/cardable'
82
82
  require 'alexa_responder'
83
+ require 'amazonecho/railtie' if defined?(Rails)
@@ -0,0 +1,35 @@
1
+ require 'amazonecho'
2
+ require 'rails'
3
+ class AmazonEcho
4
+ class Railtie < Rails::Railtie
5
+ rake_tasks do
6
+ directory "app"
7
+ directory "app/controllers"
8
+ task :amazonecho do
9
+ string =
10
+ 'class IntentController < ApplicationController
11
+ skip_before_action :verify_authenticity_token
12
+ #Don`t forget to add all the Intent methods as helpers and to update your routes!
13
+ #helper_method: example
14
+ def intents
15
+ respond_to do |format|
16
+ format.json {
17
+ render json: AlexaResponder.responds_to_alexa_requests(params)
18
+ }
19
+ end
20
+ end
21
+ end
22
+
23
+ # add your intent methods here like this:
24
+ # def example(alexa, slot1, slot2) etc...
25
+ # code here
26
+ # end'
27
+
28
+ file "build" => "app/controllers" do
29
+ sh " echo '#{string}' > 'app/controllers/intent_controller.rb'"
30
+ end
31
+ end
32
+ puts "Created file 'intent_controller'"
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,25 @@
1
+ directory "app"
2
+ directory "app/controller"
3
+
4
+
5
+ string =
6
+ 'class IntentController << ApplicationController
7
+ skip_before_action :verify_authenticity_token
8
+ def intents
9
+ respond_to do |format|
10
+ format.json {
11
+ render json: AlexaResponder.responds_to_alexa_requests(params)
12
+ }
13
+ end
14
+ end
15
+ end'
16
+
17
+ file "intent_controller.rb" => "app/controller" do
18
+ sh "echo '#{string}' >> 'app/controller/intent_controller.rb'"
19
+ end
20
+
21
+
22
+ desc 'my plugins rake task'
23
+ task :do_something do
24
+ puts "the rake task did something"
25
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazonecho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Weingarten
@@ -20,7 +20,9 @@ files:
20
20
  - lib/amazonecho.rb
21
21
  - lib/amazonecho/cardable.rb
22
22
  - lib/amazonecho/initializable.rb
23
+ - lib/amazonecho/railtie.rb
23
24
  - lib/amazonecho/responsible.rb
25
+ - tasks/amazonecho.rake
24
26
  homepage: https://github.com/mattweingarten/amazonecho
25
27
  licenses:
26
28
  - MIT