plutonium 0.46.0 → 0.47.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/.claude/skills/plutonium/SKILL.md +4 -0
- data/.claude/skills/plutonium-interaction/SKILL.md +23 -0
- data/.claude/skills/plutonium-nested-resources/SKILL.md +10 -0
- data/.claude/skills/plutonium-testing/SKILL.md +268 -0
- data/.yarnrc.yml +1 -0
- data/CHANGELOG.md +10 -0
- data/app/assets/plutonium.css +1 -1
- data/docs/.vitepress/config.ts +6 -0
- data/docs/guides/nested-resources.md +10 -0
- data/docs/guides/testing.md +154 -0
- data/docs/reference/controller/index.md +9 -4
- data/docs/superpowers/plans/2026-04-14-plutonium-testing.md +2046 -0
- data/docs/superpowers/plans/2026-04-14-plutonium-testing.md.tasks.json +21 -0
- data/docs/superpowers/specs/2026-04-14-plutonium-testing-design.md +364 -0
- data/gemfiles/rails_8.1.gemfile.lock +1 -1
- data/lib/generators/pu/test/install/install_generator.rb +34 -0
- data/lib/generators/pu/test/install/templates/plutonium_testing.rb.tt +14 -0
- data/lib/generators/pu/test/scaffold/scaffold_generator.rb +55 -0
- data/lib/generators/pu/test/scaffold/templates/integration_test.rb.tt +65 -0
- data/lib/plutonium/core/controller.rb +18 -1
- data/lib/plutonium/testing/auth_helpers.rb +62 -0
- data/lib/plutonium/testing/dsl.rb +73 -0
- data/lib/plutonium/testing/nested_resource.rb +58 -0
- data/lib/plutonium/testing/portal_access.rb +49 -0
- data/lib/plutonium/testing/resource_crud.rb +104 -0
- data/lib/plutonium/testing/resource_definition.rb +61 -0
- data/lib/plutonium/testing/resource_interaction.rb +51 -0
- data/lib/plutonium/testing/resource_model.rb +53 -0
- data/lib/plutonium/testing/resource_policy.rb +72 -0
- data/lib/plutonium/testing.rb +16 -0
- data/lib/plutonium/version.rb +1 -1
- data/lib/plutonium.rb +2 -0
- data/package.json +1 -1
- data/yarn.lock +6037 -3893
- metadata +22 -2
|
@@ -93,10 +93,15 @@ build_collection # Build table component
|
|
|
93
93
|
### URL Generation
|
|
94
94
|
|
|
95
95
|
```ruby
|
|
96
|
-
resource_url_for(@post)
|
|
97
|
-
resource_url_for(@post, action: :edit)
|
|
98
|
-
resource_url_for(Post)
|
|
99
|
-
resource_url_for(Post, parent: @user)
|
|
96
|
+
resource_url_for(@post) # URL for record
|
|
97
|
+
resource_url_for(@post, action: :edit) # Edit URL
|
|
98
|
+
resource_url_for(Post) # Index URL
|
|
99
|
+
resource_url_for(Post, parent: @user) # Nested index URL
|
|
100
|
+
|
|
101
|
+
# Interactions (sugar over `action: :interactive_*_action, interactive_action: ...`)
|
|
102
|
+
resource_url_for(@post, interaction: :publish) # Record action
|
|
103
|
+
resource_url_for(Post, interaction: :import) # Resource (class-level) action
|
|
104
|
+
resource_url_for(Post, interaction: :archive, ids: [1, 2]) # Bulk action
|
|
100
105
|
```
|
|
101
106
|
|
|
102
107
|
## Customization Hooks
|