better_app_gen 0.1.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 +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +134 -0
- data/CHANGELOG.md +29 -0
- data/CLAUDE.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +174 -0
- data/RELEASE.md +25 -0
- data/Rakefile +10 -0
- data/exe/better_app_gen +6 -0
- data/lib/better_app_gen/app_generator.rb +75 -0
- data/lib/better_app_gen/cli.rb +136 -0
- data/lib/better_app_gen/configuration.rb +90 -0
- data/lib/better_app_gen/dependency_checker.rb +129 -0
- data/lib/better_app_gen/errors.rb +56 -0
- data/lib/better_app_gen/generators/base.rb +219 -0
- data/lib/better_app_gen/generators/database.rb +64 -0
- data/lib/better_app_gen/generators/docker.rb +73 -0
- data/lib/better_app_gen/generators/gemfile.rb +26 -0
- data/lib/better_app_gen/generators/home_controller.rb +34 -0
- data/lib/better_app_gen/generators/locale.rb +24 -0
- data/lib/better_app_gen/generators/rails_app.rb +60 -0
- data/lib/better_app_gen/generators/simple_form.rb +33 -0
- data/lib/better_app_gen/generators/solid_stack.rb +18 -0
- data/lib/better_app_gen/generators/vite.rb +122 -0
- data/lib/better_app_gen/templates/app/controllers/home_controller.rb.erb +4 -0
- data/lib/better_app_gen/templates/app/helpers/home_helper.rb.erb +2 -0
- data/lib/better_app_gen/templates/app/views/home/index.html.erb.erb +2 -0
- data/lib/better_app_gen/templates/app/views/layouts/application.html.erb.erb +33 -0
- data/lib/better_app_gen/templates/bin/dev.erb +11 -0
- data/lib/better_app_gen/templates/bin/docker-entrypoint.erb +7 -0
- data/lib/better_app_gen/templates/bin/docker-entrypoint.prod.erb +12 -0
- data/lib/better_app_gen/templates/config/application.rb.erb +80 -0
- data/lib/better_app_gen/templates/config/database.yml.erb +65 -0
- data/lib/better_app_gen/templates/config/initializers/active_record_schema_settings.rb.erb +3 -0
- data/lib/better_app_gen/templates/config/initializers/better_vite_helper.rb.erb +5 -0
- data/lib/better_app_gen/templates/config/initializers/simple_form.rb.erb +21 -0
- data/lib/better_app_gen/templates/config/locales/it.yml.erb +68 -0
- data/lib/better_app_gen/templates/config/locales/simple_form.it.yml.erb +49 -0
- data/lib/better_app_gen/templates/config/routes.rb.erb +15 -0
- data/lib/better_app_gen/templates/db/cable_migrate/create_solid_cable_schema.rb.erb +15 -0
- data/lib/better_app_gen/templates/db/cache_migrate/create_solid_cache_schema.rb.erb +16 -0
- data/lib/better_app_gen/templates/db/migrate/create_shared_schema.rb.erb +31 -0
- data/lib/better_app_gen/templates/db/migrate/enable_uuid_extension.rb.erb +7 -0
- data/lib/better_app_gen/templates/db/queue_migrate/create_solid_queue_schema.rb.erb +133 -0
- data/lib/better_app_gen/templates/docker/DEPLOY.md.erb +129 -0
- data/lib/better_app_gen/templates/docker/Dockerfile.dev.erb +58 -0
- data/lib/better_app_gen/templates/docker/Dockerfile.prod.erb +172 -0
- data/lib/better_app_gen/templates/docker/compose.runner.yml.erb +6 -0
- data/lib/better_app_gen/templates/docker/compose.yml.erb +86 -0
- data/lib/better_app_gen/templates/docker/env.docker.erb +28 -0
- data/lib/better_app_gen/templates/lib/tasks/db.rake.erb +28 -0
- data/lib/better_app_gen/templates/public/robots.txt.erb +1 -0
- data/lib/better_app_gen/templates/root/Procfile.dev.erb +2 -0
- data/lib/better_app_gen/templates/root/env.example.erb +27 -0
- data/lib/better_app_gen/templates/root/gitignore.erb +404 -0
- data/lib/better_app_gen/templates/root/yarnrc.yml.erb +6 -0
- data/lib/better_app_gen/templates/script/dc-attach.erb +13 -0
- data/lib/better_app_gen/templates/script/dc-build.erb +8 -0
- data/lib/better_app_gen/templates/script/dc-down.erb +8 -0
- data/lib/better_app_gen/templates/script/dc-logs-tail.erb +16 -0
- data/lib/better_app_gen/templates/script/dc-logs.erb +17 -0
- data/lib/better_app_gen/templates/script/dc-rails.erb +8 -0
- data/lib/better_app_gen/templates/script/dc-restart.erb +11 -0
- data/lib/better_app_gen/templates/script/dc-shell.erb +12 -0
- data/lib/better_app_gen/templates/script/dc-up.erb +11 -0
- data/lib/better_app_gen/templates/vite/application.css.erb +12 -0
- data/lib/better_app_gen/templates/vite/application.js.erb +6 -0
- data/lib/better_app_gen/templates/vite/controllers/application.js.erb +9 -0
- data/lib/better_app_gen/templates/vite/controllers/hello_controller.js.erb +7 -0
- data/lib/better_app_gen/templates/vite/controllers/index.js.erb +8 -0
- data/lib/better_app_gen/templates/vite/postcss.config.js.erb +5 -0
- data/lib/better_app_gen/templates/vite/vite.config.js.erb +48 -0
- data/lib/better_app_gen/version.rb +5 -0
- data/lib/better_app_gen.rb +23 -0
- metadata +182 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos,visualstudiocode,rubymine,webstorm,rails,ruby,direnv,dotenv,node,sass
|
|
2
|
+
|
|
3
|
+
### direnv ###
|
|
4
|
+
.direnv
|
|
5
|
+
.envrc
|
|
6
|
+
|
|
7
|
+
### dotenv ###
|
|
8
|
+
.env
|
|
9
|
+
.env.docker
|
|
10
|
+
|
|
11
|
+
### Linux ###
|
|
12
|
+
*~
|
|
13
|
+
|
|
14
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
15
|
+
.fuse_hidden*
|
|
16
|
+
|
|
17
|
+
# KDE directory preferences
|
|
18
|
+
.directory
|
|
19
|
+
|
|
20
|
+
# Linux trash folder which might appear on any partition or disk
|
|
21
|
+
.Trash-*
|
|
22
|
+
|
|
23
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
24
|
+
.nfs*
|
|
25
|
+
|
|
26
|
+
### macOS ###
|
|
27
|
+
# General
|
|
28
|
+
.DS_Store
|
|
29
|
+
.AppleDouble
|
|
30
|
+
.LSOverride
|
|
31
|
+
|
|
32
|
+
# Icon must end with two \r
|
|
33
|
+
Icon
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Thumbnails
|
|
37
|
+
._*
|
|
38
|
+
|
|
39
|
+
# Files that might appear in the root of a volume
|
|
40
|
+
.DocumentRevisions-V100
|
|
41
|
+
.fseventsd
|
|
42
|
+
.Spotlight-V100
|
|
43
|
+
.TemporaryItems
|
|
44
|
+
.Trashes
|
|
45
|
+
.VolumeIcon.icns
|
|
46
|
+
.com.apple.timemachine.donotpresent
|
|
47
|
+
|
|
48
|
+
# Directories potentially created on remote AFP share
|
|
49
|
+
.AppleDB
|
|
50
|
+
.AppleDesktop
|
|
51
|
+
Network Trash Folder
|
|
52
|
+
Temporary Items
|
|
53
|
+
.apdisk
|
|
54
|
+
|
|
55
|
+
### macOS Patch ###
|
|
56
|
+
# iCloud generated files
|
|
57
|
+
*.icloud
|
|
58
|
+
|
|
59
|
+
### Node ###
|
|
60
|
+
# Logs
|
|
61
|
+
logs
|
|
62
|
+
*.log
|
|
63
|
+
npm-debug.log*
|
|
64
|
+
yarn-debug.log*
|
|
65
|
+
yarn-error.log*
|
|
66
|
+
lerna-debug.log*
|
|
67
|
+
.pnpm-debug.log*
|
|
68
|
+
|
|
69
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
70
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
71
|
+
|
|
72
|
+
# Runtime data
|
|
73
|
+
pids
|
|
74
|
+
*.pid
|
|
75
|
+
*.seed
|
|
76
|
+
*.pid.lock
|
|
77
|
+
|
|
78
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
79
|
+
lib-cov
|
|
80
|
+
|
|
81
|
+
# Coverage directory used by tools like istanbul
|
|
82
|
+
coverage
|
|
83
|
+
*.lcov
|
|
84
|
+
|
|
85
|
+
# nyc test coverage
|
|
86
|
+
.nyc_output
|
|
87
|
+
|
|
88
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
89
|
+
.grunt
|
|
90
|
+
|
|
91
|
+
# Bower dependency directory (https://bower.io/)
|
|
92
|
+
bower_components
|
|
93
|
+
|
|
94
|
+
# node-waf configuration
|
|
95
|
+
.lock-wscript
|
|
96
|
+
|
|
97
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
98
|
+
build/Release
|
|
99
|
+
|
|
100
|
+
# Dependency directories
|
|
101
|
+
node_modules/
|
|
102
|
+
jspm_packages/
|
|
103
|
+
|
|
104
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
105
|
+
web_modules/
|
|
106
|
+
|
|
107
|
+
# TypeScript cache
|
|
108
|
+
*.tsbuildinfo
|
|
109
|
+
|
|
110
|
+
# Optional npm cache directory
|
|
111
|
+
.npm
|
|
112
|
+
|
|
113
|
+
# Optional eslint cache
|
|
114
|
+
.eslintcache
|
|
115
|
+
|
|
116
|
+
# Optional stylelint cache
|
|
117
|
+
.stylelintcache
|
|
118
|
+
|
|
119
|
+
# Microbundle cache
|
|
120
|
+
.rpt2_cache/
|
|
121
|
+
.rts2_cache_cjs/
|
|
122
|
+
.rts2_cache_es/
|
|
123
|
+
.rts2_cache_umd/
|
|
124
|
+
|
|
125
|
+
# Optional REPL history
|
|
126
|
+
.node_repl_history
|
|
127
|
+
|
|
128
|
+
# Output of 'npm pack'
|
|
129
|
+
*.tgz
|
|
130
|
+
|
|
131
|
+
# Yarn Integrity file
|
|
132
|
+
.yarn-integrity
|
|
133
|
+
|
|
134
|
+
# dotenv environment variable files
|
|
135
|
+
.env.development.local
|
|
136
|
+
.env.test.local
|
|
137
|
+
.env.production.local
|
|
138
|
+
.env.local
|
|
139
|
+
|
|
140
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
141
|
+
.cache
|
|
142
|
+
.parcel-cache
|
|
143
|
+
|
|
144
|
+
# Next.js build output
|
|
145
|
+
.next
|
|
146
|
+
out
|
|
147
|
+
|
|
148
|
+
# Nuxt.js build / generate output
|
|
149
|
+
.nuxt
|
|
150
|
+
dist
|
|
151
|
+
|
|
152
|
+
# Gatsby files
|
|
153
|
+
.cache/
|
|
154
|
+
|
|
155
|
+
# vuepress build output
|
|
156
|
+
.vuepress/dist
|
|
157
|
+
|
|
158
|
+
# vuepress v2.x temp and cache directory
|
|
159
|
+
.temp
|
|
160
|
+
|
|
161
|
+
# Docusaurus cache and generated files
|
|
162
|
+
.docusaurus
|
|
163
|
+
|
|
164
|
+
# Serverless directories
|
|
165
|
+
.serverless/
|
|
166
|
+
|
|
167
|
+
# FuseBox cache
|
|
168
|
+
.fusebox/
|
|
169
|
+
|
|
170
|
+
# DynamoDB Local files
|
|
171
|
+
.dynamodb/
|
|
172
|
+
|
|
173
|
+
# TernJS port file
|
|
174
|
+
.tern-port
|
|
175
|
+
|
|
176
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
177
|
+
.vscode-test
|
|
178
|
+
|
|
179
|
+
# Yarn v4 (node-modules mode)
|
|
180
|
+
.yarn/*
|
|
181
|
+
!.yarn/patches
|
|
182
|
+
!.yarn/plugins
|
|
183
|
+
!.yarn/releases
|
|
184
|
+
!.yarn/sdks
|
|
185
|
+
!.yarn/versions
|
|
186
|
+
.pnp.*
|
|
187
|
+
|
|
188
|
+
### Node Patch ###
|
|
189
|
+
# Serverless Webpack directories
|
|
190
|
+
.webpack/
|
|
191
|
+
|
|
192
|
+
# SvelteKit build / generate output
|
|
193
|
+
.svelte-kit
|
|
194
|
+
|
|
195
|
+
### Rails ###
|
|
196
|
+
*.rbc
|
|
197
|
+
capybara-*.html
|
|
198
|
+
.rspec
|
|
199
|
+
/db/*.sqlite3
|
|
200
|
+
/db/*.sqlite3-journal
|
|
201
|
+
/db/*.sqlite3-[0-9]*
|
|
202
|
+
/public/system
|
|
203
|
+
/coverage/
|
|
204
|
+
/spec/tmp
|
|
205
|
+
*.orig
|
|
206
|
+
rerun.txt
|
|
207
|
+
pickle-email-*.html
|
|
208
|
+
|
|
209
|
+
# Ignore all logfiles and tempfiles.
|
|
210
|
+
/log/*
|
|
211
|
+
/tmp/*
|
|
212
|
+
!/log/.keep
|
|
213
|
+
!/tmp/.keep
|
|
214
|
+
|
|
215
|
+
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
|
216
|
+
config/initializers/secret_token.rb
|
|
217
|
+
config/master.key
|
|
218
|
+
|
|
219
|
+
# Only include if you have production secrets in this file, which is no longer a Rails default
|
|
220
|
+
# config/secrets.yml
|
|
221
|
+
|
|
222
|
+
# dotenv, dotenv-rails
|
|
223
|
+
# TODO Comment out these rules if environment variables can be committed
|
|
224
|
+
.env*.local
|
|
225
|
+
|
|
226
|
+
## Environment normalization:
|
|
227
|
+
/.bundle
|
|
228
|
+
/vendor/bundle
|
|
229
|
+
|
|
230
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
231
|
+
.rvmrc
|
|
232
|
+
|
|
233
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
|
234
|
+
/vendor/assets/bower_components
|
|
235
|
+
*.bowerrc
|
|
236
|
+
bower.json
|
|
237
|
+
|
|
238
|
+
# Ignore pow environment settings
|
|
239
|
+
.powenv
|
|
240
|
+
|
|
241
|
+
# Ignore Byebug command history file.
|
|
242
|
+
.byebug_history
|
|
243
|
+
|
|
244
|
+
# Ignore precompiled javascript packs
|
|
245
|
+
/public/packs
|
|
246
|
+
/public/packs-test
|
|
247
|
+
/public/assets
|
|
248
|
+
|
|
249
|
+
# Ignore yarn files
|
|
250
|
+
/yarn-error.log
|
|
251
|
+
|
|
252
|
+
# Ignore uploaded files in development
|
|
253
|
+
/storage/*
|
|
254
|
+
!/storage/.keep
|
|
255
|
+
/public/uploads
|
|
256
|
+
|
|
257
|
+
### Ruby ###
|
|
258
|
+
*.gem
|
|
259
|
+
/.config
|
|
260
|
+
/InstalledFiles
|
|
261
|
+
/pkg/
|
|
262
|
+
/spec/reports/
|
|
263
|
+
/spec/examples.txt
|
|
264
|
+
/test/tmp/
|
|
265
|
+
/test/version_tmp/
|
|
266
|
+
/tmp/
|
|
267
|
+
|
|
268
|
+
## Specific to RubyMotion:
|
|
269
|
+
.dat*
|
|
270
|
+
.repl_history
|
|
271
|
+
build/
|
|
272
|
+
*.bridgesupport
|
|
273
|
+
build-iPhoneOS/
|
|
274
|
+
build-iPhoneSimulator/
|
|
275
|
+
|
|
276
|
+
## Documentation cache and generated files:
|
|
277
|
+
/.yardoc/
|
|
278
|
+
/_yardoc/
|
|
279
|
+
/doc/
|
|
280
|
+
/rdoc/
|
|
281
|
+
|
|
282
|
+
/.bundle/
|
|
283
|
+
/lib/bundler/man/
|
|
284
|
+
|
|
285
|
+
### RubyMine ###
|
|
286
|
+
.idea/**/workspace.xml
|
|
287
|
+
.idea/**/tasks.xml
|
|
288
|
+
.idea/**/usage.statistics.xml
|
|
289
|
+
.idea/**/dictionaries
|
|
290
|
+
.idea/**/shelf
|
|
291
|
+
|
|
292
|
+
# AWS User-specific
|
|
293
|
+
.idea/**/aws.xml
|
|
294
|
+
|
|
295
|
+
# Generated files
|
|
296
|
+
.idea/**/contentModel.xml
|
|
297
|
+
|
|
298
|
+
# Sensitive or high-churn files
|
|
299
|
+
.idea/**/dataSources/
|
|
300
|
+
.idea/**/dataSources.ids
|
|
301
|
+
.idea/**/dataSources.local.xml
|
|
302
|
+
.idea/**/sqlDataSources.xml
|
|
303
|
+
.idea/**/dynamic.xml
|
|
304
|
+
.idea/**/uiDesigner.xml
|
|
305
|
+
|
|
306
|
+
# Gradle
|
|
307
|
+
.idea/**/gradle.xml
|
|
308
|
+
.idea/**/libraries
|
|
309
|
+
|
|
310
|
+
# CMake
|
|
311
|
+
cmake-build-*/
|
|
312
|
+
|
|
313
|
+
# Mongo Explorer plugin
|
|
314
|
+
.idea/**/mongoSettings.xml
|
|
315
|
+
|
|
316
|
+
# File-based project format
|
|
317
|
+
*.iws
|
|
318
|
+
|
|
319
|
+
# IntelliJ
|
|
320
|
+
out/
|
|
321
|
+
|
|
322
|
+
# mpeltonen/sbt-idea plugin
|
|
323
|
+
.idea_modules/
|
|
324
|
+
|
|
325
|
+
# JIRA plugin
|
|
326
|
+
atlassian-ide-plugin.xml
|
|
327
|
+
|
|
328
|
+
# Cursive Clojure plugin
|
|
329
|
+
.idea/replstate.xml
|
|
330
|
+
|
|
331
|
+
# SonarLint plugin
|
|
332
|
+
.idea/sonarlint/
|
|
333
|
+
|
|
334
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
335
|
+
com_crashlytics_export_strings.xml
|
|
336
|
+
crashlytics.properties
|
|
337
|
+
crashlytics-build.properties
|
|
338
|
+
fabric.properties
|
|
339
|
+
|
|
340
|
+
# Editor-based Rest Client
|
|
341
|
+
.idea/httpRequests
|
|
342
|
+
|
|
343
|
+
# Android studio 3.1+ serialized cache file
|
|
344
|
+
.idea/caches/build_file_checksums.ser
|
|
345
|
+
|
|
346
|
+
### RubyMine Patch ###
|
|
347
|
+
.idea/**/sonarlint/
|
|
348
|
+
.idea/**/sonarIssues.xml
|
|
349
|
+
.idea/**/markdown-navigator.xml
|
|
350
|
+
.idea/**/markdown-navigator-enh.xml
|
|
351
|
+
.idea/**/markdown-navigator/
|
|
352
|
+
.idea/$CACHE_FILE$
|
|
353
|
+
.idea/codestream.xml
|
|
354
|
+
.idea/**/azureSettings.xml
|
|
355
|
+
|
|
356
|
+
### Sass ###
|
|
357
|
+
.sass-cache/
|
|
358
|
+
*.css.map
|
|
359
|
+
*.sass.map
|
|
360
|
+
*.scss.map
|
|
361
|
+
|
|
362
|
+
### VisualStudioCode ###
|
|
363
|
+
.vscode/*
|
|
364
|
+
!.vscode/settings.json
|
|
365
|
+
!.vscode/tasks.json
|
|
366
|
+
!.vscode/launch.json
|
|
367
|
+
!.vscode/extensions.json
|
|
368
|
+
!.vscode/*.code-snippets
|
|
369
|
+
|
|
370
|
+
# Local History for Visual Studio Code
|
|
371
|
+
.history/
|
|
372
|
+
|
|
373
|
+
# Built Visual Studio Code Extensions
|
|
374
|
+
*.vsix
|
|
375
|
+
|
|
376
|
+
### VisualStudioCode Patch ###
|
|
377
|
+
.history
|
|
378
|
+
.ionide
|
|
379
|
+
|
|
380
|
+
### Windows ###
|
|
381
|
+
# Windows thumbnail cache files
|
|
382
|
+
Thumbs.db
|
|
383
|
+
Thumbs.db:encryptable
|
|
384
|
+
ehthumbs.db
|
|
385
|
+
ehthumbs_vista.db
|
|
386
|
+
|
|
387
|
+
# Dump file
|
|
388
|
+
*.stackdump
|
|
389
|
+
|
|
390
|
+
# Folder config file
|
|
391
|
+
[Dd]esktop.ini
|
|
392
|
+
|
|
393
|
+
# Recycle Bin used on file shares
|
|
394
|
+
$RECYCLE.BIN/
|
|
395
|
+
|
|
396
|
+
# Windows Installer files
|
|
397
|
+
*.cab
|
|
398
|
+
*.msi
|
|
399
|
+
*.msix
|
|
400
|
+
*.msm
|
|
401
|
+
*.msp
|
|
402
|
+
|
|
403
|
+
# Windows shortcuts
|
|
404
|
+
*.lnk
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Attach to a service's TTY for debugging
|
|
3
|
+
# Usage: script/dc-attach [service_name]
|
|
4
|
+
# Default: puma
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SERVICE=${1:-puma}
|
|
8
|
+
|
|
9
|
+
echo "Attaching to $SERVICE container..."
|
|
10
|
+
echo "Use Ctrl+P Ctrl+Q to detach without stopping"
|
|
11
|
+
echo "Use Ctrl+C to send interrupt signal (for debugger)"
|
|
12
|
+
|
|
13
|
+
docker compose attach $SERVICE
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Show last N lines of logs
|
|
3
|
+
# Usage: script/dc-logs-tail [service_name] [lines]
|
|
4
|
+
# Default: 100 lines from all services
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SERVICE=$1
|
|
8
|
+
LINES=${2:-100}
|
|
9
|
+
|
|
10
|
+
if [ -z "$SERVICE" ]; then
|
|
11
|
+
echo "Showing last $LINES lines from all services..."
|
|
12
|
+
docker compose logs --tail=$LINES
|
|
13
|
+
else
|
|
14
|
+
echo "Showing last $LINES lines from $SERVICE..."
|
|
15
|
+
docker compose logs --tail=$LINES $SERVICE
|
|
16
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Follow logs from services
|
|
3
|
+
# Usage: script/dc-logs [service_name]
|
|
4
|
+
# If no service specified, shows logs from all services
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SERVICE=$1
|
|
8
|
+
|
|
9
|
+
if [ -z "$SERVICE" ]; then
|
|
10
|
+
echo "Following logs from all services..."
|
|
11
|
+
echo "Press Ctrl+C to exit"
|
|
12
|
+
docker compose logs -f
|
|
13
|
+
else
|
|
14
|
+
echo "Following logs from $SERVICE..."
|
|
15
|
+
echo "Press Ctrl+C to exit"
|
|
16
|
+
docker compose logs -f $SERVICE
|
|
17
|
+
fi
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Restart all services
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
echo "Restarting services..."
|
|
6
|
+
docker compose down
|
|
7
|
+
docker compose up -d
|
|
8
|
+
|
|
9
|
+
echo "Services restarted successfully!"
|
|
10
|
+
echo "Rails app: http://localhost:<%= rails_port %>"
|
|
11
|
+
echo "Vite HMR: http://localhost:<%= vite_port %>"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Open a bash shell in a container using docker compose run
|
|
3
|
+
# Usage: script/dc-shell [service_name]
|
|
4
|
+
# Default: puma
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SERVICE=${1:-puma}
|
|
8
|
+
|
|
9
|
+
echo "Opening bash shell in $SERVICE container..."
|
|
10
|
+
echo "Type 'exit' to leave the shell"
|
|
11
|
+
|
|
12
|
+
docker compose run --rm $SERVICE bash
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Start all services in detached mode
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
echo "Starting services..."
|
|
6
|
+
docker compose up -d
|
|
7
|
+
|
|
8
|
+
echo "Services started successfully!"
|
|
9
|
+
echo "View logs with: script/dc-logs"
|
|
10
|
+
echo "Rails app: http://localhost:<%= rails_port %>"
|
|
11
|
+
echo "Vite HMR: http://localhost:<%= vite_port %>"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
/* Source paths for class detection (replaces content array from tailwind.config.js) */
|
|
4
|
+
@source "../../../views/**/*.html.erb";
|
|
5
|
+
@source "../../helpers/**/*.rb";
|
|
6
|
+
@source "../javascripts/**/*.js";
|
|
7
|
+
|
|
8
|
+
/* Theme customization (replaces tailwind.config.js theme.extend) */
|
|
9
|
+
@theme {
|
|
10
|
+
/* Add custom theme values here */
|
|
11
|
+
/* Example: --color-primary: oklch(0.7 0.15 200); */
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is auto-generated by ./bin/rails stimulus:manifest:update
|
|
2
|
+
// Run that command whenever you add a new controller or create them with
|
|
3
|
+
// ./bin/rails generate stimulus controllerName
|
|
4
|
+
|
|
5
|
+
import { application } from "./application"
|
|
6
|
+
|
|
7
|
+
import HelloController from "./hello_controller"
|
|
8
|
+
application.register("hello", HelloController)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { dirname, resolve } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
publicDir: false, // avoid conflicts with outDir
|
|
9
|
+
emptyOutDir: true,
|
|
10
|
+
css: {
|
|
11
|
+
devSourcemap: true,
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
server: {
|
|
15
|
+
port: <%= vite_port %>,
|
|
16
|
+
host: "0.0.0.0",
|
|
17
|
+
cors: true,
|
|
18
|
+
hmr: {
|
|
19
|
+
port: <%= vite_port %>,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
build: {
|
|
24
|
+
outDir: "public/assets",
|
|
25
|
+
manifest: true,
|
|
26
|
+
sourcemap: true,
|
|
27
|
+
emptyOutDir: true,
|
|
28
|
+
|
|
29
|
+
rollupOptions: {
|
|
30
|
+
input: {
|
|
31
|
+
application: resolve(
|
|
32
|
+
__dirname,
|
|
33
|
+
"app/javascript/application.js"
|
|
34
|
+
),
|
|
35
|
+
},
|
|
36
|
+
output: {
|
|
37
|
+
entryFileNames: "application-[hash].js",
|
|
38
|
+
assetFileNames: (info) => {
|
|
39
|
+
if (info.name?.endsWith(".css")) {
|
|
40
|
+
return "application-[hash][extname]";
|
|
41
|
+
}
|
|
42
|
+
return "[name]-[hash][extname]";
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
external: [],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "better_app_gen/version"
|
|
4
|
+
require_relative "better_app_gen/errors"
|
|
5
|
+
require_relative "better_app_gen/configuration"
|
|
6
|
+
require_relative "better_app_gen/dependency_checker"
|
|
7
|
+
require_relative "better_app_gen/generators/base"
|
|
8
|
+
require_relative "better_app_gen/app_generator"
|
|
9
|
+
require_relative "better_app_gen/cli"
|
|
10
|
+
|
|
11
|
+
module BetterAppGen
|
|
12
|
+
class << self
|
|
13
|
+
# Returns the root path of the gem
|
|
14
|
+
def root
|
|
15
|
+
@root ||= Pathname.new(File.expand_path("..", __dir__))
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Returns the path to the templates directory
|
|
19
|
+
def templates_path
|
|
20
|
+
@templates_path ||= root.join("lib", "better_app_gen", "templates")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|