nova-cli 0.2.5 → 0.2.7
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/lib/nova/generator.rb +29 -0
- data/lib/nova/templates/nova.mdc +3 -1
- data/lib/nova.rb +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: 3369c06e4e1eb282de30f034c0e2f398238d7f40265bdf4d858a8d5fbecf8865
|
4
|
+
data.tar.gz: c566c64cb770d1234ca2b355577372f92426c2ff9a2854ee0909c77a53483f71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50590d35273831fc52d2916fa9e743ab7e0cef95bc9f6a6b498311f9d82f09ba037c3d30ac11de652452675af116fa52b4a86f8b9559ad07d60593a75291f7f1
|
7
|
+
data.tar.gz: c35f124a8a7f87c189e083013d2c943ecdfa23aff34052681fb101fce3cc2be621302781f491e3d2859618ca5c89308ace50fc2485e9e410b23328f8279175f6
|
data/lib/nova/generator.rb
CHANGED
@@ -51,6 +51,7 @@ module Nova
|
|
51
51
|
def generate
|
52
52
|
create_main_directories
|
53
53
|
create_all_files_and_directories
|
54
|
+
initialize_shape_git_repo
|
54
55
|
display_success_message
|
55
56
|
end
|
56
57
|
|
@@ -149,5 +150,33 @@ module Nova
|
|
149
150
|
create_file_from_template(File.join(app_name, file_entry[:path]), file_entry[:template])
|
150
151
|
end
|
151
152
|
end
|
153
|
+
|
154
|
+
def initialize_shape_git_repo
|
155
|
+
shape_path = File.join(app_name, 'shape')
|
156
|
+
|
157
|
+
# Initialize git repository in shape directory
|
158
|
+
Dir.chdir(shape_path) do
|
159
|
+
system('git init', out: File::NULL, err: File::NULL)
|
160
|
+
|
161
|
+
# Configure git user for initial commit (using system defaults)
|
162
|
+
# This ensures the commit works even if global git config is not set
|
163
|
+
system('git config user.email "nova-cli@example.com"', out: File::NULL, err: File::NULL)
|
164
|
+
system('git config user.name "Nova CLI"', out: File::NULL, err: File::NULL)
|
165
|
+
|
166
|
+
# Add all files
|
167
|
+
system('git add .', out: File::NULL, err: File::NULL)
|
168
|
+
|
169
|
+
# Make initial commit
|
170
|
+
system('git commit -m "Initial nova shape documentation structure"', out: File::NULL, err: File::NULL)
|
171
|
+
|
172
|
+
# Remove the local git config so user's global config takes over
|
173
|
+
system('git config --unset user.email', out: File::NULL, err: File::NULL)
|
174
|
+
system('git config --unset user.name', out: File::NULL, err: File::NULL)
|
175
|
+
end
|
176
|
+
|
177
|
+
puts "\n✓ Git repository initialized in shape/ directory with initial commit"
|
178
|
+
rescue => e
|
179
|
+
puts "\n⚠ Warning: Could not initialize git repository in shape/ directory: #{e.message}"
|
180
|
+
end
|
152
181
|
end
|
153
182
|
end
|
data/lib/nova/templates/nova.mdc
CHANGED
@@ -47,7 +47,9 @@ You are working in a Nova project that follows a structured product development
|
|
47
47
|
- Review shape/ documentation first
|
48
48
|
- Follow tasks in shape/4_tasks/
|
49
49
|
- When any task or subtask is completed, check it off in the appropriate task file
|
50
|
-
- After completing a subtask, commit your work to the new branch
|
50
|
+
- After completing a subtask, commit your work to the new branch. Before committing your work, please look for opportunities to refactor/improve the code you wrote for better readability and/or performance (e.g. small methods, squash n+1 queries, etc.)
|
51
|
+
- Use the `gh` CLI tool to open a new PR and in the body/description of the PR include the content from the task
|
52
|
+
|
51
53
|
|
52
54
|
### Code Quality Standards
|
53
55
|
- Rails conventions with RSpec tests
|
data/lib/nova.rb
CHANGED