Class: Cybele::AppBuilder
- Inherits:
-
Rails::AppBuilder
- Object
- Rails::AppBuilder
- Cybele::AppBuilder
- Includes:
- Helpers, Helpers::ActiveStorage, Helpers::AppFiles::AssetsFiles, Helpers::AppFiles::ControllerFiles, Helpers::AppFiles::HelperFiles, Helpers::AppFiles::MailerFiles, Helpers::AppFiles::ModelFiles, Helpers::AppFiles::VendorFiles, Helpers::AppFiles::ViewFiles, Helpers::AppFiles::ViewGems, Helpers::Audited, Helpers::BasicAuthentication, Helpers::Devise, Helpers::Docker, Helpers::Dotenv, Helpers::ErrorPages, Helpers::General, Helpers::Haml, Helpers::LocaleLanguage, Helpers::Mailer, Helpers::Pronto, Helpers::RecipientInterceptor, Helpers::Responders, Helpers::Routes, Helpers::ShowFor, Helpers::Sidekiq, Helpers::SimpleForm, Helpers::Staging
- Defined in:
- lib/cybele/app_builder.rb
Overview
rubocop:disable Metrics/ClassLength
Instance Method Summary collapse
- #add_environment_to_lib ⇒ Object
- #add_pronto_to_gemfile ⇒ Object
- #git_and_git_flow_commands ⇒ Object
- #setup_gitignore_files ⇒ Object
- #setup_gitignore_folders ⇒ Object
Methods included from Helpers::ActiveStorage
Methods included from Helpers::General
#add_cybele_version, #add_editor_config, #add_gems, #configure_bullet, #create_database, #force_ssl_setting, #generate_config, #generate_rollbar, #readme, #remove_readme_rdoc, #use_postgres_config_template
Methods included from Helpers::Pronto
Methods included from Helpers::Docker
Methods included from Helpers::AppFiles::ViewGems
Methods included from Helpers::AppFiles::ViewFiles
#customize_default_view_files, #customize_view_files_with_option
Methods included from Helpers::AppFiles::HelperFiles
Methods included from Helpers::AppFiles::MailerFiles
Methods included from Helpers::AppFiles::VendorFiles
Methods included from Helpers::AppFiles::ModelFiles
Methods included from Helpers::AppFiles::ControllerFiles
Methods included from Helpers::AppFiles::AssetsFiles
#customize_assets_files, #javascript_files, #stylesheet_files
Methods included from Helpers::BasicAuthentication
#configure_basic_authentication
Methods included from Helpers::Routes
Methods included from Helpers::Audited
Methods included from Helpers::ErrorPages
Methods included from Helpers::Devise
#add_devise_authenticate_admin, #add_devise_protect_from_forgery, #add_devise_strong_parameter, #generate_devise_models, #generate_devise_settings, #generate_devise_views
Methods included from Helpers::Mailer
#configure_action_mailer, #configure_smtp
Methods included from Helpers::LocaleLanguage
Methods included from Helpers::Haml
#add_haml_gems, #configure_haml
Methods included from Helpers::ShowFor
#add_show_for_gem, #configure_show_for
Methods included from Helpers::RecipientInterceptor
#configure_recipient_interceptor
Methods included from Helpers::Dotenv
Methods included from Helpers::SimpleForm
#add_simple_form_gem, #configure_simple_form
Methods included from Helpers::Responders
Methods included from Helpers::Sidekiq
Methods included from Helpers::Staging
Instance Method Details
#add_environment_to_lib ⇒ Object
74 75 76 |
# File 'lib/cybele/app_builder.rb', line 74 def add_environment_to_lib copy_file 'environment/environment_generator.rb', 'lib/generators/environment/environment_generator.rb' end |
#add_pronto_to_gemfile ⇒ Object
67 68 69 70 71 72 |
# File 'lib/cybele/app_builder.rb', line 67 def add_pronto_to_gemfile # Add gems append_file('Gemfile', template_content('pronto/pronto_Gemfile.erb')) bundle_command 'update' bundle_command 'install' end |
#git_and_git_flow_commands ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/cybele/app_builder.rb', line 54 def git_and_git_flow_commands run 'mkdir .environments' run 'mv .env.local .environments/' run 'mv .env.production .environments/' run 'mv .env.staging .environments/' run 'ln -s .environments/.env.local .env.local' run 'cd .environments && git init && git add . && git commit -m "Env initialized" && cd ..' git :init git flow: 'init -d -f' git add: '.' git commit: '-m "Project initialized"' end |
#setup_gitignore_files ⇒ Object
34 35 36 37 |
# File 'lib/cybele/app_builder.rb', line 34 def setup_gitignore_files remove_file '.gitignore', force: true copy_file 'cybele_gitignore', '.gitignore' end |
#setup_gitignore_folders ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/cybele/app_builder.rb', line 39 def setup_gitignore_folders %w[ app/assets/images db/migrate spec/support spec/lib spec/models spec/views spec/controllers spec/helpers ].each do |dir| empty_directory_with_keep_file dir end end |