nova-cli 0.2.7 → 0.2.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8b99f85d7869cb38a51e77f845c5024a0722410717205d266e4be1853cd7876
|
4
|
+
data.tar.gz: ea0cae7df11648890f4ca155c79dcf3af194d24f762632e0228587b32b77f928
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d33874c8e33aace96667afbadd4d43666776474627821c8edada6ee51163522c26b8e76ff9cc2561e5ed702919f33b0cb215deb21a400269ceab9db057d38cc3
|
7
|
+
data.tar.gz: 44fa471d9dab514a7d8f1fe081898b58aa478da8d86aca996489b023e1c5a1bcc2575d2e760ab5d9e0a17f06a6bbd607c85a73d65a38f7ddf08b66c8c1e5f7ea
|
data/lib/nova/generator.rb
CHANGED
@@ -39,6 +39,7 @@ module Nova
|
|
39
39
|
{ path: 'shape/4_tasks', template: nil }, # directory
|
40
40
|
{ path: 'shape/4_tasks/1_generate_application.md', template: 'tasks_examples/1_generate_application.md' },
|
41
41
|
{ path: 'shape/4_tasks/2_generate_static_pages.md', template: 'tasks_examples/2_generate_static_pages.md' },
|
42
|
+
{ path: 'shape/4_tasks/3_deploy_to_heroku.md', template: 'tasks_examples/3_deploy_to_heroku.md' },
|
42
43
|
|
43
44
|
# Code directory
|
44
45
|
{ path: 'code', template: nil } # directory
|
@@ -51,7 +52,7 @@ module Nova
|
|
51
52
|
def generate
|
52
53
|
create_main_directories
|
53
54
|
create_all_files_and_directories
|
54
|
-
|
55
|
+
initialize_git_repo
|
55
56
|
display_success_message
|
56
57
|
end
|
57
58
|
|
@@ -106,7 +107,8 @@ module Nova
|
|
106
107
|
puts " │ │ └── example.md"
|
107
108
|
puts " │ └── 4_tasks/"
|
108
109
|
puts " │ ├── 1_generate_application.md"
|
109
|
-
puts " │
|
110
|
+
puts " │ ├── 2_generate_static_pages.md"
|
111
|
+
puts " │ └── 3_deploy_to_heroku.md"
|
110
112
|
puts " └── code/"
|
111
113
|
end
|
112
114
|
|
@@ -151,11 +153,9 @@ module Nova
|
|
151
153
|
end
|
152
154
|
end
|
153
155
|
|
154
|
-
def
|
155
|
-
|
156
|
-
|
157
|
-
# Initialize git repository in shape directory
|
158
|
-
Dir.chdir(shape_path) do
|
156
|
+
def initialize_git_repo
|
157
|
+
# Initialize git repository at the project root (mono repo)
|
158
|
+
Dir.chdir(app_name) do
|
159
159
|
system('git init', out: File::NULL, err: File::NULL)
|
160
160
|
|
161
161
|
# Configure git user for initial commit (using system defaults)
|
@@ -167,16 +167,16 @@ module Nova
|
|
167
167
|
system('git add .', out: File::NULL, err: File::NULL)
|
168
168
|
|
169
169
|
# Make initial commit
|
170
|
-
system('git commit -m "Initial
|
170
|
+
system('git commit -m "Initial commit: Nova project structure"', out: File::NULL, err: File::NULL)
|
171
171
|
|
172
172
|
# Remove the local git config so user's global config takes over
|
173
173
|
system('git config --unset user.email', out: File::NULL, err: File::NULL)
|
174
174
|
system('git config --unset user.name', out: File::NULL, err: File::NULL)
|
175
175
|
end
|
176
176
|
|
177
|
-
puts "\n✓ Git repository initialized
|
177
|
+
puts "\n✓ Git repository initialized at project root with initial commit"
|
178
178
|
rescue => e
|
179
|
-
puts "\n⚠ Warning: Could not initialize git repository
|
179
|
+
puts "\n⚠ Warning: Could not initialize git repository: #{e.message}"
|
180
180
|
end
|
181
181
|
end
|
182
182
|
end
|
data/lib/nova/templates/nova.mdc
CHANGED
@@ -14,17 +14,17 @@ alwaysApply: true
|
|
14
14
|
You are working in a Nova project that follows a structured product development workflow from abstract ideas to concrete implementation.
|
15
15
|
|
16
16
|
## Project Structure
|
17
|
-
- `shape/` - Product documentation (no code here)
|
17
|
+
- `shape/` - Product documentation (no code here)
|
18
18
|
- `1_big-picture/` - PRD, flowchart
|
19
19
|
- `2_user-stories/` - User stories and their acceptance criteria
|
20
20
|
- `3_design-system/` - UI/UX standards and components
|
21
21
|
- `4_tasks/` - Implementation tasks with progress tracking
|
22
|
-
- `code/` - Application implementation
|
22
|
+
- `code/` - Application implementation
|
23
23
|
|
24
24
|
## Git Repository Structure
|
25
|
-
- The
|
26
|
-
-
|
27
|
-
- This
|
25
|
+
- The project uses a mono repo structure with a single git repository at the project root
|
26
|
+
- Both `shape/` and `code/` directories are tracked in the same repository
|
27
|
+
- This allows for atomic commits that include both documentation updates and code changes
|
28
28
|
|
29
29
|
## Workflow
|
30
30
|
1. **Big Picture**: Define PRD and flowchart
|
@@ -10,15 +10,13 @@ In the code/ directory generate a Rails 8 application with PostgreSQL, Tailwind
|
|
10
10
|
|
11
11
|
## Tasks
|
12
12
|
|
13
|
-
- [ ] 1.0 Create Rails Application
|
13
|
+
- [ ] 1.0 Create Rails Application
|
14
14
|
- [ ] 1.1 Generate Rails app: `rails _8.0.2_ new app_name --database=postgresql --css=tailwind`
|
15
15
|
- [ ] 1.2 Navigate to app directory: `cd app_name`
|
16
|
-
- [ ] 1.3
|
17
|
-
- [ ] 1.4
|
18
|
-
- [ ] 1.5 Install
|
19
|
-
- [ ] 1.6
|
20
|
-
- [ ] 1.7 Install RSpec: `bundle exec rails generate rspec:install`
|
21
|
-
- [ ] 1.8 Verify RSpec works: `bundle exec rspec`
|
16
|
+
- [ ] 1.3 Install Tailwind: `bundle exec rails tailwindcss:install`
|
17
|
+
- [ ] 1.4 Setup database: `bundle exec rails db:create db:migrate`
|
18
|
+
- [ ] 1.5 Install RSpec: `bundle exec rails generate rspec:install`
|
19
|
+
- [ ] 1.6 Verify RSpec works: `bundle exec rspec`
|
22
20
|
|
23
21
|
- [ ] 2.0 Set up Core Gems
|
24
22
|
- [ ] 2.1 Add production gems to Gemfile (figaro, decanter)
|
@@ -45,31 +43,38 @@ In the code/ directory generate a Rails 8 application with PostgreSQL, Tailwind
|
|
45
43
|
- [ ] 5.3 Add selenium-webdriver to Gemfile if not present: `bundle add selenium-webdriver --group test`
|
46
44
|
- [ ] 5.4 Verify tests run: `bundle exec rspec spec/system`
|
47
45
|
|
48
|
-
- [ ] 6.0
|
49
|
-
- [ ] 6.1
|
50
|
-
- [ ] 6.2
|
51
|
-
|
46
|
+
- [ ] 6.0 Commit Changes
|
47
|
+
- [ ] 6.1 Stage all changes: `git add .`
|
48
|
+
- [ ] 6.2 Commit: `git commit -m "Generate Rails application with core dependencies"`
|
49
|
+
|
50
|
+
- [ ] 7.0 Final Setup & Verification
|
51
|
+
- [ ] 7.1 Run full test suite: `bundle exec rspec`
|
52
|
+
- [ ] 7.2 Start Rails server: `rails server`
|
53
|
+
- [ ] 7.3 Visit `http://localhost:3000/hello` and verify everything works
|
54
|
+
- [ ] 7.4 Check that all JavaScript components load correctly
|
55
|
+
- [ ] 7.5 Review logs for any errors or warnings
|
52
56
|
|
53
57
|
## File Tracking
|
54
58
|
|
55
|
-
### Files to Create
|
56
59
|
| File Path | Purpose | Task Ref | Status |
|
57
|
-
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
65
|
-
### Files to Modify
|
66
|
-
| File Path | Changes | Task Ref | Status |
|
67
|
-
|-----------|---------|----------|--------|
|
68
|
-
| `config/routes.rb` | Add hello route | 4.2 | ⏳ |
|
69
|
-
| `spec/rails_helper.rb` | Configure Capybara | 5.1 | ⏳ |
|
60
|
+
|-----------|---------|----------|---------|
|
61
|
+
| code/app_name/Gemfile | Core gem dependencies | 2.0 | ⏳ |
|
62
|
+
| code/app_name/config/database.yml | Database configuration | 1.1 | ⏳ |
|
63
|
+
| code/app_name/config/importmap.rb | JavaScript imports | 3.1 | ⏳ |
|
64
|
+
| code/app_name/app/controllers/pages_controller.rb | Static pages controller | 4.1 | ⏳ |
|
65
|
+
| code/app_name/config/routes.rb | Application routes | 4.2 | ⏳ |
|
66
|
+
| code/app_name/spec/rails_helper.rb | RSpec configuration | 1.5, 5.1 | ⏳ |
|
67
|
+
| code/app_name/spec/system/hello_world_spec.rb | E2E test | 5.2 | ⏳ |
|
70
68
|
|
71
69
|
## Notes
|
72
|
-
|
73
|
-
- Ensure PostgreSQL is running before database
|
74
|
-
-
|
75
|
-
-
|
70
|
+
|
71
|
+
- Ensure PostgreSQL is running before creating the database
|
72
|
+
- The app uses importmap-rails for JavaScript management (no webpack/yarn)
|
73
|
+
- Flowbite provides pre-built Tailwind components
|
74
|
+
- Run tests frequently to catch issues early
|
75
|
+
|
76
|
+
## Troubleshooting
|
77
|
+
|
78
|
+
- If database creation fails, check PostgreSQL is running: `brew services list`
|
79
|
+
- For JavaScript issues, check browser console and `rails assets:precompile`
|
80
|
+
- If tests fail, check Capybara configuration and Chrome/ChromeDriver versions
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# Deploy to Heroku
|
2
|
+
|
3
|
+
## Task Overview
|
4
|
+
Deploy the Rails application to Heroku using a mono repo structure with proper buildpack configuration and environment setup.
|
5
|
+
|
6
|
+
## Prerequisites
|
7
|
+
- [ ] Rails application created and tested locally (Task 1 completed)
|
8
|
+
- [ ] Heroku CLI installed and authenticated
|
9
|
+
- [ ] Git repository initialized at project root
|
10
|
+
|
11
|
+
## Tasks
|
12
|
+
|
13
|
+
- [ ] 1.0 Create app.json Configuration
|
14
|
+
- [ ] 1.1 Create `app.json` file in the Rails app directory (code/[app_name]/app.json)
|
15
|
+
- [ ] 1.2 Configure with the following structure:
|
16
|
+
```json
|
17
|
+
{
|
18
|
+
"name": "[app-name]",
|
19
|
+
"scripts": {
|
20
|
+
"postdeploy": "rake db:migrate && rake db:seed"
|
21
|
+
},
|
22
|
+
"addons": [
|
23
|
+
{
|
24
|
+
"plan": "heroku-redis:mini"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"plan": "heroku-postgresql:essential-0"
|
28
|
+
}
|
29
|
+
],
|
30
|
+
"formation": {
|
31
|
+
"web": {
|
32
|
+
"quantity": 1,
|
33
|
+
"size": "basic"
|
34
|
+
},
|
35
|
+
"worker": {
|
36
|
+
"quantity": 1,
|
37
|
+
"size": "basic"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
"buildpacks": [
|
41
|
+
{
|
42
|
+
"url": "https://github.com/lstoll/heroku-buildpack-monorepo"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"url": "heroku/ruby"
|
46
|
+
}
|
47
|
+
],
|
48
|
+
"env": {
|
49
|
+
"APP_BASE": {
|
50
|
+
"required": true,
|
51
|
+
"value": "code/[app-name]"
|
52
|
+
},
|
53
|
+
"RAILS_MASTER_KEY": {
|
54
|
+
"required": true
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
```
|
59
|
+
- [ ] 1.3 Replace [app-name] with actual application name
|
60
|
+
- [ ] 1.4 Adjust addons and formation based on project requirements
|
61
|
+
|
62
|
+
- [ ] 2.0 Prepare Rails Application for Heroku
|
63
|
+
- [ ] 2.1 Ensure `config/master.key` exists (or create if missing)
|
64
|
+
- [ ] 2.2 Update `config/database.yml` production settings if needed
|
65
|
+
- [ ] 2.3 Add `ruby` version to Gemfile if not specified
|
66
|
+
- [ ] 2.4 Ensure all gems are compatible with Heroku
|
67
|
+
|
68
|
+
- [ ] 3.0 Create Heroku Application
|
69
|
+
- [ ] 3.1 Navigate to project root directory
|
70
|
+
- [ ] 3.2 Create Heroku app: `heroku create [app-name]`
|
71
|
+
- [ ] 3.3 Set buildpacks in order:
|
72
|
+
- `heroku buildpacks:add https://github.com/lstoll/heroku-buildpack-monorepo`
|
73
|
+
- `heroku buildpacks:add heroku/ruby`
|
74
|
+
- [ ] 3.4 Set APP_BASE config var: `heroku config:set APP_BASE=code/[app-name]`
|
75
|
+
- [ ] 3.5 Set Rails master key: `heroku config:set RAILS_MASTER_KEY=$(cat code/[app-name]/config/master.key)`
|
76
|
+
|
77
|
+
- [ ] 4.0 Configure Addons
|
78
|
+
- [ ] 4.1 Add PostgreSQL: `heroku addons:create heroku-postgresql:essential-0`
|
79
|
+
- [ ] 4.2 Add Redis if needed: `heroku addons:create heroku-redis:mini`
|
80
|
+
- [ ] 4.3 Verify addons: `heroku addons`
|
81
|
+
|
82
|
+
- [ ] 5.0 Deploy Application
|
83
|
+
- [ ] 5.1 Commit all changes: `git add . && git commit -m "Configure for Heroku deployment"`
|
84
|
+
- [ ] 5.2 Push to Heroku: `git push heroku main`
|
85
|
+
- [ ] 5.3 Run database migrations: `heroku run rake db:migrate`
|
86
|
+
- [ ] 5.4 Seed database if needed: `heroku run rake db:seed`
|
87
|
+
|
88
|
+
- [ ] 6.0 Verify Deployment
|
89
|
+
- [ ] 6.1 Open application: `heroku open`
|
90
|
+
- [ ] 6.2 Check logs: `heroku logs --tail`
|
91
|
+
- [ ] 6.3 Verify all pages load correctly
|
92
|
+
- [ ] 6.4 Test critical user flows
|
93
|
+
|
94
|
+
- [ ] 7.0 Set Up Continuous Deployment (Optional)
|
95
|
+
- [ ] 7.1 Connect GitHub repository to Heroku
|
96
|
+
- [ ] 7.2 Enable automatic deploys from main branch
|
97
|
+
- [ ] 7.3 Configure review apps if needed
|
98
|
+
|
99
|
+
## Notes
|
100
|
+
|
101
|
+
- The mono repo buildpack must be set before the Ruby buildpack
|
102
|
+
- APP_BASE environment variable tells Heroku where to find the Rails app within the mono repo
|
103
|
+
- Ensure sensitive credentials are never committed to the repository
|
104
|
+
- Use `heroku logs --tail` to debug deployment issues
|
105
|
+
- Consider setting up Heroku pipelines for staging/production environments
|
106
|
+
|
107
|
+
## File Tracking
|
108
|
+
|
109
|
+
| File Path | Purpose | Task Ref | Status |
|
110
|
+
|-----------|---------|----------|---------|
|
111
|
+
| code/[app-name]/app.json | Heroku app configuration | 1.1 | ⏳ |
|
112
|
+
| .gitignore | Ensure secrets are ignored | - | ✅ |
|
113
|
+
| code/[app-name]/Gemfile | Ruby version specification | 2.3 | ⏳ |
|
114
|
+
| code/[app-name]/config/database.yml | Production database config | 2.2 | ⏳ |
|
115
|
+
|
116
|
+
## Resources
|
117
|
+
|
118
|
+
- [Heroku Mono Repo Buildpack](https://github.com/lstoll/heroku-buildpack-monorepo)
|
119
|
+
- [Heroku Rails Deployment Guide](https://devcenter.heroku.com/articles/getting-started-with-rails7)
|
120
|
+
- [app.json Schema](https://devcenter.heroku.com/articles/app-json-schema)
|
data/lib/nova.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nova-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Francis
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- lib/nova/templates/readme_template.md
|
46
46
|
- lib/nova/templates/tasks_examples/1_generate_application.md
|
47
47
|
- lib/nova/templates/tasks_examples/2_generate_static_pages.md
|
48
|
+
- lib/nova/templates/tasks_examples/3_deploy_to_heroku.md
|
48
49
|
- lib/nova/templates/user_story_example.md
|
49
50
|
- lib/nova/templates/windsurfrules_template.txt
|
50
51
|
homepage: https://github.com/LaunchPadLab/nova
|