feedback_router 0.8.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: addfeefe9ad0079780cc980e3904cd1163d1ff33
4
- data.tar.gz: 00f8754a708e000e41bf202c8d508d906ed3389d
3
+ metadata.gz: 5d69385ddb1a643378969c25e8c2879c3594f002
4
+ data.tar.gz: 6383eeb5c980bbf1340a5856304183e177437066
5
5
  SHA512:
6
- metadata.gz: 4fb81489b2fb68bcb84fb6e11098dad5912e9e27c597f59a9df0bcb1e720c1a251e8a86fafc03c703f90a7d6cf084a30e3fa6f1534bbafea2c7c2a2f739bd5f0
7
- data.tar.gz: 3c8d39edfc3243d129e782b001cd0ec538c8bee4497b551c73cbc21f78a056baf996b6f39c18870e192e713f08a5d39095b7ff063cc181d4cb36442375af93cc
6
+ metadata.gz: 2c71874a9c80c56b8f9b2a4be1ca76843bc03964b9c88f9c7c58f23fbad3e808119e838485ed0a3ec94a8ffa17e018adabb39f2462f5e01f4b2e0e06beca1db4
7
+ data.tar.gz: 5114e29d17d15d3ba0f3eacb921dfd73363fe10195338051ff1ec4cac0fd54a439bf3f93e698a643f6479ea2a57b22769951a3885a0b4e50ad85947f53043c5d
data/README.md CHANGED
@@ -16,13 +16,25 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install feedback_router
18
18
 
19
- ## Usage
19
+ Once the Gem is installed you have to create an environment of the location that the feedback will be sent to. The environment variable must be called ```ENV['FEEDBACK_LOCATION']``` and should reflect the entire URL of where the data is being sent (for example ```http://localhost:3000/example_route```).
20
20
 
21
- TODO: Write usage instructions here
21
+ #Usage
22
+
23
+ After installing the gem, paste the following bit of code into your application_controller.rb:
24
+
25
+ protect_from_forgery with: :null_session, if: Proc.new { |c| c.request.format == 'application/json' }
26
+
27
+ This will allow the feedback_router gem to send data through to your create method.
28
+
29
+ Now all you have to do is call the gem after the feedback params have been given, like so:
30
+
31
+ FeedbackRouter.send(feedback_params, "Name of Application")
32
+
33
+ Where "Name of Application" is the name of the Rails App sending the feedback.
22
34
 
23
35
  ## Contributing
24
36
 
25
- 1. Fork it ( https://github.com/[my-github-username]/feedback_router/fork )
37
+ 1. Fork it ( https://github.com/ElliottAYoung/feedback_router/fork )
26
38
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
39
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
40
  4. Push to the branch (`git push origin my-new-feature`)
@@ -17,6 +17,7 @@ module FeedbackRouter
17
17
 
18
18
  def self.set_params(feedback_params, application_name)
19
19
  feedback_params['app_name'] = application_name
20
+ feedback_params
20
21
  end
21
22
 
22
23
  def self.send_request
@@ -1,3 +1,3 @@
1
1
  module FeedbackRouter
2
- VERSION = "0.8.2"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedback_router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliott Young