rails_app_generator 0.2.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.builders/generators/project-plan.rb +6 -3
- data/CHANGELOG.md +28 -0
- data/after_templates/addons/dotenv/_.rb +21 -0
- data/after_templates/addons/dotenv/app/controllers/home_controller.rb +7 -0
- data/after_templates/addons/dotenv/app/views/home/index.html.erb +10 -0
- data/after_templates/addons/dotenv/app/views/layouts/application.html.erb +19 -0
- data/after_templates/addons/rubocop/_.rb +29 -0
- data/after_templates/addons/rubocop/app/assets/images/cop-output.png +0 -0
- data/after_templates/addons/rubocop/app/controllers/home_controller.rb +21 -0
- data/after_templates/addons/rubocop/app/views/home/index.html.erb +46 -0
- data/after_templates/addons/rubocop/app/views/layouts/application.html.erb +19 -0
- data/after_templates/application/printspeak/_.rb +55 -0
- data/after_templates/{rag_tailwind/component-section-begin.html → application/printspeak/app/assets/images/.keep} +0 -0
- data/after_templates/application/printspeak/app/assets/images/about/1.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/about/2.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/about/3.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/about/4.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/close-icon.svg +1 -0
- data/after_templates/application/printspeak/app/assets/images/header-bg.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/logos/facebook.svg +34 -0
- data/after_templates/application/printspeak/app/assets/images/logos/google.svg +35 -0
- data/after_templates/application/printspeak/app/assets/images/logos/ibm.svg +24 -0
- data/after_templates/application/printspeak/app/assets/images/logos/microsoft.svg +42 -0
- data/after_templates/application/printspeak/app/assets/images/map-image.png +0 -0
- data/after_templates/application/printspeak/app/assets/images/navbar-logo.svg +1 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/1.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/2.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/3.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/4.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/5.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/6.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/alphagraphics.jpeg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/brochure-transformed.jpeg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/brochure.jpeg +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/kwikkopy.png +0 -0
- data/after_templates/application/printspeak/app/assets/images/portfolio/kwikkopy2.png +0 -0
- data/after_templates/application/printspeak/app/assets/images/printspeak-logo.svg +19 -0
- data/after_templates/application/printspeak/app/assets/images/team/1.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/team/2.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/images/team/3.jpg +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/application.bootstrap.scss +3 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/_global.scss +52 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/_variables.scss +8 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/components/_buttons.scss +24 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/components/_navbar.scss +92 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/sections/_contact.scss +71 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/sections/_footer.scss +9 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/sections/_masthead.scss +52 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/sections/_portfolio.scss +108 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/sections/_team.scss +24 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/sections/_timeline.scss +214 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/styles.scss +24 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/variables/_colors.scss +15 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/home/variables/_typography.scss +54 -0
- data/after_templates/application/printspeak/app/controllers/home_controller.rb +7 -0
- data/after_templates/application/printspeak/app/views/home/_modal.erb +23 -0
- data/after_templates/application/printspeak/app/views/home/index.html.erb +321 -0
- data/after_templates/application/printspeak/app/views/layouts/_alerts.html.erb +2 -0
- data/after_templates/application/printspeak/app/views/layouts/_footer.html.erb +16 -0
- data/after_templates/application/printspeak/app/views/layouts/_navbar.html.erb +14 -0
- data/after_templates/application/printspeak/app/views/layouts/application.html.erb +29 -0
- data/after_templates/{rag_printspeak → application/printspeak/app/views}/page/_footer.html.erb +0 -0
- data/after_templates/{rag_printspeak → application/printspeak/app/views}/page/architecture.html.erb +0 -0
- data/after_templates/{rag_printspeak → application/printspeak/app/views}/page/blog.html.erb +0 -0
- data/after_templates/{rag_printspeak → application/printspeak/app/views}/page/faq.html.erb +0 -0
- data/after_templates/application/printspeak/app/views/page/page_controller.rb +27 -0
- data/after_templates/{rag_printspeak → application/printspeak/app/views}/page/readme.html.erb +0 -0
- data/after_templates/application/printspeak/db/seeds.rb +16 -0
- data/after_templates/printspeak_bak/_.rb +36 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/application_controller.rb +0 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/faq.html.erb +0 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/layouts/_footer.html.erb +0 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/layouts/_head.html.erb +0 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/layouts/_navbar.html.erb +0 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/layouts/application.html.erb +0 -0
- data/after_templates/printspeak_bak/page/_footer.html.erb +184 -0
- data/after_templates/printspeak_bak/page/architecture.html.erb +33 -0
- data/after_templates/printspeak_bak/page/blog.html.erb +44 -0
- data/after_templates/printspeak_bak/page/faq.html.erb +2 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/page/home.html.erb +0 -0
- data/after_templates/{rag_printspeak → printspeak_bak}/page/page_controller.rb +0 -0
- data/after_templates/printspeak_bak/page/readme.html.erb +49 -0
- data/after_templates/{rag_bootstrap.rb → rag/bootstrap/_.rb} +1 -1
- data/after_templates/{rag_bootstrap → rag/bootstrap}/application-yield.html.erb +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/application.html.erb +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-cards-fancy.css +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-cards-fancy.html +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-cards-staff.css +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-cards-staff.html +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-cards-styled.html +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-footer.html +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-hero.html +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-modal.html +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/component-nav.html +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/custom-bootstrap-import.scss +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/custom-using-css.css +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/custom-using-scss.scss +0 -0
- data/after_templates/{rag_bootstrap → rag/bootstrap}/manifest.js +0 -0
- data/after_templates/{rag_devise.rb → rag/devise/_.rb} +1 -1
- data/after_templates/{rag_devise → rag/devise}/application.html.erb +0 -0
- data/after_templates/{rag_devise → rag/devise}/application_controller.rb +0 -0
- data/after_templates/{rag_devise → rag/devise}/config/initializers/devise_turbo.rb +0 -0
- data/after_templates/{rag_devise → rag/devise}/layouts/_alerts.html.erb +0 -0
- data/after_templates/{rag_devise → rag/devise}/layouts/_footer.html.erb +0 -0
- data/after_templates/{rag_devise → rag/devise}/layouts/_navbar.html.erb +0 -0
- data/after_templates/{rag_devise → rag/devise}/layouts/application.html.erb +0 -0
- data/after_templates/{rag_devise → rag/devise}/post/_post.html.erb +0 -0
- data/after_templates/{rag_devise → rag/devise}/post/post.rb +0 -0
- data/after_templates/{rag_devise → rag/devise}/post/posts_controller.rb +0 -0
- data/after_templates/{rag_devise → rag/devise}/seed_data.rb +0 -0
- data/after_templates/{rag_devise → rag/devise}/turbo_controller.rb +0 -0
- data/after_templates/{rag_devise → rag/devise}/user.rb +0 -0
- data/after_templates/{rag_import_map.rb → rag/import_map/_.rb} +1 -1
- data/after_templates/{rag_import_map → rag/import_map}/component-sortable.html +0 -0
- data/after_templates/{rag_import_map → rag/import_map}/home.css +0 -0
- data/after_templates/{rag_import_map → rag/import_map}/position_controller.js +0 -0
- data/after_templates/{rag_simple.rb → rag/simple/_.rb} +1 -1
- data/after_templates/{rag_tailwind.rb → rag/tailwind/_.rb} +1 -1
- data/after_templates/{rag_tailwind → rag/tailwind}/component-cta.html +0 -0
- data/after_templates/{rag_tailwind → rag/tailwind}/component-faq.html +0 -0
- data/after_templates/{rag_tailwind → rag/tailwind}/component-footer.html +0 -0
- data/after_templates/{rag_tailwind → rag/tailwind}/component-hero.html +0 -0
- data/after_templates/{rag_tailwind → rag/tailwind}/component-nav.html +0 -0
- data/after_templates/{rag_tailwind/component-section-end.html → rag/tailwind/component-section-begin.html} +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap/home/index.html.erb → rag/tailwind/component-section-end.html} +0 -0
- data/after_templates/{rag_tailwind_daisyui.rb → rag/tailwind_daisyui/_.rb} +1 -1
- data/after_templates/{rag_tailwind_daisyui → rag/tailwind_daisyui}/index.html.erb +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/Procfile.dev +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap.rb → rag/tailwind_emulating_bootstrap/_.rb} +1 -1
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/application.html.erb +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/application.tailwind.css +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/application_controller.rb +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/home/_example.html.erb +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/home/bootstrap.html.erb +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/home/home_controller.rb +0 -0
- data/after_templates/rag/tailwind_emulating_bootstrap/home/index.html.erb +0 -0
- data/after_templates/{rag_tailwind_emulating_bootstrap → rag/tailwind_emulating_bootstrap}/home/tailwind.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire.rb → rag/tailwind_hotwire/_.rb} +1 -1
- data/after_templates/{rag_tailwind_hotwire → rag/tailwind_hotwire}/home/controller.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire → rag/tailwind_hotwire}/home/helper.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire → rag/tailwind_hotwire}/home/increment.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire → rag/tailwind_hotwire}/home/index.html +0 -0
- data/after_templates/{rag_tailwind_hotwire_flash.rb → rag/tailwind_hotwire_flash/_.rb} +1 -1
- data/after_templates/{rag_tailwind_hotwire_form.rb → rag/tailwind_hotwire_form/_.rb} +1 -1
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/_contact.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/_count.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/_flash.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/_form.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/_list.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/application.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/application.js +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/application.tailwind.css +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/application_helper.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/contact.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/contacts_controller.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/create.turbo_stream.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/edit.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/index.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/new.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/show.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form → rag/tailwind_hotwire_form}/update.turbo_stream.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search.rb → rag/tailwind_hotwire_form_search/_.rb} +1 -3
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/_contact.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/_count.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/_flash.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/_form.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/_list.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/_theme_changer.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/application.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/application.js +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/application.tailwind.css +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/application_helper.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/contact.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/contacts_controller.rb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/create.turbo_stream.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/edit.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/index.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/new.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/search_controller.js +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/show.html.erb +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/theme_changer_controller.js +0 -0
- data/after_templates/{rag_tailwind_hotwire_form_search → rag/tailwind_hotwire_form_search}/update.turbo_stream.erb +0 -0
- data/docs/last_run/app_generator_class.json +40 -0
- data/docs/last_run/app_generator_data.json +8 -2
- data/docs/last_run/rails_options_class.json +40 -0
- data/docs/last_run/rails_options_data.json +8 -2
- data/docs/project-plan/project.drawio +49 -46
- data/docs/project-plan/project_todo.svg +1 -1
- data/lib/rails_app_generator/addons/annotate.rb +0 -3
- data/lib/rails_app_generator/addons/continuous_integration.rb +1 -0
- data/lib/rails_app_generator/addons/devise.rb +1 -0
- data/lib/rails_app_generator/addons/docker_compose.rb +1 -0
- data/lib/rails_app_generator/addons/dotenv.rb +2 -0
- data/lib/rails_app_generator/addons/factory_bot.rb +1 -0
- data/lib/rails_app_generator/addons/foreman.rb +1 -0
- data/lib/rails_app_generator/addons/rubocop.rb +4 -0
- data/lib/rails_app_generator/app_generator.rb +0 -5
- data/lib/rails_app_generator/rag_initializer.rb +77 -75
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/dotenv.json +12 -0
- data/profiles/addons/rubocop.json +12 -0
- data/profiles/{rag-printspeak.json → application/printspeak.json} +4 -2
- data/profiles/{rag-bootstrap.json → rag/bootstrap.json} +1 -1
- data/profiles/{rag-devise.json → rag/devise.json} +1 -1
- data/profiles/{rag-import-map.json → rag/import-map.json} +1 -1
- data/profiles/{rag-simple.json → rag/simple.json} +3 -2
- data/profiles/{rag-tailwind-daisyui.json → rag/tailwind-daisyui.json} +1 -1
- data/profiles/{rag-tailwind-emulating-bootstrap.json → rag/tailwind-emulating-bootstrap.json} +2 -3
- data/profiles/{rag-tailwind-hotwire-flash.json → rag/tailwind-hotwire-flash.json} +1 -1
- data/profiles/{rag-tailwind-hotwire-form-search.json → rag/tailwind-hotwire-form-search.json} +1 -1
- data/profiles/{rag-tailwind-hotwire-form.json → rag/tailwind-hotwire-form.json} +1 -1
- data/profiles/{rag-tailwind-hotwire.json → rag/tailwind-hotwire.json} +1 -1
- data/profiles/{rag-tailwind.json → rag/tailwind.json} +3 -2
- data/tasks/profile.thor +1 -1
- data/templates/addons/rubocop/.rubocop.yml.erb +5 -2
- data/templates/thor_task/addon/addon.tt +1 -1
- data/templates/thor_task/profile/after_template.rb +1 -0
- metadata +196 -130
- data/after_templates/rag_printspeak.rb +0 -36
- data/profiles/rag-add-some-pages.json +0 -11
- data/profiles/rag-sample.json +0 -13
@@ -9,6 +9,7 @@ module RailsAppGenerator
|
|
9
9
|
|
10
10
|
required_gem gem.version('devise', '4.8.1', 'Flexible authentication solution for Rails with Warden')
|
11
11
|
|
12
|
+
# Requires Testing
|
12
13
|
def apply
|
13
14
|
generate('devise:install', capture: true)
|
14
15
|
generate(:devise, 'User', 'name', 'admin:boolean', capture: true)
|
@@ -5,6 +5,8 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add DotEnv to rails application
|
7
7
|
class Dotenv < RailsAppGenerator::Addon
|
8
|
+
required_gem gem.version('dotenv-rails', '2.8.1', 'Loads environment variables from `.env`.')
|
9
|
+
|
8
10
|
def apply
|
9
11
|
template '.env.development.erb', '.env.development'
|
10
12
|
end
|
@@ -5,6 +5,7 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add Foreman process management for applications with multiple components
|
7
7
|
class Foreman < RailsAppGenerator::Addon
|
8
|
+
# Requires Testing
|
8
9
|
def apply
|
9
10
|
template '.foreman.erb', '.foreman'
|
10
11
|
template 'Procfile.erb', 'Procfile'
|
@@ -5,6 +5,10 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add Rubocop to rails application
|
7
7
|
class Rubocop < RailsAppGenerator::Addon
|
8
|
+
# required_gem gem.version('rubocop', '1.34.0', 'RuboCop is a Ruby code style checking and code formatting tool.')
|
9
|
+
# TODO: This needs to go into the development group
|
10
|
+
required_gem gem.version('rubocop-rails', '2.15.2', 'NOTE: MOVE TO DEVELOPMENT GROUP: RuboCop linter with focused on enforcing Rails best practices and coding conventions.')
|
11
|
+
|
8
12
|
def apply
|
9
13
|
template '.rubocop.yml.erb', '.rubocop.yml'
|
10
14
|
end
|
@@ -213,11 +213,6 @@ module RailsAppGenerator
|
|
213
213
|
|
214
214
|
# https://codingpackets.com/blog/rails-generators-cheat-sheet/
|
215
215
|
|
216
|
-
# OLD style will be removed soon
|
217
|
-
def local_template_base(xxx)
|
218
|
-
File.join(File.dirname(xxx), File.basename(xxx, '.*'))
|
219
|
-
end
|
220
|
-
|
221
216
|
# force_copy? # defaults to false
|
222
217
|
# force_copy(true) # set to true
|
223
218
|
# force_copy(false) # set to false
|
@@ -3,13 +3,14 @@
|
|
3
3
|
# frozen__tring_literal: true
|
4
4
|
|
5
5
|
KConfig.configure do |config|
|
6
|
+
rag = config.rag
|
6
7
|
# https://railsbytes.com/public/templates
|
7
8
|
# http://www.railscomposer.com/
|
8
9
|
# https://github.com/RailsApps/rails-composer
|
9
10
|
# https://github.com/carbonfive/raygun-rails
|
10
11
|
# https://github.com/abhaynikam/boring_generators
|
11
12
|
|
12
|
-
#
|
13
|
+
# rag.add_option :test , type: :string , default: 'rspec'
|
13
14
|
|
14
15
|
# # Gem Current Latest Requested Groups
|
15
16
|
# # aws-sdk
|
@@ -127,47 +128,48 @@ KConfig.configure do |config|
|
|
127
128
|
# # webmock 3.13.0 3.14.0 = 3.13.0 development, test
|
128
129
|
# # websocket-driver 0.6.5 0.7.5
|
129
130
|
|
130
|
-
#
|
131
|
-
#
|
132
|
-
|
133
|
-
# XXX
|
134
|
-
# XXX
|
135
|
-
# XXX
|
136
|
-
#
|
137
|
-
# XXX
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
131
|
+
# rag.add_option :skip_namespace , type: :boolean , default: false , description: "Skip namespace (affects only isolated engines)"
|
132
|
+
# rag.add_option :skip_collision_check , type: :boolean , default: false , description: "Skip collision check"
|
133
|
+
rag.add_option :force , type: :boolean , default: nil , description: 'Overwrite files that already exist'
|
134
|
+
# XXX rag.add_option :pretend , type: :boolean , default: nil , description: "Run but do not make any changes"
|
135
|
+
# XXX rag.add_option :quiet , type: :boolean , default: nil , description: "Suppress status output"
|
136
|
+
# XXX rag.add_option :skip , type: :boolean , default: nil , description: "Skip files that already exist"
|
137
|
+
# rag.add_option :ruby , type: :string , default: "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby" , description: "Path to the Ruby binary of your choice"
|
138
|
+
# XXX rag.add_option :template , type: :string , default: nil , description: "Path to some application template (can be a filesystem path or URL)"
|
139
|
+
# rag.add_option :database , type: :string , default: "sqlite3" , description: "Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)"
|
140
|
+
# rag.add_option :skip_git , type: :boolean , default: false , description: "Skip .gitignore file"
|
141
|
+
# rag.add_option :skip_keeps , type: :boolean , default: false , description: "Skip source control .keep files"
|
142
|
+
# rag.add_option :skip_action_mailer , type: :boolean , default: false , description: "Skip Action Mailer files"
|
143
|
+
# rag.add_option :skip_action_mailbox , type: :boolean , default: false , description: "Skip Action Mailbox gem"
|
144
|
+
# rag.add_option :skip_action_text , type: :boolean , default: false , description: "Skip Action Text gem"
|
145
|
+
# rag.add_option :skip_active_record , type: :boolean , default: false , description: "Skip Active Record files"
|
146
|
+
# rag.add_option :skip_active_job , type: :boolean , default: false , description: "Skip Active Job"
|
147
|
+
# rag.add_option :skip_active_storage , type: :boolean , default: false , description: "Skip Active Storage files"
|
148
|
+
# rag.add_option :skip_action_cable , type: :boolean , default: false , description: "Skip Action Cable files"
|
149
|
+
# rag.add_option :skip_asset_pipeline , type: :boolean , default: false , description: "Indicates when to generate skip asset pipeline"
|
150
|
+
# rag.add_option :asset_pipeline , type: :string , default: "sprockets" , description: "Choose your asset pipeline [options: sprockets (default), propshaft]"
|
151
|
+
# rag.add_option :skip_javascript , type: :boolean , default: false , description: "Skip JavaScript files"
|
152
|
+
# rag.add_option :skip_hotwire , type: :boolean , default: false , description: "Skip Hotwire integration"
|
153
|
+
# rag.add_option :skip_jbuilder , type: :boolean , default: false , description: "Skip jbuilder gem"
|
154
|
+
# rag.add_option :skip_test , type: :boolean , default: false , description: "Skip test files"
|
155
|
+
# rag.add_option :skip_system_test , type: :boolean , default: false , description: "Skip system test files"
|
156
|
+
# rag.add_option :skip_bootsnap , type: :boolean , default: false , description: "Skip bootsnap gem"
|
157
|
+
# rag.add_option :dev , type: :boolean , default: false , description: "Set up the application with Gemfile pointing to your Rails checkout"
|
158
|
+
# rag.add_option :edge , type: :boolean , default: false , description: "Set up the application with Gemfile pointing to Rails repository"
|
159
|
+
rag.add_option :note , type: :string , default: nil , description: "Set a note or comment"
|
160
|
+
# rag.add_option :main , type: :boolean , default: false , description: "Set up the application with Gemfile pointing to Rails repository main branch"
|
161
|
+
# rag.add_option :rc , type: :string , default: nil , description: "Path to file containing extra configuration options for rails command"
|
162
|
+
# rag.add_option :no_rc , type: :boolean , default: false , description: "Skip loading of extra configuration options from .railsrc file"
|
163
|
+
# rag.add_option :help , type: :boolean , default: nil , description: "Show this help message and quit"
|
164
|
+
# rag.add_option :version , type: :boolean , default: nil , description: "Show Rails version number and quit"
|
165
|
+
# rag.add_option :api , type: :boolean , default: false , description: "Preconfigure smaller stack for API only apps"
|
166
|
+
# rag.add_option :minimal , type: :boolean , default: nil , description: "Preconfigure a minimal rails app"
|
167
|
+
# rag.add_option :javascript , type: :string , default: "importmap" , description: "Choose JavaScript approach [options: importmap (default), webpack, esbuild, rollup]"
|
168
|
+
# rag.add_option :css , type: :string , default: nil , description: "Choose CSS processor [options: tailwind, bootstrap, bulma, postcss, sass... check https://github.com/rails/cssbundling-rails]"
|
169
|
+
# rag.add_option :skip_bundle , type: :boolean , default: false , description: "Don't run bundle install"
|
168
170
|
|
169
171
|
# future_option :database , type: :string , default: 'sqlite3' # , description: "Preconfigure for selected database (options: #{DATABASES.join('/')})"
|
170
|
-
#
|
172
|
+
# rag.add_option :skip_git , type: :boolean, default: false # , description: "Skip .gitignore file"
|
171
173
|
# future_option :skip_keeps , type: :boolean, default: false # , description: "Skip source control .keep files"
|
172
174
|
# future_option :skip_action_mailer , type: :boolean, default: false # , description: "Skip Action Mailer files"
|
173
175
|
# future_option :skip_action_mailbox , type: :boolean, default: false # , description: "Skip Action Mailbox gem"
|
@@ -181,8 +183,8 @@ KConfig.configure do |config|
|
|
181
183
|
# future_option :skip_javascript , type: :boolean, default: false # name == 'plugin' # , description: "Skip JavaScript files"
|
182
184
|
# future_option :skip_hotwire , type: :boolean, default: false # , description: "Skip Hotwire integration"
|
183
185
|
# future_option :skip_jbuilder , type: :boolean, default: false # , description: "Skip jbuilder gem"
|
184
|
-
#
|
185
|
-
|
186
|
+
# rag.add_option :skip_test , type: :boolean, default: false # , description: "Skip test files"
|
187
|
+
rag.add_option :test , type: :string , default: 'rspec' # , description: "minitest or rspec (default: rspec)"
|
186
188
|
# future_option :skip_system_test , type: :boolean, default: false # , description: "Skip system test files"
|
187
189
|
# future_option :skip_bootsnap , type: :boolean, default: false # , description: "Skip bootsnap gem"
|
188
190
|
# future_option :dev , type: :boolean, default: false # , description: "Set up the #{name} with Gemfile pointing to your Rails checkout"
|
@@ -195,42 +197,42 @@ KConfig.configure do |config|
|
|
195
197
|
# future_option :api , type: :boolean # , description: "Preconfigure smaller stack for API only apps"
|
196
198
|
# future_option :minimal , type: :boolean # , description: "Preconfigure a minimal rails app"
|
197
199
|
# future_option :javascript , type: :string , default: 'importmap' # , description: "Choose JavaScript approach [options: importmap (default), webpack, esbuild, rollup]"
|
198
|
-
#
|
199
|
-
#
|
200
|
+
# rag.add_option :css , type: :string , description: "Choose CSS processor [options: tailwind, bootstrap, bulma, postcss, sass... check https://github.com/rails/cssbundling-rails]"
|
201
|
+
# rag.add_option :skip_bundle , type: :boolean, default: false , description: "Don't run bundle install"
|
200
202
|
|
201
|
-
#
|
202
|
-
#
|
203
|
-
|
204
|
-
|
205
|
-
#
|
206
|
-
#
|
207
|
-
|
208
|
-
|
209
|
-
#
|
210
|
-
#
|
211
|
-
#
|
212
|
-
#
|
213
|
-
#
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
#
|
203
|
+
# rag.add_option :add_irbrc , type: :boolean, default: false
|
204
|
+
# rag.add_option :add_foreman , type: :boolean, default: false
|
205
|
+
rag.add_option :add_devise , type: :boolean, default: false
|
206
|
+
rag.add_option :add_dotenv , type: :boolean, default: false
|
207
|
+
# rag.add_option :add_docker , type: :boolean, default: false
|
208
|
+
# rag.add_option :add_docker_compose , type: :boolean, default: false
|
209
|
+
rag.add_option :add_rubocop , type: :boolean, default: false
|
210
|
+
rag.add_option :add_annotate , type: :boolean, default: false
|
211
|
+
# rag.add_option :add_continuous_integration , type: :boolean, default: false
|
212
|
+
# rag.add_option :add_high_voltage , type: :boolean, default: false
|
213
|
+
# rag.add_option :add_generators , type: :boolean, default: false
|
214
|
+
# rag.add_option :add_lograge , type: :boolean, default: false
|
215
|
+
# rag.add_option :add_pundit , type: :boolean, default: false
|
216
|
+
# rag.add_option :add_services , type: :boolean, default: false
|
217
|
+
# rag.add_option :add_sidekiq , type: :boolean, default: false
|
218
|
+
# rag.add_option :add_views , type: :boolean, default: false
|
219
|
+
# rag.add_option :add_errors , type: :boolean, default: false
|
220
|
+
# rag.add_option :add_scaffold , type: :boolean, default: false
|
221
|
+
# rag.add_option :add_factory_bot , type: :boolean, default: false
|
222
|
+
# rag.add_option :add_shoulda , type: :boolean, default: false
|
221
223
|
|
222
224
|
# NEW GEM ADDONS
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
225
|
+
rag.add_option :add_acts_as_list , type: :boolean, default: false
|
226
|
+
rag.add_option :add_browser , type: :boolean, default: false
|
227
|
+
rag.add_option :add_chartkick , type: :boolean, default: false
|
228
|
+
rag.add_option :add_faker , type: :boolean, default: false
|
229
|
+
rag.add_option :add_groupdate , type: :boolean, default: false
|
230
|
+
rag.add_option :add_hexapdf , type: :boolean, default: false
|
231
|
+
rag.add_option :add_httparty , type: :boolean, default: false
|
232
|
+
rag.add_option :add_honeybadger , type: :boolean, default: false
|
233
|
+
rag.add_option :add_mini_magick , type: :boolean, default: false , description: 'Add Mini Magick gem'
|
234
|
+
rag.add_option :add_rails_html_sanitizer , type: :boolean, default: false
|
235
|
+
rag.add_option :add_twilio_ruby , type: :boolean, default: false
|
234
236
|
end
|
235
237
|
|
236
238
|
# Make sure that RailsOptions reflect the options available from Railties
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "rails_app_generator",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.3",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "rails_app_generator",
|
9
|
-
"version": "0.2.
|
9
|
+
"version": "0.2.3",
|
10
10
|
"dependencies": {
|
11
11
|
"daisyui": "^2.20.0"
|
12
12
|
},
|
data/package.json
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"args": {
|
3
|
+
"app_path": "dotenv",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
|
5
|
+
},
|
6
|
+
"opts": {
|
7
|
+
"skip_git": true,
|
8
|
+
"skip_test": true,
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/dotenv/_.rb",
|
10
|
+
"add_dotenv": true
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"args": {
|
3
|
+
"app_path": "rubocop",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
|
5
|
+
},
|
6
|
+
"opts": {
|
7
|
+
"skip_git": true,
|
8
|
+
"skip_test": true,
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/rubocop/_.rb",
|
10
|
+
"add_rubocop": true
|
11
|
+
}
|
12
|
+
}
|
@@ -5,7 +5,9 @@
|
|
5
5
|
},
|
6
6
|
"opts": {
|
7
7
|
"skip_test": true,
|
8
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
9
|
-
"
|
8
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/application/printspeak/_.rb",
|
9
|
+
"css": "bootstrap",
|
10
|
+
"add_annotate": true,
|
11
|
+
"add_dotenv": true
|
10
12
|
}
|
11
13
|
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
"opts": {
|
7
7
|
"skip_git": true,
|
8
8
|
"skip_test": true,
|
9
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/bootstrap/_.rb",
|
10
10
|
"css": "bootstrap"
|
11
11
|
}
|
12
12
|
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
"opts": {
|
7
7
|
"skip_git": true,
|
8
8
|
"skip_test": true,
|
9
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/devise/_.rb",
|
10
10
|
"add_devise": true
|
11
11
|
}
|
12
12
|
}
|
@@ -6,6 +6,6 @@
|
|
6
6
|
"opts": {
|
7
7
|
"skip_test": true,
|
8
8
|
"skip_javascript": true,
|
9
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/import_map/_.rb"
|
10
10
|
}
|
11
11
|
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"args": {
|
3
3
|
"app_path": "simple",
|
4
|
-
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/rag"
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/rag",
|
5
|
+
"capture_output": false
|
5
6
|
},
|
6
7
|
"opts": {
|
7
8
|
"skip_test": true,
|
8
9
|
"skip_bundle": true,
|
9
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
10
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/simple/_.rb"
|
10
11
|
}
|
11
12
|
}
|
data/profiles/{rag-tailwind-emulating-bootstrap.json → rag/tailwind-emulating-bootstrap.json}
RENAMED
@@ -5,8 +5,7 @@
|
|
5
5
|
},
|
6
6
|
"opts": {
|
7
7
|
"skip_test": true,
|
8
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
9
|
-
"note": "tailwind needs to be installed manually because of style reuse"
|
10
|
-
"XXX-css": "tailwind"
|
8
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/tailwind_emulating_bootstrap/_.rb",
|
9
|
+
"note": "tailwind needs to be installed manually because of style reuse"
|
11
10
|
}
|
12
11
|
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
},
|
6
6
|
"opts": {
|
7
7
|
"skip_test": true,
|
8
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
8
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/tailwind_hotwire_flash/_.rb",
|
9
9
|
"css": "tailwind"
|
10
10
|
}
|
11
11
|
}
|
data/profiles/{rag-tailwind-hotwire-form-search.json → rag/tailwind-hotwire-form-search.json}
RENAMED
@@ -5,7 +5,7 @@
|
|
5
5
|
},
|
6
6
|
"opts": {
|
7
7
|
"skip_test": true,
|
8
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
8
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/tailwind_hotwire_form_search/_.rb",
|
9
9
|
"note": "tailwind needs to be installed manually because of the custom tailwind plugins",
|
10
10
|
"XXX-css": "tailwind",
|
11
11
|
"javascript": "esbuild"
|
@@ -5,7 +5,7 @@
|
|
5
5
|
},
|
6
6
|
"opts": {
|
7
7
|
"skip_test": true,
|
8
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
8
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/tailwind_hotwire_form/_.rb",
|
9
9
|
"note": "tailwind needs to be installed manually because of the custom tailwind plugins",
|
10
10
|
"XXX-css": "tailwind",
|
11
11
|
"javascript": "esbuild"
|
@@ -5,7 +5,7 @@
|
|
5
5
|
},
|
6
6
|
"opts": {
|
7
7
|
"skip_test": true,
|
8
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
8
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/tailwind_hotwire/_.rb",
|
9
9
|
"css": "tailwind",
|
10
10
|
"javascript": "esbuild"
|
11
11
|
}
|
@@ -1,12 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"args": {
|
3
3
|
"app_path": "tailwind",
|
4
|
-
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/rag"
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/rag",
|
5
|
+
"capture_output": true
|
5
6
|
},
|
6
7
|
"opts": {
|
7
8
|
"skip_git": true,
|
8
9
|
"skip_test": true,
|
9
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
10
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/rag/tailwind/_.rb",
|
10
11
|
"css": "tailwind"
|
11
12
|
}
|
12
13
|
}
|
data/tasks/profile.thor
CHANGED
@@ -28,7 +28,7 @@ class Profile < Thor
|
|
28
28
|
attr_accessor :data
|
29
29
|
|
30
30
|
desc 'new', 'Create a new Profile for testing Rails App Generator settings'
|
31
|
-
method_option :variant, type: :string, default: '
|
31
|
+
method_option :variant, type: :string, default: 'application', desc: 'Profile variant to create, valid values are (nil, addons)'
|
32
32
|
method_option :gem, type: :string, default: nil, desc: 'Gem name is looked up to find version and description'
|
33
33
|
method_option :force, type: :boolean, default: false, desc: 'Overwrite existing files'
|
34
34
|
# rubocop:disable Metrics/AbcSize
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rails
|
3
|
+
|
1
4
|
AllCops:
|
2
5
|
NewCops: enable
|
3
6
|
Exclude:
|
@@ -11,10 +14,10 @@ Naming/AccessorMethodName:
|
|
11
14
|
|
12
15
|
Metrics/MethodLength:
|
13
16
|
CountAsOne: ['array', 'heredoc']
|
14
|
-
|
17
|
+
AllowedMethods: ['describe', 'context']
|
15
18
|
|
16
19
|
Metrics/BlockLength:
|
17
|
-
|
20
|
+
AllowedMethods: ['describe', 'context']
|
18
21
|
Exclude:
|
19
22
|
- config/environments/*.rb
|
20
23
|
- '**/*.rake'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# lib/rails_app_generator/rag_initializer.rb
|
4
|
-
#
|
4
|
+
# rag.add_option :add_<%= data.name_snake %> , type: :boolean, default: false
|
5
5
|
|
6
6
|
module RailsAppGenerator
|
7
7
|
# Custom add-ons for RailsAppGenerator
|
@@ -44,6 +44,7 @@ end
|
|
44
44
|
# rails_command('hotwire:install')
|
45
45
|
# run('bin/importmap pin sortablejs')
|
46
46
|
# run('npm install daisyui')
|
47
|
+
# directory 'app/assets/images'
|
47
48
|
# create_file 'app/assets/stylesheets/custom-bootstrap-import.scss' , read_template('custom-bootstrap-import.scss')
|
48
49
|
# append_to_file 'app/assets/config/manifest.js' , read_template('manifest.js')
|
49
50
|
# insert_into_file 'app/views/layouts/application.html.erb', read_template('application.html.erb'),
|