Class: Kazan::AppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Kazan::AppGenerator
- Defined in:
- lib/kazan/generators/app_generator.rb
Instance Method Summary collapse
- #customization ⇒ Object
- #finish_template ⇒ Object
- #outro ⇒ Object
- #setup_assets ⇒ Object
- #setup_bundler_audit ⇒ Object
- #setup_database ⇒ Object
- #setup_development_environment ⇒ Object
- #setup_empty_directories ⇒ Object
- #setup_error_pages ⇒ Object
- #setup_gems ⇒ Object
- #setup_helpers ⇒ Object
- #setup_locales ⇒ Object
- #setup_production_environment ⇒ Object
- #setup_project_repository ⇒ Object
- #setup_puma ⇒ Object
- #setup_ruby ⇒ Object
- #setup_secrets ⇒ Object
- #setup_spring ⇒ Object
- #setup_static ⇒ Object
- #setup_test_environment ⇒ Object
Instance Method Details
#customization ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/kazan/generators/app_generator.rb', line 23 def customization invoke :setup_ruby invoke :setup_gems invoke :setup_secrets invoke :setup_puma invoke :setup_development_environment invoke :setup_test_environment invoke :setup_production_environment invoke :setup_database invoke :setup_assets invoke :setup_helpers invoke :setup_error_pages invoke :setup_locales invoke :setup_static invoke :setup_bundler_audit invoke :setup_spring invoke :setup_empty_directories invoke :setup_project_repository invoke :outro end |
#finish_template ⇒ Object
18 19 20 21 |
# File 'lib/kazan/generators/app_generator.rb', line 18 def finish_template invoke :customization super end |
#outro ⇒ Object
177 178 179 |
# File 'lib/kazan/generators/app_generator.rb', line 177 def outro say 'Last preparation' end |
#setup_assets ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/kazan/generators/app_generator.rb', line 112 def setup_assets unless [:api] say 'Setup assets' build :shared_views_directory build :shared_flash build :shared_javascript build :shared_styles build :assets_config build :shared_layout end end |
#setup_bundler_audit ⇒ Object
157 158 159 160 |
# File 'lib/kazan/generators/app_generator.rb', line 157 def setup_bundler_audit say 'Setup bundler audit' build :bundler_audit_config end |
#setup_database ⇒ Object
106 107 108 109 110 |
# File 'lib/kazan/generators/app_generator.rb', line 106 def setup_database say 'Setup database' build :postgres_config if [:database] == 'postgresql' build :database_tables end |
#setup_development_environment ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/kazan/generators/app_generator.rb', line 70 def setup_development_environment say 'Setup development environment' build :exception_on_delivery_errors build :exception_on_unpermitted_parameters build :exception_on_missing_translations build :letter_opener_config build :bullet_config build :foreman_config build :rails_generators_config unless [:api] build :quiet_assets_config end end |
#setup_empty_directories ⇒ Object
167 168 169 170 |
# File 'lib/kazan/generators/app_generator.rb', line 167 def setup_empty_directories say 'Setup empty directories' build :empty_directories end |
#setup_error_pages ⇒ Object
143 144 145 146 147 148 |
# File 'lib/kazan/generators/app_generator.rb', line 143 def setup_error_pages unless [:api] say 'Customizing the 500/404/422 pages' build :static_pages end end |
#setup_gems ⇒ Object
52 53 54 55 56 57 |
# File 'lib/kazan/generators/app_generator.rb', line 52 def setup_gems if [:api] say 'Setup gems' build :gemfile_api end end |
#setup_helpers ⇒ Object
124 125 126 127 128 129 |
# File 'lib/kazan/generators/app_generator.rb', line 124 def setup_helpers unless [:api] build :simple_form_config build :rack_mini_profiler_config end end |
#setup_locales ⇒ Object
150 151 152 153 154 155 |
# File 'lib/kazan/generators/app_generator.rb', line 150 def setup_locales unless [:api] say 'Setup locales tools' build :setup_locales end end |
#setup_production_environment ⇒ Object
97 98 99 100 101 102 103 104 |
# File 'lib/kazan/generators/app_generator.rb', line 97 def setup_production_environment say 'Setup production environment' build :smtp_config build :rack_timeout_config build :rack_canonical_host_config build :rack_deflater_config build :rollbar_config end |
#setup_project_repository ⇒ Object
172 173 174 175 |
# File 'lib/kazan/generators/app_generator.rb', line 172 def setup_project_repository say 'Setup git reposirory' build :init_commit end |
#setup_puma ⇒ Object
65 66 67 68 |
# File 'lib/kazan/generators/app_generator.rb', line 65 def setup_puma say 'Setup puma' build :puma_config end |
#setup_ruby ⇒ Object
47 48 49 50 |
# File 'lib/kazan/generators/app_generator.rb', line 47 def setup_ruby say 'Setup ruby' build :ruby_version end |
#setup_secrets ⇒ Object
59 60 61 62 63 |
# File 'lib/kazan/generators/app_generator.rb', line 59 def setup_secrets say 'Setup secrets' build :dotenvs build :settings end |
#setup_spring ⇒ Object
162 163 164 165 |
# File 'lib/kazan/generators/app_generator.rb', line 162 def setup_spring say 'Setup spring binstubs' build :spring end |
#setup_static ⇒ Object
131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/kazan/generators/app_generator.rb', line 131 def setup_static unless [:api] if [:static] say 'Setup static' build :remove_turbolinks build :stylesheets_gems build :stylesheets_manifest end end end |
#setup_test_environment ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/kazan/generators/app_generator.rb', line 85 def setup_test_environment say 'Setup test environment' build :exception_on_missing_assets_in_test build :spec_translations_config build :spec_action_mailer_config build :spec_database_cleaner_config build :spec_shoulda_matchers_config build :spec_factory_girl_config build :rspec_config build :rspec_replace_config end |