testimonials 0.6.0 → 0.7.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 +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +1 -0
- data/app/models/testimonials/testimonial.rb +7 -3
- data/config/locales/testimonials.ar.yml +1 -1
- data/config/locales/testimonials.bg.yml +1 -1
- data/config/locales/testimonials.bn.yml +1 -1
- data/config/locales/testimonials.de.yml +1 -1
- data/config/locales/testimonials.el.yml +1 -1
- data/config/locales/testimonials.es.yml +1 -1
- data/config/locales/testimonials.fr.yml +1 -1
- data/config/locales/testimonials.hi.yml +1 -1
- data/config/locales/testimonials.hr.yml +1 -1
- data/config/locales/testimonials.id.yml +1 -1
- data/config/locales/testimonials.it.yml +1 -1
- data/config/locales/testimonials.ja.yml +1 -1
- data/config/locales/testimonials.ko.yml +1 -1
- data/config/locales/testimonials.lb.yml +1 -1
- data/config/locales/testimonials.pl.yml +1 -1
- data/config/locales/testimonials.pt.yml +1 -1
- data/config/locales/testimonials.ro.yml +1 -1
- data/config/locales/testimonials.ru.yml +1 -1
- data/config/locales/testimonials.th.yml +1 -1
- data/config/locales/testimonials.tr.yml +1 -1
- data/config/locales/testimonials.uk.yml +1 -1
- data/config/locales/testimonials.ur.yml +1 -1
- data/config/locales/testimonials.vi.yml +1 -1
- data/config/locales/testimonials.zh-CN.yml +1 -1
- data/lib/generators/testimonials/install/templates/initializer.rb +6 -0
- data/lib/testimonials/configuration.rb +7 -0
- data/lib/testimonials/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb6bd5f3534542607a7baaaa23e172f1c120d643d78a4d3a9bc8fa3642e811b2
|
|
4
|
+
data.tar.gz: 742ebbad6b55223fe4e0bbbe1d4efdef4f6cd7e7f30ed73d70c9b82da85fe3b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7681e7590fea165b98fe2bc95e7324ec00d08ae757f9993da511e99bce24ab24887af1eabbb8b589cbecba1466a6e6aa74df4aafc9a12d5bb3e5d02f5e7ae3cd
|
|
7
|
+
data.tar.gz: d232339a5122dd29c87de64ef8e314f668ab5fe0dfeaf27259b80fc81f5cae50b0d07a3df21558dbe03276506cf362187f9505a459dac0439ff6179313ba0c1d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
- Renamed the default admin dashboard title to `Testimonials` across shipped
|
|
6
|
+
locales while keeping it overridable through `testimonials.dashboard.title`.
|
|
7
|
+
|
|
8
|
+
## 0.7.0
|
|
9
|
+
|
|
10
|
+
- New `config.storage_service`: store uploads (video, its poster frame, guest
|
|
11
|
+
avatars) on a named Active Storage service from the host's
|
|
12
|
+
`config/storage.yml` instead of the environment default. Point it at a
|
|
13
|
+
dedicated bucket or folder — or a service entry carrying provider options
|
|
14
|
+
like Cloudinary's `folder:`/`tags:` — to keep testimonial media separate
|
|
15
|
+
from the rest of the media library. `nil` (the default) keeps today's
|
|
16
|
+
behavior.
|
|
17
|
+
|
|
3
18
|
## 0.6.0
|
|
4
19
|
|
|
5
20
|
- **The full-screen mobile dialog now survives the on-screen keyboard.** On
|
data/README.md
CHANGED
|
@@ -132,6 +132,7 @@ Everything is optional — a fresh install works with zero config. In
|
|
|
132
132
|
| `max_video_size` | `50.megabytes` | Enforced server-side |
|
|
133
133
|
| `avatars` | `true` | Headshot upload for guests on the public page |
|
|
134
134
|
| `max_avatar_size` | `5.megabytes` | Enforced server-side |
|
|
135
|
+
| `storage_service` | app default | Active Storage service for uploads (a `storage.yml` key) |
|
|
135
136
|
| `reprompt_after` | `90.days` | Cooldown after a dismissal |
|
|
136
137
|
| `max_prompts` | `3` | Lifetime auto-prompt cap per user |
|
|
137
138
|
| `public_collection` | `true` | The shareable `/testimonials/new` page |
|
|
@@ -10,9 +10,13 @@ module Testimonials
|
|
|
10
10
|
SOURCES = %w[widget page nps].freeze
|
|
11
11
|
|
|
12
12
|
if defined?(::ActiveStorage)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
# Read at class load, which happens after the host's initializers, so
|
|
14
|
+
# a storage_service set in config/initializers/testimonials.rb is
|
|
15
|
+
# visible here. nil falls through to the environment's default service.
|
|
16
|
+
storage = Testimonials.config.storage_service
|
|
17
|
+
has_one_attached :video_file, service: storage
|
|
18
|
+
has_one_attached :poster, service: storage # a still frame for the video, captured at record time
|
|
19
|
+
has_one_attached :avatar, service: storage
|
|
16
20
|
end
|
|
17
21
|
|
|
18
22
|
validates :kind, inclusion: { in: KINDS }
|
|
@@ -55,6 +55,12 @@ Testimonials.configure do |config|
|
|
|
55
55
|
# config.avatars = true
|
|
56
56
|
# config.max_avatar_size = 5.megabytes
|
|
57
57
|
|
|
58
|
+
# Store uploads (video, poster frame, avatars) on a specific Active Storage
|
|
59
|
+
# service from config/storage.yml — e.g. a dedicated bucket or folder that
|
|
60
|
+
# keeps testimonial media apart from the rest of your library. Default:
|
|
61
|
+
# your environment's default service.
|
|
62
|
+
# config.storage_service = :testimonials
|
|
63
|
+
|
|
58
64
|
# Auto-prompt throttling. Explicit opens (user clicked your link) bypass it.
|
|
59
65
|
# config.reprompt_after = 90.days
|
|
60
66
|
# config.max_prompts = 3
|
|
@@ -52,6 +52,12 @@ module Testimonials
|
|
|
52
52
|
attr_accessor :avatars
|
|
53
53
|
attr_accessor :max_avatar_size
|
|
54
54
|
|
|
55
|
+
# The Active Storage service that stores uploads — video, its poster
|
|
56
|
+
# frame, guest avatars — as a service name from the host's
|
|
57
|
+
# config/storage.yml (e.g. a dedicated bucket or folder). nil, the
|
|
58
|
+
# default, uses the environment's default service.
|
|
59
|
+
attr_accessor :storage_service
|
|
60
|
+
|
|
55
61
|
# Auto-prompt throttling. A user who dismissed the widget is not
|
|
56
62
|
# auto-prompted again within `reprompt_after`; a user auto-prompted
|
|
57
63
|
# `max_prompts` times without submitting is never auto-prompted again;
|
|
@@ -109,6 +115,7 @@ module Testimonials
|
|
|
109
115
|
@max_video_size = 50 * 1024 * 1024
|
|
110
116
|
@avatars = true
|
|
111
117
|
@max_avatar_size = 5 * 1024 * 1024
|
|
118
|
+
@storage_service = nil
|
|
112
119
|
@reprompt_after = 90 * 24 * 60 * 60
|
|
113
120
|
@max_prompts = 3
|
|
114
121
|
@consent_text = nil
|
data/lib/testimonials/version.rb
CHANGED