rails_app_generator 0.1.27 → 0.2.1
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 +2 -3
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +28 -0
- data/after_templates/addons/acts_as_list/_.rb +0 -14
- data/after_templates/addons/mini_magick/_.rb +1 -1
- 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_printspeak.rb → rag/printspeak/_.rb} +1 -1
- data/after_templates/{rag_printspeak → rag/printspeak}/application_controller.rb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/faq.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/layouts/_footer.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/layouts/_head.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/layouts/_navbar.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/layouts/application.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/page/_footer.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/page/architecture.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/page/blog.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/page/faq.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/page/home.html.erb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/page/page_controller.rb +0 -0
- data/after_templates/{rag_printspeak → rag/printspeak}/page/readme.html.erb +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 → rag/tailwind}/component-section-begin.html +0 -0
- data/after_templates/{rag_tailwind → 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 → 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 -1
- 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 +430 -0
- data/docs/last_run/app_generator_data.json +49 -0
- data/docs/last_run/rails_options_class.json +430 -0
- data/docs/last_run/rails_options_data.json +57 -0
- data/docs/project-plan/project.drawio +46 -46
- data/docs/project-plan/project_todo.svg +1 -1
- data/exe/rag +2 -0
- data/lib/rails_app_generator/addon.rb +1 -1
- data/lib/rails_app_generator/addons/annotate.rb +0 -3
- data/lib/rails_app_generator/addons/twilio_ruby.rb +13 -0
- data/lib/rails_app_generator/app_generator.rb +39 -177
- data/lib/rails_app_generator/cli/profile.rb +3 -1
- data/lib/rails_app_generator/configuration/rag_configuration.rb +18 -0
- data/lib/rails_app_generator/configuration/rag_configuration_extension.rb +14 -0
- data/lib/rails_app_generator/options/build_option.rb +14 -9
- data/lib/rails_app_generator/options/options_builder.rb +67 -44
- data/lib/rails_app_generator/options/rails_options.rb +6 -68
- data/lib/rails_app_generator/rag_initializer.rb +252 -0
- data/lib/rails_app_generator/util.rb +26 -0
- data/lib/rails_app_generator/version.rb +1 -1
- data/lib/rails_app_generator.rb +4 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/mini_magick.json +2 -1
- 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-printspeak.json → rag/printspeak.json} +3 -2
- 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/templates/thor_task/addon/addon.tt +2 -6
- metadata +150 -130
- data/profiles/rag-add-some-pages.json +0 -11
- data/profiles/rag-sample.json +0 -13
@@ -5,158 +5,6 @@
|
|
5
5
|
module RailsAppGenerator
|
6
6
|
# AppGenerator is a wrapper for Rails::AppGenerator
|
7
7
|
class AppGenerator < Rails::Generators::AppGenerator
|
8
|
-
class_option :test , type: :string , default: 'rspec'
|
9
|
-
|
10
|
-
# Gem Current Latest Requested Groups
|
11
|
-
# aws-sdk
|
12
|
-
# capistrano-bundler 1.6.0 2.1.0 ~> 1.2 development, test
|
13
|
-
# capybara 3.33.0 3.37.1 = 3.33.0 development, test
|
14
|
-
# clamby 1.6.6 1.6.8 = 1.6.6 default
|
15
|
-
# createsend 5.1.1 6.0.0 ~> 5.1 default
|
16
|
-
# database_cleaner 1.7.0 2.0.1 = 1.7.0 development, test
|
17
|
-
# erubi 1.10.0 1.11.0
|
18
|
-
# factory_bot 5.2.0 6.2.1
|
19
|
-
# factory_bot_rails 5.2.0 6.2.0 = 5.2.0 development, test
|
20
|
-
# guard-bundler 2.2.1 3.0.0 = 2.2.1 development, test
|
21
|
-
# guard-rubocop 1.4.0 1.5.0 = 1.4.0 development, test
|
22
|
-
# http-accept 1.7.0 2.2.0
|
23
|
-
# net-ssh 6.1.0 7.0.1
|
24
|
-
# oauth2 1.4.10 2.0.6
|
25
|
-
# omniauth-oauth2 1.7.3 1.8.0
|
26
|
-
# paper_trail 10.3.1 12.3.0 ~> 10.3 default
|
27
|
-
# pg 0.21.0 1.4.2 ~> 0.20 default
|
28
|
-
# pg_search 2.3.0 2.3.6 ~> 2.0 default
|
29
|
-
# pry 0.13.1 0.14.1
|
30
|
-
# public_suffix 2.0.5 5.0.0 ~> 2.0 default
|
31
|
-
# pusher 1.4.3 2.0.2 ~> 1.3 default
|
32
|
-
# rack-mini-profiler 0.10.7 3.0.0 ~> 0.10 default
|
33
|
-
# rack-test 0.6.3 2.0.2
|
34
|
-
# rails 5.0.7.2 7.0.3.1 = 5.0.7.2 default
|
35
|
-
# railties 5.0.7.2 7.0.3.1
|
36
|
-
# ransack 1.8.10 3.2.1 ~> 1.8 default
|
37
|
-
# redis 3.3.5 4.7.1 ~> 3.3 default
|
38
|
-
# redis-store 1.6.0 1.9.1
|
39
|
-
# regexp_parser 1.8.2 2.5.0
|
40
|
-
# rspec 3.10.0 3.11.0
|
41
|
-
# rspec-core 3.10.1 3.11.0 = 3.10.1 development, test
|
42
|
-
# rspec-expectations 3.10.1 3.11.0 = 3.10.1 development, test
|
43
|
-
# rspec-mocks 3.10.2 3.11.1 = 3.10.2 development, test
|
44
|
-
# rspec-rails 4.1.2 5.1.2 = 4.1.2 development, test
|
45
|
-
# rspec-support 3.10.2 3.11.0 = 3.10.2 development, test
|
46
|
-
# rubyzip 1.3.0 2.3.2 ~> 1.3 default
|
47
|
-
# scenic 1.5.4 1.6.0 = 1.5.4 default
|
48
|
-
# scout_apm 4.1.2 5.2.0 ~> 4.1 default
|
49
|
-
# selenium-webdriver 3.142.7 4.3.0 = 3.142.7 development, test
|
50
|
-
# shoulda-matchers 4.0.1 5.1.0 = 4.0.1 development, test
|
51
|
-
# sidekiq 4.2.10 6.5.1 ~> 4.2 default
|
52
|
-
# sidekiq-pool 1.9.3 2.0.1 ~> 1.8 default
|
53
|
-
# sidekiq-unique-jobs 6.0.25 7.1.27 ~> 6.0 default
|
54
|
-
# spring 2.1.1 4.0.0 ~> 2.0 development, test
|
55
|
-
# sprockets 3.7.2 4.1.1 ~> 3.7 default
|
56
|
-
# sprockets-rails 3.2.2 3.4.2
|
57
|
-
# timecop 0.8.1 0.9.5 = 0.8.1 development, test
|
58
|
-
# tzinfo 1.2.10 2.0.5
|
59
|
-
# uglifier 3.2.0 4.2.0 ~> 3.2 default
|
60
|
-
# unicorn 5.8.0 6.1.0 ~> 5.3 default
|
61
|
-
# webmock 3.13.0 3.16.0 = 3.13.0 development, test
|
62
|
-
# websocket-driver 0.6.5 0.7.5
|
63
|
-
|
64
|
-
# acts_as_list 0.9.19 1.0.4 ~> 0.9 default
|
65
|
-
# arel 7.1.4 9.0.0
|
66
|
-
# bigdecimal 1.4.4 3.1.2 ~> 1.4 development, test
|
67
|
-
# binding_of_caller 0.8.0 1.0.0 ~> 0.8 default
|
68
|
-
# browser 2.7.1 5.3.1 ~> 2.3 default
|
69
|
-
# capistrano-bundler 1.6.0 2.1.0 ~> 1.2 development, test
|
70
|
-
# capybara 3.33.0 3.37.1 = 3.33.0 development, test
|
71
|
-
# chartkick 2.3.5 4.2.0 ~> 2.3 default
|
72
|
-
# childprocess 3.0.0 4.1.0
|
73
|
-
# clamby 1.6.6 1.6.8 = 1.6.6 default
|
74
|
-
# createsend 5.1.1 6.0.0 ~> 5.1 default
|
75
|
-
# database_cleaner 1.7.0 2.0.1 = 1.7.0 development, test
|
76
|
-
# factory_bot 5.2.0 6.2.1
|
77
|
-
# factory_bot_rails 5.2.0 6.2.0 = 5.2.0 development, test
|
78
|
-
# faker 1.9.6 2.22.0 ~> 1.7 default
|
79
|
-
# groupdate 4.3.0 6.1.0 ~> 4.1 default
|
80
|
-
# guard-bundler 2.2.1 3.0.0 = 2.2.1 development, test
|
81
|
-
# guard-rubocop 1.4.0 1.5.0 = 1.4.0 development, test
|
82
|
-
# hashie 3.6.0 5.0.0
|
83
|
-
# http-accept 1.7.0 2.1.1
|
84
|
-
# k_log 0.0.18 0.0.33 = 0.0.18 development, test
|
85
|
-
# net-ssh 6.1.0 7.0.1
|
86
|
-
# oauth2 1.4.10 2.0.6
|
87
|
-
# omniauth-oauth2 1.7.3 1.8.0
|
88
|
-
# paper_trail 10.3.1 12.3.0 ~> 10.3 default
|
89
|
-
# pg 0.21.0 1.4.2 ~> 0.20 default
|
90
|
-
# pg_search 2.3.0 2.3.6 ~> 2.0 default
|
91
|
-
# pry 0.13.1 0.14.1
|
92
|
-
# public_suffix 2.0.5 5.0.0 ~> 2.0 default
|
93
|
-
# pusher 1.4.3 2.0.2 ~> 1.3 default
|
94
|
-
# rack-mini-profiler 0.10.7 3.0.0 ~> 0.10 default
|
95
|
-
# rack-test 0.6.3 2.0.2
|
96
|
-
# rails 5.0.7.2 7.0.3.1 = 5.0.7.2 default
|
97
|
-
# railties 5.0.7.2 7.0.3.1
|
98
|
-
# ransack 1.8.10 3.2.1 ~> 1.8 default
|
99
|
-
# redis 3.3.5 4.7.1 ~> 3.3 default
|
100
|
-
# redis-store 1.6.0 1.9.1
|
101
|
-
# regexp_parser 1.8.2 2.5.0
|
102
|
-
# rspec 3.10.0 3.11.0
|
103
|
-
# rspec-core 3.10.1 3.11.0 = 3.10.1 development, test
|
104
|
-
# rspec-expectations 3.10.1 3.11.0 = 3.10.1 development, test
|
105
|
-
# rspec-mocks 3.10.2 3.11.1 = 3.10.2 development, test
|
106
|
-
# rspec-rails 4.1.2 5.1.2 = 4.1.2 development, test
|
107
|
-
# rspec-support 3.10.2 3.11.0 = 3.10.2 development, test
|
108
|
-
# rubyzip 1.3.0 2.3.2 ~> 1.3 default
|
109
|
-
# scenic 1.5.4 1.6.0 = 1.5.4 default
|
110
|
-
# scout_apm 4.1.2 5.2.0 ~> 4.1 default
|
111
|
-
# selenium-webdriver 3.142.7 4.3.0 = 3.142.7 development, test
|
112
|
-
# shoulda-matchers 4.0.1 5.1.0 = 4.0.1 development, test
|
113
|
-
# sidekiq 4.2.10 6.5.1 ~> 4.2 default
|
114
|
-
# sidekiq-pool 1.9.3 2.0.1 ~> 1.8 default
|
115
|
-
# sidekiq-unique-jobs 6.0.25 7.1.27 ~> 6.0 default
|
116
|
-
# spring 2.1.1 4.0.0 ~> 2.0 development, test
|
117
|
-
# sprockets 3.7.2 4.1.1 ~> 3.7 default
|
118
|
-
# sprockets-rails 3.2.2 3.4.2
|
119
|
-
# timecop 0.8.1 0.9.5 = 0.8.1 development, test
|
120
|
-
# tzinfo 1.2.10 2.0.5
|
121
|
-
# uglifier 3.2.0 4.2.0 ~> 3.2 default
|
122
|
-
# unicorn 5.8.0 6.1.0 ~> 5.3 default
|
123
|
-
# webmock 3.13.0 3.14.0 = 3.13.0 development, test
|
124
|
-
# websocket-driver 0.6.5 0.7.5
|
125
|
-
|
126
|
-
class_option :add_irbrc , type: :boolean, default: false
|
127
|
-
class_option :add_foreman , type: :boolean, default: false
|
128
|
-
class_option :add_devise , type: :boolean, default: false
|
129
|
-
class_option :add_dotenv , type: :boolean, default: false
|
130
|
-
class_option :add_docker , type: :boolean, default: false
|
131
|
-
class_option :add_docker_compose , type: :boolean, default: false
|
132
|
-
class_option :add_rubocop , type: :boolean, default: false
|
133
|
-
class_option :add_annotate , type: :boolean, default: false
|
134
|
-
class_option :add_continuous_integration , type: :boolean, default: false
|
135
|
-
class_option :add_high_voltage , type: :boolean, default: false
|
136
|
-
class_option :add_generators , type: :boolean, default: false
|
137
|
-
class_option :add_lograge , type: :boolean, default: false
|
138
|
-
class_option :add_pundit , type: :boolean, default: false
|
139
|
-
class_option :add_services , type: :boolean, default: false
|
140
|
-
class_option :add_sidekiq , type: :boolean, default: false
|
141
|
-
class_option :add_views , type: :boolean, default: false
|
142
|
-
class_option :add_errors , type: :boolean, default: false
|
143
|
-
class_option :add_scaffold , type: :boolean, default: false
|
144
|
-
class_option :add_factory_bot , type: :boolean, default: false
|
145
|
-
class_option :add_shoulda , type: :boolean, default: false
|
146
|
-
|
147
|
-
# NEW GEM ADDONS
|
148
|
-
class_option :add_acts_as_list , type: :boolean, default: false
|
149
|
-
class_option :add_browser , type: :boolean, default: false
|
150
|
-
class_option :add_chartkick , type: :boolean, default: false
|
151
|
-
class_option :add_faker , type: :boolean, default: false
|
152
|
-
class_option :add_groupdate , type: :boolean, default: false
|
153
|
-
class_option :add_hexapdf , type: :boolean, default: false
|
154
|
-
class_option :add_httparty , type: :boolean, default: false
|
155
|
-
class_option :add_honeybadger , type: :boolean, default: false
|
156
|
-
class_option :add_mini_magick , type: :boolean, default: false
|
157
|
-
class_option :add_rails_html_sanitizer , type: :boolean, default: false
|
158
|
-
class_option :add_twilio_ruby , type: :boolean, default: false
|
159
|
-
|
160
8
|
class << self
|
161
9
|
# points to the original rails templates
|
162
10
|
attr_writer :rails_template_path
|
@@ -179,6 +27,35 @@ module RailsAppGenerator
|
|
179
27
|
@addon_template_path ||= gem_template_path('rails_app_generator', 'templates/addons/%<addon>s')
|
180
28
|
end
|
181
29
|
|
30
|
+
def add_class_option(option)
|
31
|
+
find_name = option.name.to_s
|
32
|
+
existing_option = class_options.find { |class_option| class_option[1].name == find_name }
|
33
|
+
|
34
|
+
return if existing_option
|
35
|
+
|
36
|
+
args = {
|
37
|
+
type: option.type,
|
38
|
+
default: option.default,
|
39
|
+
required: option.required
|
40
|
+
}
|
41
|
+
|
42
|
+
# for some reason, Railties uses :desc while thor uses :description and thor has nice humanization when key is missing
|
43
|
+
args[:desc] = option.description unless option.description
|
44
|
+
|
45
|
+
class_option(option.name, **args)
|
46
|
+
end
|
47
|
+
|
48
|
+
def to_h
|
49
|
+
thor_options = class_options.map { |o| o[1] }
|
50
|
+
options_hash = RailsAppGenerator::Util.thor_options_to_hash(thor_options)
|
51
|
+
|
52
|
+
# class_options_detailed: options_hash,
|
53
|
+
{
|
54
|
+
class_option_keys: options_hash.map { |option| option[:name] },
|
55
|
+
class_options: options_hash.map { |option| option.slice(:name, :description, :type, :default, :required) }
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
182
59
|
private
|
183
60
|
|
184
61
|
def gem_template_path(gem_name, template_path)
|
@@ -202,16 +79,11 @@ module RailsAppGenerator
|
|
202
79
|
|
203
80
|
attr_reader :addon_instances
|
204
81
|
|
205
|
-
# attr_reader :before_bundle_addon_callbacks
|
206
|
-
# attr_reader :after_bundle_addon_callbacks
|
207
|
-
|
208
82
|
def initialize(*args)
|
209
83
|
super
|
210
84
|
|
211
85
|
@force_copy = false
|
212
86
|
@addon_instances = []
|
213
|
-
# @before_bundle_addon_callbacks = []
|
214
|
-
# @after_bundle_addon_callbacks = []
|
215
87
|
|
216
88
|
# puts '----------------------------------------------------'
|
217
89
|
# puts options
|
@@ -271,6 +143,8 @@ module RailsAppGenerator
|
|
271
143
|
# end
|
272
144
|
|
273
145
|
def create_root_files
|
146
|
+
RailsAppGenerator::Util.write_last_run('app_generator_data.json', to_h)
|
147
|
+
|
274
148
|
super
|
275
149
|
|
276
150
|
add_if(:irbrc)
|
@@ -331,13 +205,14 @@ module RailsAppGenerator
|
|
331
205
|
end
|
332
206
|
|
333
207
|
no_commands do
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
File.join(File.dirname(xxx), File.basename(xxx, '.*'))
|
208
|
+
def to_h
|
209
|
+
{
|
210
|
+
options: options
|
211
|
+
}
|
339
212
|
end
|
340
213
|
|
214
|
+
# https://codingpackets.com/blog/rails-generators-cheat-sheet/
|
215
|
+
|
341
216
|
# force_copy? # defaults to false
|
342
217
|
# force_copy(true) # set to true
|
343
218
|
# force_copy(false) # set to false
|
@@ -487,18 +362,11 @@ module RailsAppGenerator
|
|
487
362
|
|
488
363
|
if addon_instance.uses?
|
489
364
|
addon_instance.apply
|
490
|
-
@addon_instances <<
|
365
|
+
@addon_instances << addon_instance
|
491
366
|
end
|
492
367
|
end
|
493
368
|
end
|
494
369
|
|
495
|
-
# def apply(context = Context.new({}))
|
496
|
-
# instance = new(context)
|
497
|
-
# return unless instance.uses?
|
498
|
-
|
499
|
-
# instance.apply
|
500
|
-
# end
|
501
|
-
|
502
370
|
def add_if(addon)
|
503
371
|
add(addon) if active?(addon)
|
504
372
|
end
|
@@ -538,14 +406,8 @@ module RailsAppGenerator
|
|
538
406
|
end
|
539
407
|
end
|
540
408
|
|
541
|
-
# def addon_classes
|
542
|
-
# AddOns.constants
|
543
|
-
# .map { |addon_klass_name| AddOns.const_get(addon_klass_name) }
|
544
|
-
# .select { |klass| klass.is_a?(Class) && klass.respond_to?(:addon_name) }
|
545
|
-
# end
|
546
|
-
|
547
409
|
def active_addon_classes
|
548
|
-
|
410
|
+
AddonUtil.classes.select { |klass| active?(klass.addon_name) }
|
549
411
|
end
|
550
412
|
|
551
413
|
def addon_gemfile_entries
|
@@ -26,7 +26,9 @@ module RailsAppGenerator
|
|
26
26
|
args = profile[:args]
|
27
27
|
opts = RailsAppGenerator::RailsOptions.new(profile[:opts])
|
28
28
|
|
29
|
-
|
29
|
+
RailsAppGenerator::Util.write_last_run('rails_options_data.json', opts.to_h)
|
30
|
+
|
31
|
+
starter = RailsAppGenerator::Starter.new(args)
|
30
32
|
|
31
33
|
starter.delete_target_folder
|
32
34
|
starter.start(opts)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsAppGenerator
|
4
|
+
# Structure for storing Rails Application Generator configuration
|
5
|
+
class RagConfiguration
|
6
|
+
# include KLog::Logging
|
7
|
+
|
8
|
+
attr_reader :options
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@options = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def add_option(name, **args)
|
15
|
+
@options << RailsAppGenerator::BuildOption.new(name, **args)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsAppGenerator
|
4
|
+
# Register this configuration access extension for Rag configuration
|
5
|
+
module RagConfigurationExtension
|
6
|
+
def rag
|
7
|
+
return @rag if defined? @rag
|
8
|
+
|
9
|
+
@rag = RagConfiguration.new
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
KConfig::Configuration.register(:rag, RailsAppGenerator::RagConfigurationExtension)
|
@@ -6,17 +6,12 @@ module RailsAppGenerator
|
|
6
6
|
# This class maps closely (but not exactly) to Thor's options
|
7
7
|
# The pattern is not exactly the same, it is easy to map the options
|
8
8
|
# you need from other generators such as: railties/lib/rails/generators/app_base.rb
|
9
|
-
#
|
10
|
-
# @example
|
11
|
-
# class_option :skip_git, type: :boolean, default: false, desc: "Skip .gitignore file"
|
12
|
-
# becomes
|
13
|
-
# register_option :skip_git, type: :boolean, default: false, desc: "Skip .gitignore file"
|
14
9
|
class BuildOption
|
15
|
-
attr_reader :name, :
|
10
|
+
attr_reader :name, :description, :type, :default, :required, :mapper
|
16
11
|
|
17
|
-
def initialize(**args)
|
18
|
-
@name =
|
19
|
-
@
|
12
|
+
def initialize(name, **args)
|
13
|
+
@name = name
|
14
|
+
@description = args[:description] || ''
|
20
15
|
@type = args[:type] || :string
|
21
16
|
@required = args.fetch(:required, false)
|
22
17
|
@default = args[:default] || sane_default
|
@@ -27,6 +22,16 @@ module RailsAppGenerator
|
|
27
22
|
|
28
23
|
def cmd_option(value); end
|
29
24
|
|
25
|
+
def to_h
|
26
|
+
{
|
27
|
+
name: name,
|
28
|
+
description: description,
|
29
|
+
type: type,
|
30
|
+
default: default,
|
31
|
+
required: required
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
30
35
|
private
|
31
36
|
|
32
37
|
def sane_default
|
@@ -13,39 +13,84 @@ module RailsAppGenerator
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class << self
|
16
|
-
def
|
17
|
-
@
|
16
|
+
def class_options
|
17
|
+
@class_options ||= []
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
21
|
-
@
|
20
|
+
def class_options_lookup
|
21
|
+
@class_options_lookup ||= {}
|
22
22
|
end
|
23
23
|
|
24
|
-
#
|
25
|
-
|
24
|
+
# Register an option with the builder, this method has the same signature as Thor.
|
25
|
+
#
|
26
|
+
# This is so options can be used interchangeably between OptionsBuilder and Thor.
|
27
|
+
def class_option(name, **args)
|
28
|
+
option = BuildOption.new(name, args)
|
26
29
|
|
27
|
-
|
28
|
-
|
30
|
+
add_class_option(option)
|
31
|
+
end
|
32
|
+
|
33
|
+
def add_class_option(option)
|
34
|
+
if class_options_lookup.key?(option.name)
|
35
|
+
# raise ArgumentError, "Option #{option.name} already registered"
|
36
|
+
puts "Option #{option.name} already registered"
|
37
|
+
return
|
38
|
+
end
|
39
|
+
|
40
|
+
class_options_lookup[option.name.to_sym] = option
|
41
|
+
class_options << option
|
42
|
+
end
|
29
43
|
|
30
|
-
|
44
|
+
def add_thor_class_option(thor_option)
|
45
|
+
args = {
|
46
|
+
description: thor_option.description,
|
47
|
+
type: thor_option.type,
|
48
|
+
default: thor_option.default,
|
49
|
+
required: thor_option.required
|
50
|
+
}
|
51
|
+
option = BuildOption.new(thor_option.name, args)
|
31
52
|
|
32
|
-
|
33
|
-
registered_options << option
|
53
|
+
add_class_option(option)
|
34
54
|
end
|
35
55
|
|
36
56
|
def reset
|
37
|
-
@
|
38
|
-
@
|
57
|
+
@class_options = nil
|
58
|
+
@class_options_lookup = nil
|
59
|
+
end
|
60
|
+
|
61
|
+
def to_h
|
62
|
+
{
|
63
|
+
class_option_keys: class_options.map(&:name),
|
64
|
+
class_options: class_options.map(&:to_h)
|
65
|
+
}
|
39
66
|
end
|
40
67
|
end
|
41
68
|
|
69
|
+
# rubocop:disable Metrics/AbcSize
|
42
70
|
def cmd_line_options
|
43
|
-
|
71
|
+
available_options = options.clone
|
72
|
+
|
73
|
+
result = self.class.class_options.map do |option|
|
44
74
|
mapper = option.mapper
|
45
|
-
|
75
|
+
key = option.name.to_sym
|
76
|
+
value = options[key]
|
77
|
+
available_options.delete(key)
|
78
|
+
# if available_options.delete(option.name.to_sym)
|
79
|
+
# puts "option IS registered: #{option.name}"
|
80
|
+
# else
|
81
|
+
# puts "option not registered: #{option.name}"
|
82
|
+
# end
|
83
|
+
|
46
84
|
mapper.map(option.name, value)
|
47
85
|
end.reject(&:blank?)
|
86
|
+
|
87
|
+
return result if available_options.empty?
|
88
|
+
|
89
|
+
puts "options not registered: #{available_options.keys.join(', ')}"
|
90
|
+
result
|
91
|
+
# raise 'Unknown options'
|
48
92
|
end
|
93
|
+
# rubocop:enable Metrics/AbcSize
|
49
94
|
|
50
95
|
def debug
|
51
96
|
puts '[ Options JSON ]----------------------------------------------------'
|
@@ -54,38 +99,16 @@ module RailsAppGenerator
|
|
54
99
|
puts cmd_line_options
|
55
100
|
end
|
56
101
|
|
102
|
+
def to_h
|
103
|
+
{
|
104
|
+
options: options
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
57
108
|
private
|
58
109
|
|
59
110
|
def default_options
|
60
|
-
self.class.
|
111
|
+
self.class.class_options.to_h { |option| [option.name.to_sym, option.default] }
|
61
112
|
end
|
62
113
|
end
|
63
|
-
|
64
|
-
# opts = [
|
65
|
-
# "--skip-namespace",
|
66
|
-
# "--skip-collision-check",
|
67
|
-
# "--skip-git",
|
68
|
-
# "--skip-keeps",
|
69
|
-
# "--skip-action-mailer",
|
70
|
-
# "--skip-action-mailbox",
|
71
|
-
# "--skip-action-text",
|
72
|
-
# "--skip-active-record",
|
73
|
-
# "--skip-active-job",
|
74
|
-
# "--skip-active-storage",
|
75
|
-
# "--skip-action-cable",
|
76
|
-
# "--skip-asset-pipeline",
|
77
|
-
# "--skip-javascript",
|
78
|
-
# "--skip-hotwire",
|
79
|
-
# "--skip-jbuilder",
|
80
|
-
# "--skip-test",
|
81
|
-
# "--skip-system-test",
|
82
|
-
# "--skip-bootsnap",
|
83
|
-
# "--skip-bundle"
|
84
|
-
# ]
|
85
|
-
|
86
|
-
# opts = [
|
87
|
-
# "--skip-git",
|
88
|
-
# "--skip-test",
|
89
|
-
# "--skip-bundle"
|
90
|
-
# ]
|
91
114
|
end
|
@@ -2,74 +2,12 @@
|
|
2
2
|
|
3
3
|
module RailsAppGenerator
|
4
4
|
class RailsOptions < OptionsBuilder
|
5
|
-
#
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
future_option :skip_action_mailer , type: :boolean, default: false # , desc: "Skip Action Mailer files"
|
12
|
-
future_option :skip_action_mailbox , type: :boolean, default: false # , desc: "Skip Action Mailbox gem"
|
13
|
-
future_option :skip_action_text , type: :boolean, default: false # , desc: "Skip Action Text gem"
|
14
|
-
future_option :skip_active_record , type: :boolean, default: false # , desc: "Skip Active Record files"
|
15
|
-
future_option :skip_active_job , type: :boolean, default: false # , desc: "Skip Active Job"
|
16
|
-
future_option :skip_active_storage , type: :boolean, default: false # , desc: "Skip Active Storage files"
|
17
|
-
future_option :skip_action_cable , type: :boolean, default: false # , desc: "Skip Action Cable files"
|
18
|
-
future_option :skip_asset_pipeline , type: :boolean, default: false #
|
19
|
-
future_option :asset_pipeline , type: :string , default: 'sprockets' # , desc: "Choose your asset pipeline [options: sprockets (default), propshaft]"
|
20
|
-
future_option :skip_javascript , type: :boolean, default: false # name == 'plugin' # , desc: "Skip JavaScript files"
|
21
|
-
future_option :skip_hotwire , type: :boolean, default: false # , desc: "Skip Hotwire integration"
|
22
|
-
future_option :skip_jbuilder , type: :boolean, default: false # , desc: "Skip jbuilder gem"
|
23
|
-
register_option :skip_test , type: :boolean, default: false # , desc: "Skip test files"
|
24
|
-
register_option :test , type: :string , default: 'rspec' # , desc: "minitest or rspec (default: rspec)"
|
25
|
-
future_option :skip_system_test , type: :boolean, default: false # , desc: "Skip system test files"
|
26
|
-
future_option :skip_bootsnap , type: :boolean, default: false # , desc: "Skip bootsnap gem"
|
27
|
-
future_option :dev , type: :boolean, default: false # , desc: "Set up the #{name} with Gemfile pointing to your Rails checkout"
|
28
|
-
future_option :edge , type: :boolean, default: false # , desc: "Set up the #{name} with Gemfile pointing to Rails repository"
|
29
|
-
future_option :main , type: :boolean, default: false # , desc: "Set up the #{name} with Gemfile pointing to Rails repository main branch"
|
30
|
-
future_option :rc , type: :string , default: nil # , desc: "Path to file containing extra configuration options for rails command"
|
31
|
-
future_option :no_rc , type: :boolean, default: false # , desc: "Skip loading of extra configuration options from .railsrc file"
|
32
|
-
future_option :help , type: :boolean # , group: :rails # , desc: "Show this help message and quit"
|
33
|
-
future_option :version , type: :boolean # , group: :rails, desc: "Show Rails version number and quit"
|
34
|
-
future_option :api , type: :boolean # , desc: "Preconfigure smaller stack for API only apps"
|
35
|
-
future_option :minimal , type: :boolean # , desc: "Preconfigure a minimal rails app"
|
36
|
-
future_option :javascript , type: :string , default: 'importmap' # , desc: "Choose JavaScript approach [options: importmap (default), webpack, esbuild, rollup]"
|
37
|
-
register_option :css , type: :string # , desc: "Choose CSS processor [options: tailwind, bootstrap, bulma, postcss, sass... check https://github.com/rails/cssbundling-rails]"
|
38
|
-
register_option :skip_bundle , type: :boolean, default: false # , desc: "Don't run bundle install"
|
39
|
-
|
40
|
-
register_option :add_irbrc , type: :boolean, default: false
|
41
|
-
register_option :add_foreman , type: :boolean, default: false
|
42
|
-
register_option :add_devise , type: :boolean, default: false
|
43
|
-
register_option :add_dotenv , type: :boolean, default: false
|
44
|
-
register_option :add_docker , type: :boolean, default: false
|
45
|
-
register_option :add_docker_compose , type: :boolean, default: false
|
46
|
-
register_option :add_rubocop , type: :boolean, default: false
|
47
|
-
register_option :add_annotate , type: :boolean, default: false
|
48
|
-
register_option :add_continuous_integration , type: :boolean, default: false
|
49
|
-
register_option :add_high_voltage , type: :boolean, default: false
|
50
|
-
register_option :add_generators , type: :boolean, default: false
|
51
|
-
register_option :add_lograge , type: :boolean, default: false
|
52
|
-
register_option :add_pundit , type: :boolean, default: false
|
53
|
-
register_option :add_services , type: :boolean, default: false
|
54
|
-
register_option :add_sidekiq , type: :boolean, default: false
|
55
|
-
register_option :add_views , type: :boolean, default: false
|
56
|
-
register_option :add_errors , type: :boolean, default: false
|
57
|
-
register_option :add_scaffold , type: :boolean, default: false
|
58
|
-
register_option :add_factory_bot , type: :boolean, default: false
|
59
|
-
register_option :add_shoulda , type: :boolean, default: false
|
60
|
-
|
61
|
-
# NEW GEM ADDONS
|
62
|
-
register_option :add_acts_as_list , type: :boolean, default: false
|
63
|
-
register_option :add_browser , type: :boolean, default: false
|
64
|
-
register_option :add_chartkick , type: :boolean, default: false
|
65
|
-
register_option :add_faker , type: :boolean, default: false
|
66
|
-
register_option :add_groupdate , type: :boolean, default: false
|
67
|
-
register_option :add_hexapdf , type: :boolean, default: false
|
68
|
-
register_option :add_httparty , type: :boolean, default: false
|
69
|
-
register_option :add_honeybadger , type: :boolean, default: false
|
70
|
-
register_option :add_mini_magick , type: :boolean, default: false
|
71
|
-
register_option :add_rails_html_sanitizer , type: :boolean, default: false
|
72
|
-
register_option :add_twilio_ruby , type: :boolean, default: false
|
5
|
+
# FIND MORE TEMPLATES HERE
|
6
|
+
# https://railsbytes.com/public/templates
|
7
|
+
# http://www.railscomposer.com/
|
8
|
+
# https://github.com/RailsApps/rails-composer
|
9
|
+
# https://github.com/carbonfive/raygun-rails
|
10
|
+
# https://github.com/abhaynikam/boring_generators
|
73
11
|
|
74
12
|
# if options[:minimal]
|
75
13
|
# self.options = options.merge(
|