ideasbugs 0.5.3 → 0.5.4
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 +6 -0
- data/README.md +14 -0
- data/lib/generators/ideasbugs/install/templates/initializer.rb +7 -0
- data/lib/ideasbugs/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: 8959223a89b198251b3fe0697330ebe2fe2054bfa8c0a258bb3ef9470d3f171b
|
|
4
|
+
data.tar.gz: fb7b3d95aac04d6e70942377b714771cd33ac10732d29833405446425c1ab8f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 304eb89d1bd1529e54356e8eaa647f004c85f7cc5eddf040fa746cc3c5a5a654a26da06235fd57d1010da3c477fbf7d45fb143d99775c73f38af02971c372b85
|
|
7
|
+
data.tar.gz: e54f393078ca2e69afc9ecba2b81bb44849ce91c69501c14e84af4c820daa586bf421079f75c66b601086eee99be505832950804631d0f1624a0edaa4e58ac1a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.4 (2026-07-25)
|
|
4
|
+
|
|
5
|
+
- Docs: show how to wire current_user with Rails 8's built-in authentication
|
|
6
|
+
(bin/rails generate authentication), alongside the existing Devise/Warden
|
|
7
|
+
example — in the README and the generated initializer.
|
|
8
|
+
|
|
3
9
|
## 0.5.3 (2026-07-25)
|
|
4
10
|
|
|
5
11
|
- The widget's dynamic messages are now announced to screen readers: the
|
data/README.md
CHANGED
|
@@ -163,6 +163,20 @@ Ideasbugs.configure do |config|
|
|
|
163
163
|
end
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
+
`current_user` (and any admin gate) receives the raw request, so it works
|
|
167
|
+
with whatever auth you have:
|
|
168
|
+
|
|
169
|
+
```ruby
|
|
170
|
+
# Devise / Warden:
|
|
171
|
+
config.current_user = ->(request) { request.env["warden"]&.user }
|
|
172
|
+
|
|
173
|
+
# Rails 8 built-in auth (bin/rails generate authentication):
|
|
174
|
+
config.current_user = lambda do |request|
|
|
175
|
+
token = request.cookies["session_token"]
|
|
176
|
+
Session.find_signed(token)&.user if token
|
|
177
|
+
end
|
|
178
|
+
```
|
|
179
|
+
|
|
166
180
|
### Opening the form from your own UI
|
|
167
181
|
|
|
168
182
|
Prefer a nav item over the floating button? Add `data-ideasbugs-open` to
|
|
@@ -11,7 +11,14 @@ Ideasbugs.configure do |config|
|
|
|
11
11
|
|
|
12
12
|
# Attribute feedback to a user (optional). Return an object responding to
|
|
13
13
|
# #id, or nil. Receives the request.
|
|
14
|
+
# Devise / Warden:
|
|
14
15
|
# config.current_user = ->(request) { request.env["warden"]&.user }
|
|
16
|
+
#
|
|
17
|
+
# Rails 8 built-in auth (bin/rails generate authentication):
|
|
18
|
+
# config.current_user = lambda do |request|
|
|
19
|
+
# token = request.cookies["session_token"]
|
|
20
|
+
# Session.find_signed(token)&.user if token
|
|
21
|
+
# end
|
|
15
22
|
|
|
16
23
|
# Label stored for the author and shown in the dashboard.
|
|
17
24
|
# config.author_label = ->(user) { user.try(:email) }
|
data/lib/ideasbugs/version.rb
CHANGED