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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29449ba188f3e7da8299dd22ff9f03795cd5b645734596619eb5318535c8a809
4
- data.tar.gz: 6d5853b6e7db868f7caa5203575d09fef1d1fde2a9823ee32e09e6dbf82f9f05
3
+ metadata.gz: 8959223a89b198251b3fe0697330ebe2fe2054bfa8c0a258bb3ef9470d3f171b
4
+ data.tar.gz: fb7b3d95aac04d6e70942377b714771cd33ac10732d29833405446425c1ab8f2
5
5
  SHA512:
6
- metadata.gz: 7fbd87765283a0c53e058c50d8a94318b0ddd79b4abb43c14fcf4782b1041c6b984bb4740e927f5d4fb8a9451718a3676afa42dfb4d1ffb686cb20afb981cee2
7
- data.tar.gz: 60fc9116964d2035b5640201eedbfa4ffefd766c517f89fb0a1aab03e2178365bfc53856f220706631638be6f6b09e9e345fc881a82daf869c8774c694ca1a59
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) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ideasbugs
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ideasbugs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov