Class: Barebones::AppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Barebones::AppGenerator
- Defined in:
- lib/barebones/generators/app_generator.rb
Instance Method Summary collapse
- #configure_app ⇒ Object
- #customizations ⇒ Object
- #outro ⇒ Object
- #setup_api ⇒ Object
- #setup_carrierwave ⇒ Object
- #setup_development_environment ⇒ Object
- #setup_environments ⇒ Object
- #setup_factory_girl ⇒ Object
- #setup_gems ⇒ Object
- #setup_minitest ⇒ Object
- #setup_production_environment ⇒ Object
- #setup_puma ⇒ Object
- #setup_resque ⇒ Object
- #setup_routes ⇒ Object
- #setup_ruby ⇒ Object
- #setup_secrets ⇒ Object
- #setup_sidekiq ⇒ Object
- #setup_staging_environment ⇒ Object
- #setup_webserver ⇒ Object
Instance Method Details
#configure_app ⇒ Object
46 47 48 49 |
# File 'lib/barebones/generators/app_generator.rb', line 46 def configure_app say "Configuring application..." build :setup_autoload_paths end |
#customizations ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/barebones/generators/app_generator.rb', line 27 def customizations say "Invoking customizations..." invoke :setup_ruby invoke :configure_app invoke :setup_webserver invoke :setup_routes invoke :setup_api invoke :setup_secrets invoke :setup_environments invoke :setup_gems invoke :outro end |
#outro ⇒ Object
150 151 152 |
# File 'lib/barebones/generators/app_generator.rb', line 150 def outro say "\e[34mSweet, we're done!\e[0m" end |
#setup_api ⇒ Object
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/barebones/generators/app_generator.rb', line 61 def setup_api unless [:skip_api] say "Setting up an API..." build :setup_oj build :create_api_constraints build :create_api_v1_defaults build :create_api_configurations build :create_api_layouts end end |
#setup_carrierwave ⇒ Object
138 139 140 141 142 143 |
# File 'lib/barebones/generators/app_generator.rb', line 138 def setup_carrierwave unless [:setup_carrierwave] say "Setting up Carrierwave gem..." build :configure_carrierwave end end |
#setup_development_environment ⇒ Object
84 85 86 |
# File 'lib/barebones/generators/app_generator.rb', line 84 def setup_development_environment build :raise_on_delivery_errors end |
#setup_environments ⇒ Object
77 78 79 80 81 82 |
# File 'lib/barebones/generators/app_generator.rb', line 77 def setup_environments say "Setting up environments..." invoke :setup_development_environment invoke :setup_staging_environment invoke :setup_production_environment end |
#setup_factory_girl ⇒ Object
103 104 105 106 107 108 |
# File 'lib/barebones/generators/app_generator.rb', line 103 def setup_factory_girl unless [:skip_factory_girl] say "Setting up FactoryGirl gem..." build :configure_factory_girl end end |
#setup_gems ⇒ Object
95 96 97 98 99 100 101 |
# File 'lib/barebones/generators/app_generator.rb', line 95 def setup_gems invoke :setup_minitest invoke :setup_factory_girl invoke :setup_resque invoke :setup_sidekiq invoke :setup_carrierwave end |
#setup_minitest ⇒ Object
110 111 112 113 114 115 |
# File 'lib/barebones/generators/app_generator.rb', line 110 def setup_minitest unless [:skip_minitest] say "Setting up Minitest gem..." build :configure_minitest end end |
#setup_production_environment ⇒ Object
92 93 |
# File 'lib/barebones/generators/app_generator.rb', line 92 def setup_production_environment end |
#setup_puma ⇒ Object
145 146 147 148 |
# File 'lib/barebones/generators/app_generator.rb', line 145 def setup_puma say "Setting up Puma..." build :configure_puma end |
#setup_resque ⇒ Object
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/barebones/generators/app_generator.rb', line 117 def setup_resque unless [:skip_resque] say "Setting up Resque/Redis gems..." build :configure_active_job_for_resque build :configure_redis build :configure_resque build :create_test_job build :create_resque_rake_task end end |
#setup_routes ⇒ Object
56 57 58 59 |
# File 'lib/barebones/generators/app_generator.rb', line 56 def setup_routes say "Setting up custom routes..." build :customize_routes end |
#setup_ruby ⇒ Object
40 41 42 43 44 |
# File 'lib/barebones/generators/app_generator.rb', line 40 def setup_ruby say "Setting ruby version..." build :set_ruby_version build :set_gemset end |
#setup_secrets ⇒ Object
72 73 74 75 |
# File 'lib/barebones/generators/app_generator.rb', line 72 def setup_secrets say "Setting up secrets..." build :customize_secrets end |
#setup_sidekiq ⇒ Object
128 129 130 131 132 133 134 135 136 |
# File 'lib/barebones/generators/app_generator.rb', line 128 def setup_sidekiq unless [:skip_sidekiq] say "Setting up Sidekiq/Redis gems..." build :configure_active_job_for_sidekiq build :configure_redis build :configure_sidekiq build :create_test_job end end |
#setup_staging_environment ⇒ Object
88 89 90 |
# File 'lib/barebones/generators/app_generator.rb', line 88 def setup_staging_environment build :create_staging_environment end |
#setup_webserver ⇒ Object
51 52 53 54 |
# File 'lib/barebones/generators/app_generator.rb', line 51 def setup_webserver say "Setting up webserver..." invoke :setup_puma end |