pointless_feedback 4.1.4 → 4.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/app/controllers/pointless_feedback/messages_controller.rb +2 -1
- data/app/models/pointless_feedback/message.rb +2 -1
- data/app/views/pointless_feedback/feedback_mailer/feedback.html.erb +3 -0
- data/app/views/pointless_feedback/messages/new.html.erb +7 -0
- data/db/migrate/20220518205500_add_url_to_pointless_feedback_messages.rb +5 -0
- data/lib/pointless_feedback/version.rb +1 -1
- data/lib/pointless_feedback.rb +6 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +2 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +18 -0
- data/test/dummy/log/test.log +1195 -0
- data/test/factories/messages.rb +1 -0
- data/test/functional/pointless_feedback/feedback_mailer_test.rb +12 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ec9ec8e911135c9097ba31c372f50865a753375
|
4
|
+
data.tar.gz: 2b1bc459727d4a9200b16d10da89a7322f3cb7fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23b8e08fd74c50e8d8a7d2589dbad010ae4ecc5e73e687196454dae4637069cf898ada68c8d05f6c6f11cf611fa3daef697433ad2315249d8518a747cfda2081
|
7
|
+
data.tar.gz: a8f3ee1d7b955529613dabb366e9b4227bb621650ac306561a171b639b1dd046d314361b7f0ca23c627f73794eae508d3e9f81729ccdb330563e6587decdbc96
|
data/README.md
CHANGED
@@ -95,6 +95,12 @@ Defaults to engine's namespace, e.g. `pointless_feedback_messages`. Change to a
|
|
95
95
|
**invalid_words:**
|
96
96
|
List of words in the feedback description that would prevent an email from sending.
|
97
97
|
|
98
|
+
**show_url_field:**
|
99
|
+
Defaults to `false`. If set to `true`, will show an additional URL field in the form.
|
100
|
+
|
101
|
+
**url_label:**
|
102
|
+
Defaults to `URL`. The label for the URL field that will be shown if `show_url_field` is `true`.
|
103
|
+
|
98
104
|
**google_captcha_site_key & google_captcha_secret_key:**
|
99
105
|
If you'd like to block out the robots, set up a Google Captcha instance:
|
100
106
|
|
@@ -35,7 +35,8 @@ module PointlessFeedback
|
|
35
35
|
"Email" => email_address,
|
36
36
|
"Topic" => topic,
|
37
37
|
"Description" => description,
|
38
|
-
"Date" => created_at.strftime("%m/%d/%y")
|
38
|
+
"Date" => created_at.strftime("%m/%d/%y"),
|
39
|
+
"URL" => url
|
39
40
|
)
|
40
41
|
rescue => e
|
41
42
|
# ignore errors in production, last thing you want is a 500
|
@@ -3,4 +3,7 @@ You've got feedback!
|
|
3
3
|
<p>Name: <%= @message.name %></p>
|
4
4
|
<p>Email Address: <%= @message.email_address %></p>
|
5
5
|
<p>Topic: <%= @message.topic %></p>
|
6
|
+
<% if PointlessFeedback.show_url_field %>
|
7
|
+
<p><%= PointlessFeedback.url_label %>: <%= @message.url %></p>
|
8
|
+
<% end %>
|
6
9
|
<p>Description: <%= @message.description %></p>
|
@@ -45,6 +45,13 @@
|
|
45
45
|
<%= f.select :topic, PointlessFeedback.message_topics, { :prompt => true } %>
|
46
46
|
</div>
|
47
47
|
|
48
|
+
<% if PointlessFeedback.show_url_field %>
|
49
|
+
<div class="field">
|
50
|
+
<%= f.label :url, PointlessFeedback.url_label %>
|
51
|
+
<%= f.text_field :url %>
|
52
|
+
</div>
|
53
|
+
<% end %>
|
54
|
+
|
48
55
|
<div class="field">
|
49
56
|
<%= f.label :description %>
|
50
57
|
<%= f.text_area :description %>
|
data/lib/pointless_feedback.rb
CHANGED
@@ -55,6 +55,12 @@ module PointlessFeedback
|
|
55
55
|
mattr_accessor :invalid_words
|
56
56
|
@@invalid_words = []
|
57
57
|
|
58
|
+
mattr_accessor :show_url_field
|
59
|
+
@@show_url_field = false
|
60
|
+
|
61
|
+
mattr_accessor :url_label
|
62
|
+
@@url_label = "URL"
|
63
|
+
|
58
64
|
# Default way to setup PointlessFeedback. Run rails generate
|
59
65
|
# pointless_feedback_install to create a fresh initializer with all
|
60
66
|
# configuration values.
|
Binary file
|
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20220518205500) do
|
15
15
|
|
16
16
|
create_table "pointless_feedback_messages", force: :cascade do |t|
|
17
17
|
t.string "name"
|
@@ -20,6 +20,7 @@ ActiveRecord::Schema.define(version: 20130501182659) do
|
|
20
20
|
t.text "description"
|
21
21
|
t.datetime "created_at"
|
22
22
|
t.datetime "updated_at"
|
23
|
+
t.string "url"
|
23
24
|
end
|
24
25
|
|
25
26
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -17,3 +17,21 @@ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `n
|
|
17
17
|
[1m[35m (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
18
18
|
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
19
19
|
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130501182659')
|
20
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
21
|
+
Migrating to AddUrlToPointlessFeedbackMessages (20220518205500)
|
22
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
23
|
+
Migrating to AddUrlToPointlessFeedbackMessages (20220518205500)
|
24
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25
|
+
[1m[36m (0.5ms)[0m [1mALTER TABLE "pointless_feedback_messages" ADD "url" varchar[0m
|
26
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20220518205500"]]
|
27
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
28
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
29
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
31
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "pointless_feedback_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email_address" varchar, "topic" varchar, "description" text, "created_at" datetime, "updated_at" datetime, "url" varchar) [0m
|
32
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
33
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
34
|
+
[1m[35m (1.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
35
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
36
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20220518205500')
|
37
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130501182659')[0m
|