plutonium 0.47.0 โ 0.48.0
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 +13 -0
- data/Rakefile +10 -1
- data/gemfiles/rails_8.1.gemfile.lock +27 -1
- data/lib/plutonium/action/interactive.rb +2 -1
- data/lib/plutonium/helpers/turbo_stream_actions_helper.rb +20 -1
- data/lib/plutonium/ui/action_button.rb +1 -1
- data/lib/plutonium/version.rb +1 -1
- data/package.json +1 -1
- data/plutonium.gemspec +2 -0
- metadata +30 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d07d40ddf359fb63528f92bae1e1c10c0ec19d4d8101a7202e1c7ae30a798e90
|
|
4
|
+
data.tar.gz: 30fe5b1d2c89bd08552b3d64eb84795bc12e5417805b7ffd6c18f84f5f05d8d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5652a759d23236d48265376846ed7269a34ab6a7796bb40c6cc2331a7be308a8de472cda0405e7453ce52ae6452bcb291aaf2c784d305a9dbec451d1be3efa8
|
|
7
|
+
data.tar.gz: 3aee38cfc32329df17558559fcda9f1cae1c0605dc8c5a70d3e8ccd74ec5a4de9a04082e95b7368a07e812fe9a1b7d59e89405077e1dfb8210241710f59b3397
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [0.48.0] - 2026-04-16
|
|
2
|
+
|
|
3
|
+
### ๐ Features
|
|
4
|
+
|
|
5
|
+
- *(turbo)* Preserve scroll by emitting refresh when redirect target matches referer
|
|
6
|
+
|
|
7
|
+
### ๐ Bug Fixes
|
|
8
|
+
|
|
9
|
+
- *(action)* Respect `confirmation: false` on interactive actions
|
|
10
|
+
|
|
11
|
+
### ๐งช Testing
|
|
12
|
+
|
|
13
|
+
- *(system)* Browser coverage for Turbo refresh + scroll preservation
|
|
1
14
|
## [0.47.0] - 2026-04-15
|
|
2
15
|
|
|
3
16
|
### ๐ Features
|
data/Rakefile
CHANGED
|
@@ -17,7 +17,16 @@ Rake::Task["build"].enhance ["assets"]
|
|
|
17
17
|
# Unit + integration tests (safe to run together)
|
|
18
18
|
Rake::TestTask.new(:test) do |t|
|
|
19
19
|
t.libs << "test"
|
|
20
|
-
t.test_files = FileList["test/**/*_test.rb"]
|
|
20
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
|
21
|
+
.exclude("test/generators/**/*_test.rb")
|
|
22
|
+
.exclude("test/system/**/*_test.rb")
|
|
23
|
+
t.verbose = true
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# System tests โ require a browser (headless Chrome) and run real Turbo/JS.
|
|
27
|
+
Rake::TestTask.new("test:system") do |t|
|
|
28
|
+
t.libs << "test"
|
|
29
|
+
t.test_files = FileList["test/system/**/*_test.rb"]
|
|
21
30
|
t.verbose = true
|
|
22
31
|
end
|
|
23
32
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
plutonium (0.
|
|
4
|
+
plutonium (0.47.0)
|
|
5
5
|
action_policy (~> 0.7.0)
|
|
6
6
|
listen (~> 3.8)
|
|
7
7
|
pagy (~> 43.0)
|
|
@@ -101,6 +101,8 @@ GEM
|
|
|
101
101
|
securerandom (>= 0.3)
|
|
102
102
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
103
103
|
uri (>= 0.13.1)
|
|
104
|
+
addressable (2.9.0)
|
|
105
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
104
106
|
ansi (1.5.0)
|
|
105
107
|
appraisal (2.5.0)
|
|
106
108
|
bundler
|
|
@@ -118,6 +120,15 @@ GEM
|
|
|
118
120
|
bundler-audit (0.9.3)
|
|
119
121
|
bundler (>= 1.2.0)
|
|
120
122
|
thor (~> 1.0)
|
|
123
|
+
capybara (3.40.0)
|
|
124
|
+
addressable
|
|
125
|
+
matrix
|
|
126
|
+
mini_mime (>= 0.1.3)
|
|
127
|
+
nokogiri (~> 1.11)
|
|
128
|
+
rack (>= 1.6.0)
|
|
129
|
+
rack-test (>= 0.6.3)
|
|
130
|
+
regexp_parser (>= 1.5, < 3.0)
|
|
131
|
+
xpath (~> 3.2)
|
|
121
132
|
chunky_png (1.4.0)
|
|
122
133
|
combustion (1.5.0)
|
|
123
134
|
activesupport (>= 3.0.0)
|
|
@@ -166,6 +177,7 @@ GEM
|
|
|
166
177
|
net-pop
|
|
167
178
|
net-smtp
|
|
168
179
|
marcel (1.1.0)
|
|
180
|
+
matrix (0.4.3)
|
|
169
181
|
mini_mime (1.1.5)
|
|
170
182
|
minitest (6.0.2)
|
|
171
183
|
drb (~> 2.0)
|
|
@@ -243,6 +255,7 @@ GEM
|
|
|
243
255
|
psych (5.3.1)
|
|
244
256
|
date
|
|
245
257
|
stringio
|
|
258
|
+
public_suffix (7.0.5)
|
|
246
259
|
puma (7.2.0)
|
|
247
260
|
nio4r (~> 2.0)
|
|
248
261
|
rabl (0.17.0)
|
|
@@ -302,6 +315,7 @@ GEM
|
|
|
302
315
|
regexp_parser (2.11.3)
|
|
303
316
|
reline (0.6.3)
|
|
304
317
|
io-console (~> 0.5)
|
|
318
|
+
rexml (3.4.4)
|
|
305
319
|
roda (3.102.0)
|
|
306
320
|
rack
|
|
307
321
|
rodauth (2.42.0)
|
|
@@ -339,7 +353,14 @@ GEM
|
|
|
339
353
|
rubocop-ast (>= 1.47.1, < 2.0)
|
|
340
354
|
ruby-next-core (1.2.0)
|
|
341
355
|
ruby-progressbar (1.13.0)
|
|
356
|
+
rubyzip (3.2.2)
|
|
342
357
|
securerandom (0.4.1)
|
|
358
|
+
selenium-webdriver (4.43.0)
|
|
359
|
+
base64 (~> 0.2)
|
|
360
|
+
logger (~> 1.4)
|
|
361
|
+
rexml (~> 3.2, >= 3.2.5)
|
|
362
|
+
rubyzip (>= 1.2.2, < 4.0)
|
|
363
|
+
websocket (~> 1.0)
|
|
343
364
|
semantic_range (3.1.1)
|
|
344
365
|
sequel (5.102.0)
|
|
345
366
|
bigdecimal
|
|
@@ -389,11 +410,14 @@ GEM
|
|
|
389
410
|
unicode-emoji (4.2.0)
|
|
390
411
|
uri (1.1.1)
|
|
391
412
|
useragent (0.16.11)
|
|
413
|
+
websocket (1.2.11)
|
|
392
414
|
websocket-driver (0.8.0)
|
|
393
415
|
base64
|
|
394
416
|
websocket-extensions (>= 0.1.0)
|
|
395
417
|
websocket-extensions (0.1.5)
|
|
396
418
|
wisper (2.0.1)
|
|
419
|
+
xpath (3.2.0)
|
|
420
|
+
nokogiri (~> 1.8)
|
|
397
421
|
yaml (0.4.0)
|
|
398
422
|
zeitwerk (2.7.5)
|
|
399
423
|
|
|
@@ -405,6 +429,7 @@ DEPENDENCIES
|
|
|
405
429
|
bcrypt
|
|
406
430
|
brakeman
|
|
407
431
|
bundle-audit
|
|
432
|
+
capybara
|
|
408
433
|
combustion
|
|
409
434
|
importmap-rails
|
|
410
435
|
minitest
|
|
@@ -417,6 +442,7 @@ DEPENDENCIES
|
|
|
417
442
|
rodauth-rails
|
|
418
443
|
rotp
|
|
419
444
|
rqrcode
|
|
445
|
+
selenium-webdriver
|
|
420
446
|
sequel-activerecord_connection
|
|
421
447
|
sqlite3
|
|
422
448
|
standard
|
|
@@ -31,7 +31,8 @@ module Plutonium
|
|
|
31
31
|
#
|
|
32
32
|
# @return [String, nil] The confirmation message or nil if not applicable
|
|
33
33
|
def confirmation
|
|
34
|
-
|
|
34
|
+
return @confirmation unless @confirmation.nil?
|
|
35
|
+
@immediate ? "#{label}?" : nil
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
# Factory for creating Interactive actions
|
|
@@ -2,7 +2,26 @@ module Plutonium
|
|
|
2
2
|
module Helpers
|
|
3
3
|
module TurboStreamActionsHelper
|
|
4
4
|
def turbo_stream_redirect(url)
|
|
5
|
-
|
|
5
|
+
if turbo_stream_redirect_same_page?(url)
|
|
6
|
+
turbo_stream_action_tag :refresh
|
|
7
|
+
else
|
|
8
|
+
turbo_stream_action_tag :redirect, url:
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def turbo_stream_redirect_same_page?(url)
|
|
15
|
+
return false if request.referer.blank?
|
|
16
|
+
turbo_stream_redirect_normalize_url(url) == turbo_stream_redirect_normalize_url(request.referer)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def turbo_stream_redirect_normalize_url(url)
|
|
20
|
+
uri = URI.parse(url.to_s)
|
|
21
|
+
path = uri.path.to_s.chomp("/").presence || "/"
|
|
22
|
+
[path, uri.query].compact.join("?")
|
|
23
|
+
rescue URI::InvalidURIError
|
|
24
|
+
url.to_s
|
|
6
25
|
end
|
|
7
26
|
end
|
|
8
27
|
end
|
data/lib/plutonium/version.rb
CHANGED
data/package.json
CHANGED
data/plutonium.gemspec
CHANGED
|
@@ -60,6 +60,8 @@ Gem::Specification.new do |spec|
|
|
|
60
60
|
spec.add_development_dependency "bundle-audit"
|
|
61
61
|
spec.add_development_dependency "appraisal"
|
|
62
62
|
spec.add_development_dependency "combustion"
|
|
63
|
+
spec.add_development_dependency "capybara"
|
|
64
|
+
spec.add_development_dependency "selenium-webdriver"
|
|
63
65
|
|
|
64
66
|
# For more information and examples about making a new gem, check out our
|
|
65
67
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: plutonium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.48.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefan Froelich
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-04-
|
|
10
|
+
date: 2026-04-16 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: zeitwerk
|
|
@@ -387,6 +387,34 @@ dependencies:
|
|
|
387
387
|
- - ">="
|
|
388
388
|
- !ruby/object:Gem::Version
|
|
389
389
|
version: '0'
|
|
390
|
+
- !ruby/object:Gem::Dependency
|
|
391
|
+
name: capybara
|
|
392
|
+
requirement: !ruby/object:Gem::Requirement
|
|
393
|
+
requirements:
|
|
394
|
+
- - ">="
|
|
395
|
+
- !ruby/object:Gem::Version
|
|
396
|
+
version: '0'
|
|
397
|
+
type: :development
|
|
398
|
+
prerelease: false
|
|
399
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
400
|
+
requirements:
|
|
401
|
+
- - ">="
|
|
402
|
+
- !ruby/object:Gem::Version
|
|
403
|
+
version: '0'
|
|
404
|
+
- !ruby/object:Gem::Dependency
|
|
405
|
+
name: selenium-webdriver
|
|
406
|
+
requirement: !ruby/object:Gem::Requirement
|
|
407
|
+
requirements:
|
|
408
|
+
- - ">="
|
|
409
|
+
- !ruby/object:Gem::Version
|
|
410
|
+
version: '0'
|
|
411
|
+
type: :development
|
|
412
|
+
prerelease: false
|
|
413
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
414
|
+
requirements:
|
|
415
|
+
- - ">="
|
|
416
|
+
- !ruby/object:Gem::Version
|
|
417
|
+
version: '0'
|
|
390
418
|
description: Plutonium is a Rapid Application Development toolkit for Rails. Convention-driven
|
|
391
419
|
and fully customizable, it adds application-level concepts like resources, policies,
|
|
392
420
|
definitions, and portals that make building complex apps faster. Built for the AI
|