nova-cli 0.2.5 → 0.2.6
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.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: 151c2a58346e1260b2c7a2248e84e4fa89a72a9226ebcf2773b7b9e79f0a01f2
|
4
|
+
data.tar.gz: 9a43f7115da40d8be57576b01b733e747f2af8bac40cabc96875caca863220fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abc1c15c0e9ed2ab91e03febdf970a7fa5897adf4d85fd5e31eb1efba08fc911291cd349ff4e1de295cc5f2707bd791fa671367eed8073800f9567b49e003618
|
7
|
+
data.tar.gz: e41105ee6c2a22717f8f0c1196266304ec904e4363491bc842c0f903b3c0f1531e8d9fc9e45b8fb39377a04f682cdeade4ffcf99474554989f200f414ad8178c
|
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.rb
CHANGED