cybele 1.9.2 → 2.0.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 +4 -4
- data/.fasterer.yml +5 -0
- data/.flayignore +3 -0
- data/.gitignore +4 -1
- data/.haml-lint.yml +5 -0
- data/.poper.yml +7 -0
- data/.rubocop.yml +59 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +458 -2
- data/Gemfile +2 -0
- data/README.md +16 -20
- data/Rakefile +1 -1
- data/USAGE +12 -0
- data/bin/build_app +18 -0
- data/bin/build_gem +20 -0
- data/bin/cybele +21 -6
- data/config.reek +29 -0
- data/cybele.gemspec +14 -6
- data/example.pronto.yml +8 -0
- data/lib/cybele.rb +33 -0
- data/lib/cybele/app_builder.rb +43 -510
- data/lib/cybele/generators/app_generator.rb +240 -180
- data/lib/cybele/helpers.rb +104 -0
- data/lib/cybele/helpers/app_files/assets_files.rb +43 -0
- data/lib/cybele/helpers/app_files/controller_files.rb +23 -0
- data/lib/cybele/helpers/app_files/helper_files.rb +15 -0
- data/lib/cybele/helpers/app_files/mailer_files.rb +15 -0
- data/lib/cybele/helpers/app_files/model_files.rb +16 -0
- data/lib/cybele/helpers/app_files/vendor_files.rb +14 -0
- data/lib/cybele/helpers/app_files/view_files.rb +62 -0
- data/lib/cybele/helpers/app_files/view_gems.rb +20 -0
- data/lib/cybele/helpers/audited.rb +12 -0
- data/lib/cybele/helpers/basic_authentication.rb +44 -0
- data/lib/cybele/helpers/devise.rb +67 -0
- data/lib/cybele/helpers/docker.rb +53 -0
- data/lib/cybele/helpers/dotenv.rb +23 -0
- data/lib/cybele/helpers/error_pages.rb +37 -0
- data/lib/cybele/helpers/general.rb +87 -0
- data/lib/cybele/helpers/haml.rb +18 -0
- data/lib/cybele/helpers/locale_language.rb +23 -0
- data/lib/cybele/helpers/mailer.rb +25 -0
- data/lib/cybele/helpers/paperclip.rb +33 -0
- data/lib/cybele/helpers/pronto.rb +34 -0
- data/lib/cybele/helpers/recipient_interceptor.rb +18 -0
- data/lib/cybele/helpers/responders.rb +36 -0
- data/lib/cybele/helpers/routes.rb +18 -0
- data/lib/cybele/helpers/show_for.rb +20 -0
- data/lib/cybele/helpers/sidekiq.rb +37 -0
- data/lib/cybele/helpers/simple_form.rb +19 -0
- data/lib/cybele/helpers/staging.rb +15 -0
- data/lib/cybele/version.rb +5 -3
- data/spec/features/cli_help_spec.rb +42 -0
- data/spec/features/git_and_git_flow_spec.rb +30 -0
- data/spec/features/new_default_project_spec.rb +465 -0
- data/spec/features/new_not_default_project_spec.rb +412 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/config_test_helper.rb +36 -0
- data/spec/support/cybele_test_helpers.rb +115 -0
- data/spec/support/devise_test_helper.rb +45 -0
- data/spec/support/dotenv_test_helper.rb +31 -0
- data/spec/support/error_pages_test_helper.rb +24 -0
- data/spec/support/force_ssl_test_helper.rb +24 -0
- data/spec/support/git_ignore_test_helper.rb +10 -0
- data/spec/support/locale_language_test_helper.rb +43 -0
- data/spec/support/mail_test_helpers.rb +15 -0
- data/spec/support/paperclip_test_helper.rb +38 -0
- data/spec/support/pronto_test_helpers.rb +41 -0
- data/spec/support/responder_test_helper.rb +32 -0
- data/templates/Gemfile.erb +59 -0
- data/templates/README.md.erb +23 -20
- data/templates/VERSION.txt +1 -0
- data/templates/app_files/app/assets/javascripts/application.js +81 -0
- data/templates/app_files/app/assets/javascripts/hq/application.js +80 -0
- data/templates/{app/assets/stylesheets/application.css.sass → app_files/app/assets/stylesheets/application.sass} +27 -16
- data/templates/app_files/app/assets/stylesheets/hq/_sidebar.sass +89 -0
- data/templates/app_files/app/assets/stylesheets/hq/application.sass +74 -0
- data/templates/app_files/app/controllers/concerns/activatable.rb +16 -0
- data/templates/{app → app_files/app}/controllers/hq/admins_controller.rb +7 -10
- data/templates/app_files/app/controllers/hq/application_controller.rb +13 -0
- data/templates/{app → app_files/app}/controllers/hq/audits_controller.rb +3 -3
- data/templates/app_files/app/controllers/hq/dashboard_controller.rb +7 -0
- data/templates/{app → app_files/app}/controllers/hq/passwords_controller.rb +3 -2
- data/templates/app_files/app/controllers/hq/registrations_controller.rb +22 -0
- data/templates/{app → app_files/app}/controllers/hq/sessions_controller.rb +5 -4
- data/templates/{app → app_files/app}/controllers/hq/users_controller.rb +7 -10
- data/templates/app_files/app/controllers/user/application_controller.rb +18 -0
- data/templates/app_files/app/controllers/user/dashboard_controller.rb +7 -0
- data/templates/{app → app_files/app}/controllers/user/passwords_controller.rb +3 -4
- data/templates/app_files/app/controllers/user/profile_controller.rb +30 -0
- data/templates/{app → app_files/app}/controllers/user/registrations_controller.rb +7 -8
- data/templates/{app → app_files/app}/controllers/user/sessions_controller.rb +5 -6
- data/templates/app_files/app/controllers/welcome_controller.rb +9 -0
- data/templates/app_files/app/helpers/application_helper.rb.erb +61 -0
- data/templates/app_files/app/mailers/admin_mailer.rb +10 -0
- data/templates/app_files/app/mailers/application_mailer.rb +6 -0
- data/templates/app_files/app/mailers/user_mailer.rb +10 -0
- data/templates/app_files/app/models/admin.rb +42 -0
- data/templates/app_files/app/models/audit.rb +4 -0
- data/templates/app_files/app/models/concerns/password_creatable.rb +39 -0
- data/templates/app_files/app/models/user.rb +43 -0
- data/templates/app_files/app/vendor/assets/javascripts/footable.min.js +10 -0
- data/templates/{vendor → app_files/app/vendor}/assets/javascripts/jquery.datetimepicker.js +0 -0
- data/templates/{vendor → app_files/app/vendor}/assets/javascripts/jquery.maskedinput.min.js +0 -0
- data/templates/{vendor → app_files/app/vendor}/assets/javascripts/nprogress.js +0 -0
- data/templates/{vendor → app_files/app/vendor}/assets/javascripts/trix.js +0 -0
- data/templates/app_files/app/vendor/assets/stylesheets/footable.bootstrap.min.css +1 -0
- data/templates/{vendor → app_files/app/vendor}/assets/stylesheets/jquery.datetimepicker.css +0 -0
- data/templates/{vendor → app_files/app/vendor}/assets/stylesheets/nprogress.css +0 -1
- data/templates/{vendor → app_files/app/vendor}/assets/stylesheets/trix.css +0 -0
- data/templates/app_files/app/views/admin_mailer/login_info.html.haml +13 -0
- data/templates/app_files/app/views/hq/admins/_admin.html.haml +38 -0
- data/templates/{app → app_files/app}/views/hq/admins/_blank.html.haml +3 -3
- data/templates/app_files/app/views/hq/admins/_filters.html.haml +27 -0
- data/templates/app_files/app/views/hq/admins/_form.html.haml +17 -0
- data/templates/app_files/app/views/hq/admins/_list.html.haml +20 -0
- data/templates/app_files/app/views/hq/admins/edit.html.haml +3 -0
- data/templates/app_files/app/views/hq/admins/index.html.haml +18 -0
- data/templates/{app → app_files/app}/views/hq/admins/new.html.haml +2 -2
- data/templates/{app → app_files/app}/views/hq/admins/show.html.haml +8 -8
- data/templates/app_files/app/views/hq/audits/_filters.html.haml +48 -0
- data/templates/app_files/app/views/hq/audits/_list.html.haml +47 -0
- data/templates/{app → app_files/app}/views/hq/audits/index.html.haml +3 -3
- data/templates/app_files/app/views/hq/audits/show.html.haml +8 -0
- data/templates/app_files/app/views/hq/dashboard/index.html.haml +13 -0
- data/templates/app_files/app/views/hq/passwords/edit.html.haml +24 -0
- data/templates/app_files/app/views/hq/passwords/new.html.haml +21 -0
- data/templates/app_files/app/views/hq/registrations/edit.html.haml +30 -0
- data/templates/app_files/app/views/hq/sessions/new.html.haml +20 -0
- data/templates/{app → app_files/app}/views/hq/users/_blank.html.haml +3 -3
- data/templates/app_files/app/views/hq/users/_filters.html.haml +26 -0
- data/templates/app_files/app/views/hq/users/_form.html.haml +17 -0
- data/templates/app_files/app/views/hq/users/_list.html.haml +21 -0
- data/templates/app_files/app/views/hq/users/_user.html.haml +38 -0
- data/templates/app_files/app/views/hq/users/edit.html.haml +3 -0
- data/templates/app_files/app/views/hq/users/index.html.haml +18 -0
- data/templates/{app → app_files/app}/views/hq/users/new.html.haml +2 -2
- data/templates/{app → app_files/app}/views/hq/users/show.html.haml +8 -9
- data/templates/app_files/app/views/layouts/application.html.haml.erb +33 -0
- data/templates/app_files/app/views/layouts/hq/application.html.haml.erb +57 -0
- data/templates/app_files/app/views/layouts/hq/login.html.haml.erb +47 -0
- data/templates/app_files/app/views/layouts/hq/partials/_breadcrumb.html.haml +3 -0
- data/templates/app_files/app/views/layouts/hq/partials/_dock.html.haml +95 -0
- data/templates/{app/views/layouts/hq/partials/_footer.html.haml.erb → app_files/app/views/layouts/hq/partials/_footer.html.haml} +0 -0
- data/templates/app_files/app/views/layouts/hq/partials/_navbar.html.haml +35 -0
- data/templates/app_files/app/views/layouts/hq/partials/_toolbar.html.haml +3 -0
- data/templates/{app/views/layouts/hq/partials/_trackers.html.haml.erb → app_files/app/views/layouts/hq/partials/_trackers.html.haml} +0 -0
- data/templates/app_files/app/views/layouts/mailer.html.haml.erb +255 -0
- data/templates/app_files/app/views/layouts/partials/_messages.html.haml +11 -0
- data/templates/app_files/app/views/layouts/partials/_navbar.html.haml.erb +37 -0
- data/templates/{app/views/layouts/partials/_footer.html.haml.erb → app_files/app/views/layouts/partials/_warnings.html.haml} +0 -0
- data/templates/app_files/app/views/user/dashboard/index.html.haml +11 -0
- data/templates/app_files/app/views/user/passwords/edit.html.haml +18 -0
- data/templates/app_files/app/views/user/passwords/new.html.haml +18 -0
- data/templates/{app → app_files/app}/views/user/profile/_form.html.haml +5 -5
- data/templates/app_files/app/views/user/profile/edit.html.haml +3 -0
- data/templates/app_files/app/views/user/profile/show.html.haml +18 -0
- data/templates/app_files/app/views/user/registrations/edit.html.haml +30 -0
- data/templates/app_files/app/views/user/registrations/new.html.haml +33 -0
- data/templates/app_files/app/views/user/sessions/new.html.haml +15 -0
- data/templates/app_files/app/views/user_mailer/login_info.html.haml +13 -0
- data/templates/app_files/app/views/welcome/about.html.haml +3 -0
- data/templates/app_files/app/views/welcome/contact.html.haml +3 -0
- data/templates/app_files/app/views/welcome/index.html.haml.erb +19 -0
- data/templates/app_files/bootstrap_Gemfile.erb +4 -0
- data/templates/app_files/breadcrumb_Gemfile.erb +4 -0
- data/templates/app_files/jquery_Gemfile.erb +4 -0
- data/templates/{public → app_files/public}/images/favicon.png +0 -0
- data/templates/{public → app_files/public}/images/mail-logo.png +0 -0
- data/templates/basic_authentication/basic_authentication.rb +22 -0
- data/templates/basic_authentication/basic_authentication_settings.yml.erb +3 -0
- data/templates/basic_authentication/include_module.erb +2 -0
- data/templates/basic_authentication/no_basic_authentication.erb +2 -0
- data/templates/basic_authentication/yes_basic_authentication.erb +2 -0
- data/templates/bullet/bullet_settings.rb.erb +9 -0
- data/templates/config/config_application.rb.erb +4 -0
- data/templates/config/locales/devise.en.yml +99 -0
- data/templates/config/locales/devise.tr.yml +97 -0
- data/templates/config/locales/en.yml +34 -0
- data/templates/config/locales/mailer.en.yml +32 -0
- data/templates/config/locales/{email.tr.yml → mailer.tr.yml} +6 -2
- data/templates/config/locales/models.en.yml +74 -0
- data/templates/config/locales/models.tr.yml +11 -27
- data/templates/config/locales/responders.en.yml +15 -0
- data/templates/config/locales/responders.tr.yml +3 -2
- data/templates/config/locales/show_for.tr.yml +3 -3
- data/templates/config/locales/view.en.yml +73 -0
- data/templates/config/locales/view.tr.yml +55 -82
- data/templates/config/routes.rb.erb +63 -0
- data/templates/cybele_gitignore +4 -3
- data/templates/devise/devise_authenticate_admin.rb.erb +2 -0
- data/templates/devise/devise_before_action_strong_parameter.rb.erb +3 -0
- data/templates/devise/devise_mailer.rb.erb +1 -0
- data/templates/devise/devise_strong_parameter.rb.erb +13 -0
- data/templates/{app/views/devise → devise/devise_views}/confirmations/new.html.haml +4 -1
- data/templates/devise/devise_views/mailer/confirmation_instructions.html.haml +5 -0
- data/templates/devise/devise_views/mailer/reset_password_instructions.html.haml +7 -0
- data/templates/{app/views/devise → devise/devise_views}/mailer/unlock_instructions.html.haml +1 -1
- data/templates/devise/devise_views/passwords/edit.html.haml +19 -0
- data/templates/devise/devise_views/passwords/new.html.haml +14 -0
- data/templates/devise/devise_views/registrations/edit.html.haml +21 -0
- data/templates/devise/devise_views/registrations/new.html.haml +32 -0
- data/templates/{app/views/devise → devise/devise_views}/sessions/new.html.haml +8 -3
- data/templates/devise/devise_views/shared/_links.haml +29 -0
- data/templates/{app/views/devise → devise/devise_views}/unlocks/new.html.haml +4 -1
- data/templates/devise/seeds.rb.erb +1 -0
- data/templates/docker/Dockerfile.erb +48 -0
- data/templates/docker/docker-compose.yml.erb +46 -0
- data/templates/docker/docker_env_local_sample.erb +6 -0
- data/templates/docker/docker_env_local_sample_host.erb +1 -0
- data/templates/docker/docker_env_local_sample_sidekiq.erb +2 -0
- data/templates/docker/docker_env_staging_production_sidekiq.erb +2 -0
- data/templates/docker/start-app.sh.erb +7 -0
- data/templates/docker/start-sidekiq.sh.erb +27 -0
- data/templates/dotenv/.env.local.erb +5 -0
- data/templates/dotenv/.env.production.erb +5 -0
- data/templates/dotenv/.env.sample.erb +5 -0
- data/templates/dotenv/.env.staging.erb +5 -0
- data/templates/dotenv/dotenv_Gemfile.erb +2 -0
- data/templates/error_pages/error_control.erb +7 -0
- data/templates/error_pages/error_method.erb +10 -0
- data/templates/error_pages/error_route.erb.rb +2 -0
- data/templates/error_pages/internal_server_error.html.haml +2 -0
- data/templates/error_pages/not_found.html.haml +2 -0
- data/templates/guardfile/guardfile_settings.rb.erb +49 -0
- data/templates/haml/haml_Gemfile.erb +5 -0
- data/templates/mailer/.env.local.erb +7 -0
- data/templates/mailer/host.rb.erb +2 -0
- data/templates/mailer/mailer_settings.yml.erb +8 -0
- data/templates/mailer/smtp.rb.erb +10 -0
- data/templates/paperclip/paperclip.rb.erb +11 -0
- data/templates/paperclip/paperclip_Gemfile.erb +4 -0
- data/templates/paperclip/paperclip_env_local.erb +6 -0
- data/templates/paperclip/paperclip_env_production.erb +6 -0
- data/templates/paperclip/paperclip_env_sample.erb +6 -0
- data/templates/paperclip/paperclip_env_staging.erb +6 -0
- data/templates/paperclip/paperclip_settings.yml.erb +10 -0
- data/templates/postgresql_database.yml.erb +24 -0
- data/templates/pronto/.flayignore.erb +5 -0
- data/templates/pronto/.haml-lint.yml.erb +5 -0
- data/templates/pronto/.rubocop.yml.erb +38 -0
- data/templates/pronto/config.reek.erb +42 -0
- data/templates/pronto/example.pronto.yml.erb +27 -0
- data/templates/pronto/rubo.erb +24 -0
- data/templates/recipient_interceptor/recipient_interceptor_settings.yml.erb +4 -0
- data/templates/recipient_interceptor/recipient_interceptor_staging.rb.erb +2 -0
- data/templates/responders/responders_Gemfile.erb +3 -0
- data/templates/ruby-version +1 -1
- data/templates/secrets.yml.erb +3 -0
- data/templates/settings.yml.erb +1 -0
- data/templates/show_for/show_for_Gemfile.erb +3 -0
- data/templates/sidekiq/sidekiq.rake.erb +42 -0
- data/templates/sidekiq/sidekiq.rb.erb +18 -0
- data/templates/sidekiq/sidekiq.yml.erb +18 -0
- data/templates/sidekiq/sidekiq_Gemfile.erb +8 -0
- data/templates/{Procfile.erb → sidekiq/sidekiq_Procfile.erb} +0 -0
- data/templates/sidekiq/sidekiq_application.rb.erb +3 -0
- data/templates/sidekiq/sidekiq_routes_mount.erb +8 -0
- data/templates/sidekiq/sidekiq_routes_require.erb +3 -0
- data/templates/{config/schedule.yml → sidekiq/sidekiq_schedule.yml.erb} +6 -4
- data/templates/simple_form/simple_form_Gemfile.erb +3 -0
- data/templates/ssl/ssl_env_all.erb +2 -0
- metadata +369 -179
- data/templates/.env.local.erb +0 -11
- data/templates/.env.production.erb +0 -11
- data/templates/.env.staging.erb +0 -11
- data/templates/app/assets/javascripts/application.js.coffee +0 -81
- data/templates/app/assets/javascripts/hq/application.js.coffee +0 -94
- data/templates/app/assets/stylesheets/hq/application.css.sass +0 -92
- data/templates/app/controllers/application_controller.rb.erb +0 -48
- data/templates/app/controllers/concerns/basic_authentication.rb +0 -18
- data/templates/app/controllers/hq/application_controller.rb +0 -18
- data/templates/app/controllers/hq/cities_controller.rb +0 -54
- data/templates/app/controllers/hq/countries_controller.rb +0 -54
- data/templates/app/controllers/hq/dashboard_controller.rb +0 -8
- data/templates/app/controllers/hq/registrations_controller.rb +0 -21
- data/templates/app/controllers/user/dashboard_controller.rb +0 -8
- data/templates/app/controllers/user/profile_controller.rb +0 -34
- data/templates/app/controllers/user/user_application_controller.rb +0 -26
- data/templates/app/controllers/welcome_controller.rb +0 -4
- data/templates/app/helpers/application_helper.rb.erb +0 -27
- data/templates/app/mailers/admin_mailer.rb +0 -10
- data/templates/app/mailers/base_mailer.rb +0 -4
- data/templates/app/mailers/user_mailer.rb +0 -10
- data/templates/app/models/admin.rb +0 -51
- data/templates/app/models/audit.rb +0 -3
- data/templates/app/models/city.rb +0 -12
- data/templates/app/models/country.rb +0 -12
- data/templates/app/models/user.rb +0 -54
- data/templates/app/views/admin_mailer/login_info.html.haml +0 -13
- data/templates/app/views/devise/mailer/confirmation_instructions.html.haml +0 -6
- data/templates/app/views/devise/mailer/reset_password_instructions.html.haml +0 -9
- data/templates/app/views/devise/passwords/edit.html.haml +0 -11
- data/templates/app/views/devise/passwords/new.html.haml +0 -9
- data/templates/app/views/devise/registrations/edit.html.haml +0 -12
- data/templates/app/views/devise/registrations/new.html.haml +0 -24
- data/templates/app/views/devise/shared/_links.haml +0 -22
- data/templates/app/views/errors/internal_server_error.html.haml +0 -2
- data/templates/app/views/errors/not_found.html.haml +0 -2
- data/templates/app/views/hq/admins/_admin.html.haml +0 -21
- data/templates/app/views/hq/admins/_filters.html.haml +0 -20
- data/templates/app/views/hq/admins/_form.html.haml +0 -17
- data/templates/app/views/hq/admins/_list.html.haml +0 -15
- data/templates/app/views/hq/admins/edit.html.haml +0 -3
- data/templates/app/views/hq/admins/index.html.haml +0 -18
- data/templates/app/views/hq/audits/_filters.html.haml +0 -32
- data/templates/app/views/hq/audits/_list.html.haml +0 -37
- data/templates/app/views/hq/audits/show.html.haml +0 -5
- data/templates/app/views/hq/cities/_blank.html.haml +0 -9
- data/templates/app/views/hq/cities/_city.html.haml +0 -12
- data/templates/app/views/hq/cities/_filters.html.haml +0 -15
- data/templates/app/views/hq/cities/_form.html.haml +0 -15
- data/templates/app/views/hq/cities/_list.html.haml +0 -13
- data/templates/app/views/hq/cities/edit.html.haml +0 -3
- data/templates/app/views/hq/cities/index.html.haml +0 -18
- data/templates/app/views/hq/cities/new.html.haml +0 -3
- data/templates/app/views/hq/cities/show.html.haml +0 -13
- data/templates/app/views/hq/countries/_blank.html.haml +0 -9
- data/templates/app/views/hq/countries/_country.html.haml +0 -11
- data/templates/app/views/hq/countries/_filters.html.haml +0 -14
- data/templates/app/views/hq/countries/_form.html.haml +0 -14
- data/templates/app/views/hq/countries/_list.html.haml +0 -12
- data/templates/app/views/hq/countries/edit.html.haml +0 -3
- data/templates/app/views/hq/countries/index.html.haml +0 -18
- data/templates/app/views/hq/countries/new.html.haml +0 -3
- data/templates/app/views/hq/countries/show.html.haml +0 -14
- data/templates/app/views/hq/dashboard/index.html.haml +0 -8
- data/templates/app/views/hq/passwords/edit.html.haml +0 -12
- data/templates/app/views/hq/passwords/new.html.haml +0 -9
- data/templates/app/views/hq/registrations/edit.html.haml +0 -19
- data/templates/app/views/hq/sessions/new.html.haml +0 -11
- data/templates/app/views/hq/users/_filters.html.haml +0 -20
- data/templates/app/views/hq/users/_form.html.haml +0 -18
- data/templates/app/views/hq/users/_list.html.haml +0 -15
- data/templates/app/views/hq/users/_user.html.haml +0 -20
- data/templates/app/views/hq/users/edit.html.haml +0 -3
- data/templates/app/views/hq/users/index.html.haml +0 -18
- data/templates/app/views/layouts/application.html.haml.erb +0 -56
- data/templates/app/views/layouts/hq/application.html.haml.erb +0 -55
- data/templates/app/views/layouts/hq/login.html.haml.erb +0 -35
- data/templates/app/views/layouts/hq/partials/_dock.html.haml.erb +0 -36
- data/templates/app/views/layouts/hq/partials/_navbar.html.haml.erb +0 -22
- data/templates/app/views/layouts/mailer.html.haml.erb +0 -321
- data/templates/app/views/layouts/mailer.text.haml +0 -1
- data/templates/app/views/layouts/partials/_trackers.html.haml.erb +0 -0
- data/templates/app/views/layouts/partials/_warnings.html.haml.erb +0 -3
- data/templates/app/views/user/dashboard/index.html.haml +0 -8
- data/templates/app/views/user/passwords/edit.html.haml +0 -12
- data/templates/app/views/user/passwords/new.html.haml +0 -10
- data/templates/app/views/user/profile/edit.html.haml +0 -3
- data/templates/app/views/user/profile/show.html.haml +0 -18
- data/templates/app/views/user/registrations/edit.html.haml +0 -19
- data/templates/app/views/user/sessions/new.html.haml +0 -11
- data/templates/app/views/user_mailer/login_info.html.haml +0 -13
- data/templates/app/views/welcome/index.html.haml.erb +0 -16
- data/templates/config/database.yml.erb +0 -21
- data/templates/config/deploy.rb +0 -56
- data/templates/config/initializers/devise_async.rb +0 -6
- data/templates/config/initializers/disable_xml_params.rb +0 -3
- data/templates/config/initializers/mail.rb +0 -13
- data/templates/config/initializers/paperclip.rb +0 -10
- data/templates/config/initializers/secret_token.erb +0 -25
- data/templates/config/initializers/show_for.rb +0 -3
- data/templates/config/initializers/sidekiq.rb +0 -13
- data/templates/config/initializers/simple_form.rb +0 -142
- data/templates/config/initializers/simple_form_bootstrap.rb +0 -207
- data/templates/config/routes.erb +0 -51
- data/templates/config/settings.yml +0 -0
- data/templates/config/settings/production.yml +0 -0
- data/templates/config/settings/staging.yml +0 -0
- data/templates/config/sidekiq.yml +0 -13
- data/templates/cybele_Gemfile +0 -106
- data/templates/cybele_version.txt +0 -1
- data/templates/env.sample.erb +0 -11
- data/templates/lib/application_responder.rb +0 -8
- data/templates/lib/data/cities.yml +0 -163
- data/templates/lib/tasks/annotate.rake +0 -6
- data/templates/lib/tasks/dev.rake +0 -56
- data/templates/lib/tasks/sidekiq.rake +0 -26
- data/templates/lib/templates/rails/responders_controller/controller.rb +0 -56
- data/templates/public/images/missing_cover.png +0 -0
- data/templates/public/images/missing_cover@2x.png +0 -0
- data/templates/public/images/missing_logo.png +0 -0
- data/templates/public/images/missing_logo@2x.png +0 -0
- data/templates/public/images/sprite.png +0 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
RSpec.describe 'Create new project without default configuration' do
|
|
6
|
+
before(:all) do
|
|
7
|
+
remove_project_directory
|
|
8
|
+
run_cybele(cybele_not_default_parameters)
|
|
9
|
+
setup_app_dependencies
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
it 'uses sqlite3 instead of default pg in Gemfile' do
|
|
13
|
+
gemfile_file = content('Gemfile')
|
|
14
|
+
readme_file = content('README.md')
|
|
15
|
+
expect(gemfile_file).not_to match(/^gem 'pg'/)
|
|
16
|
+
expect(gemfile_file).to match(/^gem 'sqlite3'/)
|
|
17
|
+
expect(readme_file).to match(/^# #{app_name.capitalize}/)
|
|
18
|
+
expect(readme_file).not_to match(/^# Docker development/)
|
|
19
|
+
expect(readme_file).not_to match(/^➜ ✗ redis-server/)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'uses sqlite3 database template' do
|
|
23
|
+
database_file = content('config/database.yml')
|
|
24
|
+
expect(database_file).to match(/^default: &default/)
|
|
25
|
+
expect(database_file).to match(/adapter: sqlite3/)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it 'do not use sidekiq' do
|
|
29
|
+
gemfile_file = content('Gemfile')
|
|
30
|
+
expect(gemfile_file).not_to match(/^gem 'sidekiq'/)
|
|
31
|
+
expect(gemfile_file).not_to match(/^gem 'sidekiq-cron'/)
|
|
32
|
+
expect(gemfile_file).not_to match(/^gem 'cocaine'/)
|
|
33
|
+
expect(gemfile_file).not_to match(/^gem 'devise-async'/)
|
|
34
|
+
file_not_exist_test(
|
|
35
|
+
%w[
|
|
36
|
+
config/sidekiq.yml
|
|
37
|
+
config/sidekiq_schedule.yml
|
|
38
|
+
config/initializers/sidekiq.rb
|
|
39
|
+
lib/tasks/sidekiq.rake
|
|
40
|
+
]
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
routes_file = content('config/routes.rb')
|
|
44
|
+
expect(routes_file).not_to match("^require 'sidekiq/web'")
|
|
45
|
+
expect(routes_file).not_to match("^require 'sidekiq/cron/web'")
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
it 'uses responders' do
|
|
49
|
+
responder_test
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
it 'uses rollbar' do
|
|
53
|
+
gemfile_file = content('Gemfile')
|
|
54
|
+
expect(gemfile_file).to match(/^gem 'rollbar'/)
|
|
55
|
+
|
|
56
|
+
config_file = content('config/initializers/rollbar.rb')
|
|
57
|
+
expect(config_file).to match(/^Rollbar.configure/)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
it 'uses ransack' do
|
|
61
|
+
gemfile_file = content('Gemfile')
|
|
62
|
+
expect(gemfile_file).to match(/^gem 'ransack'/)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it 'uses will_paginate' do
|
|
66
|
+
gemfile_file = content('Gemfile')
|
|
67
|
+
expect(gemfile_file).to match(/^gem 'will_paginate'/)
|
|
68
|
+
expect(gemfile_file).to match(/^gem 'will_paginate-bootstrap'/)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
it 'uses to_xls' do
|
|
72
|
+
gemfile_file = content('Gemfile')
|
|
73
|
+
expect(gemfile_file).to match(/^gem 'to_xls'/)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
it 'uses roo' do
|
|
77
|
+
gemfile_file = content('Gemfile')
|
|
78
|
+
expect(gemfile_file).to match(/^gem 'roo'/)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
it 'uses roo-xls' do
|
|
82
|
+
gemfile_file = content('Gemfile')
|
|
83
|
+
expect(gemfile_file).to match(/^gem 'roo-xls'/)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
it 'uses write_xlsx' do
|
|
87
|
+
gemfile_file = content('Gemfile')
|
|
88
|
+
expect(gemfile_file).to match(/^gem 'write_xlsx'/)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
it 'uses colorize' do
|
|
92
|
+
gemfile_file = content('Gemfile')
|
|
93
|
+
expect(gemfile_file).to match("gem 'colorize'")
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
it 'uses better_errors' do
|
|
97
|
+
gemfile_file = content('Gemfile')
|
|
98
|
+
expect(gemfile_file).to match("gem 'better_errors'")
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
it 'uses rails-i18n' do
|
|
102
|
+
gemfile_file = content('Gemfile')
|
|
103
|
+
expect(gemfile_file).to match(/^gem 'rails-i18n'/)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
it 'do not use show_for' do
|
|
107
|
+
gemfile_file = content('Gemfile')
|
|
108
|
+
expect(gemfile_file).not_to match(/^gem 'show_for'/)
|
|
109
|
+
file_not_exist_test(
|
|
110
|
+
%w[
|
|
111
|
+
config/initializers/show_for.rb
|
|
112
|
+
config/locales/show_for.en.yml
|
|
113
|
+
config/locales/show_for.tr.yml
|
|
114
|
+
]
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
it 'uses config and staging file' do
|
|
119
|
+
config_test
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
it 'uses locale_language' do
|
|
123
|
+
locale_language_test
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
it 'uses recipient_interceptor' do
|
|
127
|
+
gemfile_file = content('Gemfile')
|
|
128
|
+
expect(gemfile_file).to match(/^gem 'recipient_interceptor'/)
|
|
129
|
+
|
|
130
|
+
config_staging_file = content('config/environments/staging.rb')
|
|
131
|
+
expect(config_staging_file).to match('RecipientInterceptor.new')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
it 'uses cybele_version' do
|
|
135
|
+
expect(File).to exist(file_project_path('VERSION.txt'))
|
|
136
|
+
expect(File).to exist(file_project_path('public/VERSION.txt'))
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
it 'uses bullet' do
|
|
140
|
+
gemfile_file = content('Gemfile')
|
|
141
|
+
expect(gemfile_file).to match("gem 'bullet'")
|
|
142
|
+
|
|
143
|
+
locale_file = content('config/environments/development.rb')
|
|
144
|
+
expect(locale_file).to match('Bullet')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
it 'do not use simple_form' do
|
|
148
|
+
gemfile_file = content('Gemfile')
|
|
149
|
+
expect(gemfile_file).not_to match(/^gem 'simple_form'/)
|
|
150
|
+
|
|
151
|
+
file_not_exist_test(
|
|
152
|
+
%w[
|
|
153
|
+
config/initializers/simple_form.rb
|
|
154
|
+
config/initializers/simple_form_bootstrap.rb
|
|
155
|
+
config/locales/simple_form.en.yml
|
|
156
|
+
config/locales/simple_form.tr.yml
|
|
157
|
+
]
|
|
158
|
+
)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
it 'make control secret_key_base for staging' do
|
|
162
|
+
secret_file = content('config/secrets.yml')
|
|
163
|
+
expect(secret_file).to match('staging')
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
it 'uses paperclip' do
|
|
167
|
+
paperclip_test
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
it 'control .env files' do
|
|
171
|
+
dotenv_test
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
it 'uses mailer' do
|
|
175
|
+
gemfile_file = content('Gemfile')
|
|
176
|
+
expect(gemfile_file).to match("gem 'mailtrap'")
|
|
177
|
+
|
|
178
|
+
file_exist_test(
|
|
179
|
+
%w[
|
|
180
|
+
config/settings/production.yml
|
|
181
|
+
config/settings/staging.yml
|
|
182
|
+
]
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
mail_test_helper('config/settings.yml')
|
|
186
|
+
mail_test_helper('config/environments/production.rb')
|
|
187
|
+
mail_test_helper('config/environments/staging.rb')
|
|
188
|
+
mail_test_helper('config/environments/development.rb')
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
it 'do not use haml' do
|
|
192
|
+
gemfile_file = content('Gemfile')
|
|
193
|
+
expect(gemfile_file).not_to match(/^gem 'haml'/)
|
|
194
|
+
expect(gemfile_file).not_to match(/^gem 'haml-rails'/)
|
|
195
|
+
|
|
196
|
+
expect(File).to exist(file_project_path('app/views/layouts/application.html.erb'))
|
|
197
|
+
expect(File).not_to exist(file_project_path('app/views/layouts/application.html.haml'))
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
it 'uses devise' do
|
|
201
|
+
devise_test
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
it 'uses error_pages' do
|
|
205
|
+
error_pages_test
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
it 'uses gitignore' do
|
|
209
|
+
git_ignore_test
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
it 'do not use asset files' do
|
|
213
|
+
gemfile_file = content('Gemfile')
|
|
214
|
+
expect(gemfile_file).not_to match(/^gem 'bootstrap'/)
|
|
215
|
+
|
|
216
|
+
file_exist_test(
|
|
217
|
+
%w[
|
|
218
|
+
app/assets/stylesheets/application.css
|
|
219
|
+
app/assets/javascripts/application.js
|
|
220
|
+
]
|
|
221
|
+
)
|
|
222
|
+
file_not_exist_test(
|
|
223
|
+
%w[
|
|
224
|
+
app/assets/stylesheets/application.css.sass
|
|
225
|
+
app/assets/stylesheets/hq/application.css.sass
|
|
226
|
+
app/assets/javascripts/hq/application.js
|
|
227
|
+
]
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
it 'do not use controller files' do
|
|
232
|
+
expect(File).to exist(file_project_path('app/controllers/application_controller.rb'))
|
|
233
|
+
|
|
234
|
+
# Hq files
|
|
235
|
+
file_not_exist_test(
|
|
236
|
+
%w[
|
|
237
|
+
app/controllers/hq/admins_controller.rb
|
|
238
|
+
app/controllers/hq/application_controller.rb
|
|
239
|
+
app/controllers/hq/audits_controller.rb
|
|
240
|
+
app/controllers/hq/dashboard_controller.rb
|
|
241
|
+
app/controllers/hq/passwords_controller.rb
|
|
242
|
+
app/controllers/hq/registrations_controller.rb
|
|
243
|
+
app/controllers/hq/sessions_controller.rb
|
|
244
|
+
app/controllers/hq/users_controller.rb
|
|
245
|
+
]
|
|
246
|
+
)
|
|
247
|
+
# User files
|
|
248
|
+
file_not_exist_test(
|
|
249
|
+
%w[
|
|
250
|
+
app/controllers/user/application_controller.rb
|
|
251
|
+
app/controllers/user/dashboard_controller.rb
|
|
252
|
+
app/controllers/user/passwords_controller.rb
|
|
253
|
+
app/controllers/user/registrations_controller.rb
|
|
254
|
+
app/controllers/user/sessions_controller.rb
|
|
255
|
+
app/controllers/user/profile_controller.rb
|
|
256
|
+
]
|
|
257
|
+
)
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
it 'do not use view files with option' do
|
|
261
|
+
# Hq files
|
|
262
|
+
file_not_exist_test(
|
|
263
|
+
%w[
|
|
264
|
+
app/views/hq/admins/index.html.haml
|
|
265
|
+
app/views/hq/audits/index.html.haml
|
|
266
|
+
app/views/hq/dashboard/index.html.haml
|
|
267
|
+
app/views/hq/passwords/new.html.haml
|
|
268
|
+
app/views/hq/registrations/edit.html.haml
|
|
269
|
+
app/views/hq/sessions/new.html.haml
|
|
270
|
+
app/views/hq/users/index.html.haml
|
|
271
|
+
]
|
|
272
|
+
)
|
|
273
|
+
# User files
|
|
274
|
+
file_not_exist_test(
|
|
275
|
+
%w[
|
|
276
|
+
app/views/user/dashboard/index.html.haml
|
|
277
|
+
app/views/user/passwords/new.html.haml
|
|
278
|
+
app/views/user/registrations/edit.html.haml
|
|
279
|
+
app/views/user/sessions/new.html.haml
|
|
280
|
+
app/views/user/profile/show.html.haml
|
|
281
|
+
]
|
|
282
|
+
)
|
|
283
|
+
# Layouts
|
|
284
|
+
file_not_exist_test(
|
|
285
|
+
%w[
|
|
286
|
+
app/views/layouts/hq/partials/_dock.html.haml
|
|
287
|
+
app/views/layouts/hq/partials/_breadcrumb.html.haml
|
|
288
|
+
app/views/layouts/hq/partials/_footer.html.haml
|
|
289
|
+
app/views/layouts/hq/partials/_navbar.html.haml
|
|
290
|
+
app/views/layouts/hq/partials/_toolbar.html.haml
|
|
291
|
+
app/views/layouts/hq/partials/_trackers.html.haml
|
|
292
|
+
app/views/layouts/partials/_messages.html.haml
|
|
293
|
+
app/views/layouts/partials/_warnings.html.haml
|
|
294
|
+
]
|
|
295
|
+
)
|
|
296
|
+
# Devise view files
|
|
297
|
+
file_not_exist_test(
|
|
298
|
+
%w[
|
|
299
|
+
app/views/devise/confirmations
|
|
300
|
+
app/views/devise/mailer
|
|
301
|
+
app/views/devise/passwords
|
|
302
|
+
app/views/devise/registrations
|
|
303
|
+
app/views/devise/sessions
|
|
304
|
+
app/views/devise/shared
|
|
305
|
+
app/views/devise/unlocks
|
|
306
|
+
]
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
# Welcome view files
|
|
310
|
+
file_not_exist_test(
|
|
311
|
+
%w[
|
|
312
|
+
app/views/welcome/about.html.haml
|
|
313
|
+
app/views/welcome/contact.html.haml
|
|
314
|
+
app/views/welcome/index.html.haml
|
|
315
|
+
]
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
# Public files
|
|
319
|
+
expect(File).not_to exist(file_project_path('public/images/favicon.png'))
|
|
320
|
+
|
|
321
|
+
# Basic authentication files
|
|
322
|
+
expect(File).not_to exist(file_project_path('app/controllers/concerns/basic_authentication.rb'))
|
|
323
|
+
|
|
324
|
+
application_controller = content('app/controllers/application_controller.rb')
|
|
325
|
+
expect(application_controller).not_to match('include BasicAuthentication')
|
|
326
|
+
|
|
327
|
+
%w[
|
|
328
|
+
.env.sample
|
|
329
|
+
.env.local
|
|
330
|
+
.environments/.env.local
|
|
331
|
+
.environments/.env.production
|
|
332
|
+
].each do |env|
|
|
333
|
+
expect(content(env)).not_to match('BASIC_AUTH_IS_ACTIVE=no')
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
%w[.environments/.env.staging].each do |env|
|
|
337
|
+
expect(content(env)).not_to match('BASIC_AUTH_IS_ACTIVE=yes')
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
it 'uses default view files' do
|
|
342
|
+
# Mailer files
|
|
343
|
+
hq_admins_view = content('app/views/admin_mailer/login_info.html.haml')
|
|
344
|
+
expect(hq_admins_view).to match('@admin')
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
it 'not configure routes file' do
|
|
348
|
+
route_file = content('config/routes.rb')
|
|
349
|
+
expect(route_file).not_to match('concern :activeable')
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
it 'uses model files' do
|
|
353
|
+
admin_model = content('app/models/admin.rb')
|
|
354
|
+
expect(admin_model).to match('login_info_mailer')
|
|
355
|
+
|
|
356
|
+
audit_model = content('app/models/audit.rb')
|
|
357
|
+
expect(audit_model).to match('class Audit')
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
it 'uses mailer files' do
|
|
361
|
+
admin_mailer = content('app/mailers/admin_mailer.rb')
|
|
362
|
+
expect(admin_mailer).to match('class AdminMailer')
|
|
363
|
+
|
|
364
|
+
application_mailer = content('app/mailers/application_mailer.rb')
|
|
365
|
+
expect(application_mailer).to match('Settings.email.noreply')
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
it 'uses ssl_setting' do
|
|
369
|
+
force_ssl_test
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
it "don't use docker development environment" do
|
|
373
|
+
file_not_exist_test(
|
|
374
|
+
%w[
|
|
375
|
+
docker-compose.yml
|
|
376
|
+
Dockerfile
|
|
377
|
+
bin/start-app.sh
|
|
378
|
+
bin/start-sidekiq.sh
|
|
379
|
+
]
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
file_exist_test(
|
|
383
|
+
%w[
|
|
384
|
+
.env.sample
|
|
385
|
+
.env.local
|
|
386
|
+
.environments/.env.local
|
|
387
|
+
]
|
|
388
|
+
) do |env|
|
|
389
|
+
expect(content(env)).not_to match('REDISTOGO_URL=redis://redis:6379/0')
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
file_exist_test(
|
|
393
|
+
%w[
|
|
394
|
+
.environments/.env.staging
|
|
395
|
+
.environments/.env.production
|
|
396
|
+
]
|
|
397
|
+
) do |env|
|
|
398
|
+
expect(content(env)).not_to match('REDISTOGO_URL=')
|
|
399
|
+
end
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
it 'uses pronto' do
|
|
403
|
+
pronto_test
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
it 'uses guardfile' do
|
|
407
|
+
gemfile_file = content('Gemfile')
|
|
408
|
+
expect(gemfile_file).to match("gem 'guard'")
|
|
409
|
+
|
|
410
|
+
expect(File).to exist(file_project_path('Guardfile'))
|
|
411
|
+
end
|
|
412
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
|
|
5
|
+
Bundler.require(:default, :test)
|
|
6
|
+
|
|
7
|
+
source_path = (Pathname.new(__FILE__).dirname + '../lib/cybele').expand_path
|
|
8
|
+
require source_path
|
|
9
|
+
|
|
10
|
+
Dir['./spec/support/**/*.rb'].each { |file| require file }
|
|
11
|
+
|
|
12
|
+
RSpec.configure do |config|
|
|
13
|
+
config.include CybeleTestHelpers
|
|
14
|
+
config.include DotenvTestHelper
|
|
15
|
+
config.include ConfigTestHelper
|
|
16
|
+
config.include DeviseTestHelper
|
|
17
|
+
config.include PaperclipTestHelper
|
|
18
|
+
config.include LocaleLanguageTestHelper
|
|
19
|
+
config.include ResponderTestHelper
|
|
20
|
+
config.include ErrorPagesTestHelper
|
|
21
|
+
config.include GitIgnoreTestHelper
|
|
22
|
+
config.include MailTestHelpers
|
|
23
|
+
config.include ForceSSLTestHelper
|
|
24
|
+
config.include ProntoTestHelpers
|
|
25
|
+
|
|
26
|
+
config.before(:all) do
|
|
27
|
+
create_tmp_directory
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Use color in STDOUT
|
|
31
|
+
config.color = true
|
|
32
|
+
|
|
33
|
+
# Use color not only in STDOUT but also in pagers and files
|
|
34
|
+
config.tty = true
|
|
35
|
+
|
|
36
|
+
# Use the specified formatter
|
|
37
|
+
config.formatter = :documentation
|
|
38
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ConfigTestHelper
|
|
4
|
+
def config_test
|
|
5
|
+
gemfile_file = content('Gemfile')
|
|
6
|
+
expect(gemfile_file).to match(/^gem 'config'/)
|
|
7
|
+
expect(File).not_to exist(file_project_path('config/settings.local.yml'))
|
|
8
|
+
|
|
9
|
+
config_development_file_test
|
|
10
|
+
config_staging_file_test
|
|
11
|
+
config_production_file_test
|
|
12
|
+
config_test_file_test
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def config_development_file_test
|
|
18
|
+
config_development_file = content('config/environments/development.rb')
|
|
19
|
+
expect(config_development_file).to match(/^Rails.application.configure/)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def config_staging_file_test
|
|
23
|
+
config_staging_file = content('config/environments/staging.rb')
|
|
24
|
+
expect(config_staging_file).to match(/^Rails.application.configure/)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def config_production_file_test
|
|
28
|
+
config_production_file = content('config/environments/production.rb')
|
|
29
|
+
expect(config_production_file).to match(/^Rails.application.configure/)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def config_test_file_test
|
|
33
|
+
config_test_file = content('config/environments/test.rb')
|
|
34
|
+
expect(config_test_file).to match(/^Rails.application.configure/)
|
|
35
|
+
end
|
|
36
|
+
end
|