pointless_feedback 4.1.0 → 4.1.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c708551220ab5045f7291f1f77108b0d4464c70b970f50370033dc0ec14d8bb8
|
4
|
+
data.tar.gz: 00c3a39082d46221211e902630f3cda5d5d418aca50cef3dded180d5a788fe28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77adb12e5be3c75e4183dd689d1d86a93b57065ed06d831ca935ce3ff91b55a549c3ae42a37f02d486e6908a41c317f03f76dd77296e559e29d306655cfbd89d
|
7
|
+
data.tar.gz: a1eea0c5befc0785fc23b3204160c67e2348afe18b3651baff0032a79dec61fb8b68c2c920b6d8728a27ed486544898cb577a6f12855eb5b6c8154b29b3f4478
|
@@ -16,11 +16,32 @@ module PointlessFeedback
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def export_feedback
|
19
|
-
|
19
|
+
if PointlessFeedback.email_feedback
|
20
|
+
# Support Rails < 4.2 and >= 4.2 delivery options
|
21
|
+
mailer = FeedbackMailer.feedback(self)
|
22
|
+
mailer.respond_to?(:deliver_now) ? mailer.deliver_now : mailer.deliver
|
23
|
+
end
|
20
24
|
|
21
|
-
|
22
|
-
|
23
|
-
|
25
|
+
if PointlessFeedback.airtable_api_key
|
26
|
+
feedback_table = Airrecord.table(
|
27
|
+
PointlessFeedback.airtable_api_key,
|
28
|
+
PointlessFeedback.airtable_app_key,
|
29
|
+
PointlessFeedback.airtable_table_name
|
30
|
+
)
|
31
|
+
|
32
|
+
begin
|
33
|
+
feedback_table.create(
|
34
|
+
"Name" => name,
|
35
|
+
"Email" => email_address,
|
36
|
+
"Topic" => topic,
|
37
|
+
"Description" => description
|
38
|
+
)
|
39
|
+
rescue => e
|
40
|
+
# ignore errors in production, last thing you want is a 500
|
41
|
+
# when someone's trying to complain about your site.
|
42
|
+
raise(e) if Rails.env.development?
|
43
|
+
end
|
44
|
+
end
|
24
45
|
end
|
25
46
|
|
26
47
|
def honeypot_filled_in?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PointlessFeedback.setup do |config|
|
2
2
|
# ==> Feedback Configuration
|
3
3
|
# Configure the topics for the user to choose from on the feedback form
|
4
|
-
# config.message_topics = ['Error on page', 'Other']
|
4
|
+
# config.message_topics = ['Error on page', 'Feature Request', 'Praise', 'Other']
|
5
5
|
|
6
6
|
# ==> Email Configuration
|
7
7
|
# Configure feedback email properties (disabled by default)
|
@@ -19,4 +19,19 @@ PointlessFeedback.setup do |config|
|
|
19
19
|
#
|
20
20
|
# config.google_captcha_site_key = nil
|
21
21
|
# config.google_captcha_secret_key = nil
|
22
|
+
|
23
|
+
# ==> Airtable Configuration
|
24
|
+
# If you'd like to export feedback submissions to an Airtable database,
|
25
|
+
# 1. Create an Airtable database with the following columns:
|
26
|
+
# - Name
|
27
|
+
# - Email
|
28
|
+
# - Topic
|
29
|
+
# - Description
|
30
|
+
# 2. Generate an API Key: https://airtable.com/account
|
31
|
+
# 3. Find your app key and table name: https://airtable.com/api
|
32
|
+
# 4. Fill in all these configs
|
33
|
+
#
|
34
|
+
# config.airtable_api_key = "key--------------"
|
35
|
+
# config.airtable_app_key = "app--------------"
|
36
|
+
# config.airtable_table_name = "Feedback Tracker"
|
22
37
|
end
|
data/lib/pointless_feedback.rb
CHANGED
@@ -2,6 +2,7 @@ require "pointless_feedback/engine"
|
|
2
2
|
require "pointless_feedback/captcha"
|
3
3
|
require "typhoeus"
|
4
4
|
require "jquery-rails"
|
5
|
+
require "airrecord"
|
5
6
|
|
6
7
|
module PointlessFeedback
|
7
8
|
module Controllers
|
@@ -42,6 +43,15 @@ module PointlessFeedback
|
|
42
43
|
mattr_accessor :google_captcha_secret_key
|
43
44
|
@@google_captcha_secret_key = nil
|
44
45
|
|
46
|
+
mattr_accessor :airtable_api_key
|
47
|
+
@@airtable_api_key = nil
|
48
|
+
|
49
|
+
mattr_accessor :airtable_app_key
|
50
|
+
@@airtable_app_key = nil
|
51
|
+
|
52
|
+
mattr_accessor :airtable_table_name
|
53
|
+
@@airtable_table_name = nil
|
54
|
+
|
45
55
|
# Default way to setup PointlessFeedback. Run rails generate
|
46
56
|
# pointless_feedback_install to create a fresh initializer with all
|
47
57
|
# configuration values.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pointless_feedback
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Porter
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '4.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: airrecord
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.0'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: sqlite3
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|