plutonium 0.34.0 → 0.34.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/.claude/skills/resource/SKILL.md +6 -6
- data/CHANGELOG.md +6 -0
- data/docs/concepts/packages-portals.md +5 -5
- data/docs/concepts/resources.md +2 -2
- data/docs/cookbook/blog.md +5 -6
- data/docs/cookbook/saas.md +4 -4
- data/docs/getting-started/index.md +2 -1
- data/docs/getting-started/installation.md +2 -1
- data/docs/getting-started/tutorial/01-setup.md +2 -1
- data/docs/guides/authentication.md +2 -1
- data/docs/index.md +3 -2
- data/docs/reference/generators/index.md +2 -1
- data/lib/plutonium/version.rb +1 -1
- data/lib/tasks/release.rake +7 -0
- data/package.json +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: 928572413dcc6ef2e0d2e7ad258ccd1728d1d6ace9ae921abe6ae9eba89733f3
|
|
4
|
+
data.tar.gz: f94b0167a48c070d0425d5d1f42364d03786a83834b1071f791b70dfb72db421
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be38ab566496a59200dbb0dfe728ae85dc7c3d9fdbfb031b7501e9ac96b4fe69139618c7077fb7ea363aafa59388aee89681903d9c4223611044c59101ab17b6
|
|
7
|
+
data.tar.gz: a1d51393fe914ddecb1b339c36a0a2d4fd8f69cc995291e4d383fdeeae815419ce1f564854e3b4aace31d119ca1eddaa687ed7d87fce7e30b1fa8db07f98ae4d
|
|
@@ -91,13 +91,13 @@ rails g pu:res:conn Post --dest=admin_portal
|
|
|
91
91
|
Resources must be connected to a portal to be accessible:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
rails g pu:res:conn Post --
|
|
94
|
+
rails g pu:res:conn Post --dest=admin_portal
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
This:
|
|
98
|
-
- Registers the resource in
|
|
99
|
-
- Creates
|
|
100
|
-
-
|
|
98
|
+
- Registers the resource in portal routes
|
|
99
|
+
- Creates portal-specific controller
|
|
100
|
+
- Creates portal-specific policy with attribute permissions
|
|
101
101
|
|
|
102
102
|
See `connect-resource` skill for details.
|
|
103
103
|
|
|
@@ -253,8 +253,8 @@ end
|
|
|
253
253
|
|
|
254
254
|
## Workflow Summary
|
|
255
255
|
|
|
256
|
-
1. **Generate** - `rails g pu:res:scaffold Model attributes
|
|
257
|
-
2. **Connect** - `rails g pu:res:conn Model --
|
|
256
|
+
1. **Generate** - `rails g pu:res:scaffold Model attributes... --dest=main_app`
|
|
257
|
+
2. **Connect** - `rails g pu:res:conn Model --dest=portal_name`
|
|
258
258
|
3. **Customize** - Edit definition/policy as needed (model rarely needs changes)
|
|
259
259
|
4. **Override per portal** - Create portal-specific definitions when needed
|
|
260
260
|
|
data/CHANGELOG.md
CHANGED
|
@@ -51,7 +51,7 @@ end
|
|
|
51
51
|
### Adding Resources to a Feature Package
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
rails generate pu:res:scaffold Post title:string body:text --
|
|
54
|
+
rails generate pu:res:scaffold Post title:string body:text --dest=blogging
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Resources are namespaced under the package:
|
|
@@ -126,13 +126,13 @@ end
|
|
|
126
126
|
### Connecting Resources to Portals
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
|
-
rails generate pu:res:conn Post --
|
|
129
|
+
rails generate pu:res:conn Blogging::Post --dest=admin_portal
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
This:
|
|
133
|
-
1.
|
|
134
|
-
2.
|
|
135
|
-
3.
|
|
133
|
+
1. Registers the resource in portal routes
|
|
134
|
+
2. Creates portal-specific controller
|
|
135
|
+
3. Creates portal-specific policy with attribute permissions
|
|
136
136
|
|
|
137
137
|
## Multiple Portals
|
|
138
138
|
|
data/docs/concepts/resources.md
CHANGED
|
@@ -112,7 +112,7 @@ end
|
|
|
112
112
|
Resources must be registered with a portal to be accessible:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
rails generate pu:res:conn Post --
|
|
115
|
+
rails generate pu:res:conn Post --dest=admin_portal
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
Or manually in routes:
|
|
@@ -120,7 +120,7 @@ Or manually in routes:
|
|
|
120
120
|
```ruby
|
|
121
121
|
# packages/admin_portal/config/routes.rb
|
|
122
122
|
AdminPortal::Engine.routes.draw do
|
|
123
|
-
|
|
123
|
+
register_resource ::Post
|
|
124
124
|
end
|
|
125
125
|
```
|
|
126
126
|
|
data/docs/cookbook/blog.md
CHANGED
|
@@ -389,17 +389,16 @@ end
|
|
|
389
389
|
```bash
|
|
390
390
|
# Generate the structure
|
|
391
391
|
rails generate pu:pkg:package blogging
|
|
392
|
-
rails generate pu:res:scaffold Post title:string slug:string body:text published:boolean --
|
|
393
|
-
rails generate pu:res:scaffold Comment body:text approved:boolean post:belongs_to --
|
|
394
|
-
rails generate pu:res:scaffold Category name:string slug:string --
|
|
392
|
+
rails generate pu:res:scaffold Post title:string slug:string body:text published:boolean --dest=blogging
|
|
393
|
+
rails generate pu:res:scaffold Comment body:text approved:boolean post:belongs_to --dest=blogging
|
|
394
|
+
rails generate pu:res:scaffold Category name:string slug:string --dest=blogging
|
|
395
395
|
|
|
396
396
|
# Create portals
|
|
397
397
|
rails generate pu:pkg:portal admin
|
|
398
398
|
rails generate pu:pkg:portal public
|
|
399
399
|
|
|
400
|
-
# Connect resources
|
|
401
|
-
rails generate pu:res:conn Post
|
|
402
|
-
rails generate pu:res:conn Comment --package blogging --portal admin --parent post
|
|
400
|
+
# Connect resources to portal
|
|
401
|
+
rails generate pu:res:conn Blogging::Post Blogging::Comment Blogging::Category --dest=admin_portal
|
|
403
402
|
|
|
404
403
|
rails db:migrate
|
|
405
404
|
```
|
data/docs/cookbook/saas.md
CHANGED
|
@@ -461,12 +461,12 @@ rails generate pu:pkg:package billing
|
|
|
461
461
|
rails generate pu:pkg:portal app
|
|
462
462
|
|
|
463
463
|
# Generate models
|
|
464
|
-
rails generate pu:res:scaffold Organization name:string slug:string --
|
|
465
|
-
rails generate pu:res:scaffold Membership role:string organization:belongs_to user:belongs_to --
|
|
466
|
-
rails generate pu:res:scaffold Project name:string organization:belongs_to --
|
|
464
|
+
rails generate pu:res:scaffold Organization name:string slug:string --dest=core
|
|
465
|
+
rails generate pu:res:scaffold Membership role:string organization:belongs_to user:belongs_to --dest=core
|
|
466
|
+
rails generate pu:res:scaffold Project name:string organization:belongs_to --dest=projects
|
|
467
467
|
|
|
468
468
|
# Connect to portal
|
|
469
|
-
rails generate pu:res:conn Project --
|
|
469
|
+
rails generate pu:res:conn Projects::Project --dest=app_portal
|
|
470
470
|
|
|
471
471
|
rails db:migrate
|
|
472
472
|
```
|
|
@@ -24,7 +24,8 @@ Before you begin, make sure you have:
|
|
|
24
24
|
If you're starting fresh, use our application template:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
rails new myapp -
|
|
27
|
+
rails new myapp -a propshaft -j esbuild -c tailwind \
|
|
28
|
+
-m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
This creates a fully configured Plutonium application with authentication ready to go.
|
|
@@ -7,7 +7,8 @@ This guide covers installing Plutonium in both new and existing Rails applicatio
|
|
|
7
7
|
The fastest way to get started is with our application template:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
rails new myapp -
|
|
10
|
+
rails new myapp -a propshaft -j esbuild -c tailwind \
|
|
11
|
+
-m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
|
|
11
12
|
```
|
|
12
13
|
|
|
13
14
|
This template:
|
|
@@ -7,7 +7,8 @@ In this chapter, you'll create a new Plutonium application and explore its struc
|
|
|
7
7
|
Open your terminal and run:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
rails new blog -
|
|
10
|
+
rails new blog -a propshaft -j esbuild -c tailwind \
|
|
11
|
+
-m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
|
|
11
12
|
```
|
|
12
13
|
|
|
13
14
|
This creates a new Rails application with Plutonium pre-configured.
|
|
@@ -19,7 +19,8 @@ Plutonium uses [Rodauth](http://rodauth.jeremyevans.net/) via [rodauth-rails](ht
|
|
|
19
19
|
The Plutonium template installs Rodauth automatically:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
rails new myapp -
|
|
22
|
+
rails new myapp -a propshaft -j esbuild -c tailwind \
|
|
23
|
+
-m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
### Existing Applications
|
data/docs/index.md
CHANGED
|
@@ -45,13 +45,14 @@ Building admin panels, dashboards, and internal tools in Rails often means:
|
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
47
|
# Create a new Plutonium app
|
|
48
|
-
rails new myapp -
|
|
48
|
+
rails new myapp -a propshaft -j esbuild -c tailwind \
|
|
49
|
+
-m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
|
|
49
50
|
|
|
50
51
|
# Generate a resource
|
|
51
52
|
rails g pu:res:scaffold Post title:string body:text published:boolean
|
|
52
53
|
|
|
53
54
|
# Connect it to a portal
|
|
54
|
-
rails g pu:res:conn Post --
|
|
55
|
+
rails g pu:res:conn Post --dest=admin_portal
|
|
55
56
|
|
|
56
57
|
# Done. Full CRUD with auth, policies, and UI.
|
|
57
58
|
```
|
|
@@ -381,7 +381,8 @@ rails generate pu:eject:shell
|
|
|
381
381
|
|
|
382
382
|
```bash
|
|
383
383
|
# Create Rails app with Plutonium template
|
|
384
|
-
rails new myapp -
|
|
384
|
+
rails new myapp -a propshaft -j esbuild -c tailwind \
|
|
385
|
+
-m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
|
|
385
386
|
|
|
386
387
|
# Or add to existing app
|
|
387
388
|
rails generate pu:core:install
|
data/lib/plutonium/version.rb
CHANGED
data/lib/tasks/release.rake
CHANGED
|
@@ -162,6 +162,13 @@ namespace :release do
|
|
|
162
162
|
|
|
163
163
|
puts "Starting release workflow for v#{version}..."
|
|
164
164
|
|
|
165
|
+
# Check npm authentication early
|
|
166
|
+
unless system("npm whoami > /dev/null 2>&1")
|
|
167
|
+
puts "Error: You are not logged in to npm. Please run: npm login"
|
|
168
|
+
exit 1
|
|
169
|
+
end
|
|
170
|
+
puts "✓ npm authenticated as: #{`npm whoami`.strip}"
|
|
171
|
+
|
|
165
172
|
# Check for uncommitted changes
|
|
166
173
|
unless `git status --porcelain`.strip.empty?
|
|
167
174
|
puts "Error: You have uncommitted changes. Please commit or stash them first."
|
data/package.json
CHANGED