Class: Jetfuel::AppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Jetfuel::AppGenerator
- Defined in:
- lib/jetfuel/generators/app_generator.rb
Instance Method Summary collapse
- #add_sidekiq_web_routes ⇒ Object
- #configure_app ⇒ Object
- #copy_miscellaneous_files ⇒ Object
- #create_github_repo ⇒ Object
- #create_heroku_apps ⇒ Object
- #create_suspenders_views ⇒ Object
- #customize_error_pages ⇒ Object
- #customize_gemfile ⇒ Object
- #finish_template ⇒ Object
- #init_git ⇒ Object
- #install_capistrano ⇒ Object
- #install_leather ⇒ Object
- #outro ⇒ Object
- #remove_routes_comment_lines ⇒ Object
- #run_bundle ⇒ Object
- #setup_coffeescript ⇒ Object
- #setup_database ⇒ Object
- #setup_development_environment ⇒ Object
- #setup_devise ⇒ Object
- #setup_git ⇒ Object
- #setup_gitignore ⇒ Object
- #setup_helpers ⇒ Object
- #setup_production_environment ⇒ Object
- #setup_secret_token ⇒ Object
- #setup_segment_io ⇒ Object
- #setup_staging_environment ⇒ Object
- #setup_stylesheets ⇒ Object
- #setup_test_environment ⇒ Object
- #suspenders_customization ⇒ Object
Instance Method Details
#add_sidekiq_web_routes ⇒ Object
225 226 227 |
# File 'lib/jetfuel/generators/app_generator.rb', line 225 def add_sidekiq_web_routes build :add_sidekiq_web_routes end |
#configure_app ⇒ Object
139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/jetfuel/generators/app_generator.rb', line 139 def configure_app say 'Configuring app' build :configure_action_mailer build :configure_time_zone build :configure_time_formats build :configure_rack_timeout build :disable_xml_params build :fix_i18n_deprecation_warning build :setup_default_rake_task build :configure_unicorn build :setup_foreman end |
#copy_miscellaneous_files ⇒ Object
211 212 213 214 |
# File 'lib/jetfuel/generators/app_generator.rb', line 211 def copy_miscellaneous_files say 'Copying miscellaneous support files' build :copy_miscellaneous_files end |
#create_github_repo ⇒ Object
191 192 193 194 195 196 |
# File 'lib/jetfuel/generators/app_generator.rb', line 191 def create_github_repo if ![:skip_git] && [:github] say 'Creating Github repo' build :create_github_repo, [:github] end end |
#create_heroku_apps ⇒ Object
175 176 177 178 179 180 181 182 |
# File 'lib/jetfuel/generators/app_generator.rb', line 175 def create_heroku_apps if [:heroku] say 'Creating Heroku apps' build :create_heroku_apps build :set_heroku_remotes build :set_heroku_rails_secrets end end |
#create_suspenders_views ⇒ Object
125 126 127 128 129 130 131 |
# File 'lib/jetfuel/generators/app_generator.rb', line 125 def create_suspenders_views say 'Creating suspenders views' build :create_partials_directory build :create_shared_flashes build :create_shared_javascripts build :create_application_layout end |
#customize_error_pages ⇒ Object
216 217 218 219 |
# File 'lib/jetfuel/generators/app_generator.rb', line 216 def customize_error_pages say 'Customizing the 500/404/422 pages' build :customize_error_pages end |
#customize_gemfile ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/jetfuel/generators/app_generator.rb', line 53 def customize_gemfile build :replace_gemfile build :set_ruby_to_version_being_used if [:heroku] build :setup_heroku_specific_gems end if [:capistrano] build :setup_capistrano_specific_gems end bundle_command 'install' end |
#finish_template ⇒ Object
21 22 23 24 |
# File 'lib/jetfuel/generators/app_generator.rb', line 21 def finish_template invoke :suspenders_customization super end |
#init_git ⇒ Object
207 208 209 |
# File 'lib/jetfuel/generators/app_generator.rb', line 207 def init_git build :init_git end |
#install_capistrano ⇒ Object
184 185 186 187 188 189 |
# File 'lib/jetfuel/generators/app_generator.rb', line 184 def install_capistrano if [:capistrano] say 'Installing capistrano' build :copy_capistrano_configuration_files end end |
#install_leather ⇒ Object
162 163 164 165 |
# File 'lib/jetfuel/generators/app_generator.rb', line 162 def install_leather say 'Install Leather' build :install_leather end |
#outro ⇒ Object
229 230 231 232 |
# File 'lib/jetfuel/generators/app_generator.rb', line 229 def outro say 'Congratulations! You are all fueled up.' say "Remember to run 'rails generate airbrake' with your API key." end |
#remove_routes_comment_lines ⇒ Object
221 222 223 |
# File 'lib/jetfuel/generators/app_generator.rb', line 221 def remove_routes_comment_lines build :remove_routes_comment_lines end |
#run_bundle ⇒ Object
234 235 236 |
# File 'lib/jetfuel/generators/app_generator.rb', line 234 def run_bundle # Let's not: We'll bundle manually at the right spot end |
#setup_coffeescript ⇒ Object
133 134 135 136 137 |
# File 'lib/jetfuel/generators/app_generator.rb', line 133 def setup_coffeescript say 'Setting up CoffeeScript defaults' build :remove_turbolinks build :add_bootstrap_js end |
#setup_database ⇒ Object
74 75 76 77 78 79 80 81 82 |
# File 'lib/jetfuel/generators/app_generator.rb', line 74 def setup_database say 'Setting up database' if 'postgresql' == [:database] build :use_postgres_config_template end build :create_database end |
#setup_development_environment ⇒ Object
84 85 86 87 88 89 90 |
# File 'lib/jetfuel/generators/app_generator.rb', line 84 def setup_development_environment say 'Setting up the development environment' build :raise_on_delivery_errors build :raise_on_unpermitted_parameters build :provide_setup_script build :configure_generators end |
#setup_devise ⇒ Object
68 69 70 71 72 |
# File 'lib/jetfuel/generators/app_generator.rb', line 68 def setup_devise say 'Install Devise' build :install_devise build :create_devise_user end |
#setup_git ⇒ Object
167 168 169 170 171 172 173 |
# File 'lib/jetfuel/generators/app_generator.rb', line 167 def setup_git if ![:skip_git] say 'Initializing git' invoke :setup_gitignore invoke :init_git end end |
#setup_gitignore ⇒ Object
203 204 205 |
# File 'lib/jetfuel/generators/app_generator.rb', line 203 def setup_gitignore build :gitignore_files end |
#setup_helpers ⇒ Object
157 158 159 160 |
# File 'lib/jetfuel/generators/app_generator.rb', line 157 def setup_helpers say 'Set up helpers' build :setup_helpers end |
#setup_production_environment ⇒ Object
107 108 109 110 111 112 113 |
# File 'lib/jetfuel/generators/app_generator.rb', line 107 def setup_production_environment say 'Setting up the production environment' build :configure_newrelic build :configure_smtp build :enable_rack_deflater build :setup_asset_host end |
#setup_secret_token ⇒ Object
120 121 122 123 |
# File 'lib/jetfuel/generators/app_generator.rb', line 120 def setup_secret_token say 'Moving secret token out of version control' build :setup_secret_token end |
#setup_segment_io ⇒ Object
198 199 200 201 |
# File 'lib/jetfuel/generators/app_generator.rb', line 198 def setup_segment_io say 'Setting up Segment.io' build :setup_segment_io end |
#setup_staging_environment ⇒ Object
115 116 117 118 |
# File 'lib/jetfuel/generators/app_generator.rb', line 115 def setup_staging_environment say 'Setting up the staging environment' build :setup_staging_environment end |
#setup_stylesheets ⇒ Object
152 153 154 155 |
# File 'lib/jetfuel/generators/app_generator.rb', line 152 def setup_stylesheets say 'Set up stylesheets' build :setup_stylesheets end |
#setup_test_environment ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/jetfuel/generators/app_generator.rb', line 92 def setup_test_environment say 'Setting up the test environment' build :set_up_factory_girl_for_rspec build :generate_rspec build :configure_rspec build :configure_background_jobs build :enable_database_cleaner build :configure_spec_support_features build :configure_travis build :configure_i18n_in_specs build :configure_action_mailer_in_specs build :setup_guard build :configure_poltergeist end |
#suspenders_customization ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/jetfuel/generators/app_generator.rb', line 26 def suspenders_customization invoke :customize_gemfile invoke :setup_development_environment invoke :setup_test_environment invoke :setup_production_environment invoke :setup_staging_environment invoke :setup_secret_token invoke :create_suspenders_views invoke :setup_coffeescript invoke :configure_app invoke :setup_stylesheets invoke :setup_helpers invoke :copy_miscellaneous_files invoke :customize_error_pages invoke :remove_routes_comment_lines invoke :add_sidekiq_web_routes invoke :setup_git invoke :setup_database invoke :create_heroku_apps invoke :install_capistrano invoke :create_github_repo invoke :setup_segment_io invoke :install_leather invoke :setup_devise invoke :outro end |