Class: Startblock::AppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Startblock::AppGenerator
- Defined in:
- lib/startblock/generators/app_generator.rb
Instance Method Summary collapse
- #configure_app ⇒ Object
- #create_startblock_views ⇒ Object
- #customize_gemfile ⇒ Object
- #finish_template ⇒ Object
- #outro ⇒ Object
- #remove_routes_comment_lines ⇒ Object
- #run_bundle ⇒ Object
- #setup_database ⇒ Object
- #setup_development_environment ⇒ Object
- #setup_git ⇒ Object
- #setup_javascripts ⇒ Object
- #setup_mixpanel ⇒ Object
- #setup_puma ⇒ Object
- #setup_rubocop ⇒ Object
- #setup_secret_token ⇒ Object
- #setup_staging_environment ⇒ Object
- #setup_stylesheets ⇒ Object
- #setup_testing_environment ⇒ Object
- #startblock_customization ⇒ Object
Instance Method Details
#configure_app ⇒ Object
77 78 79 80 81 |
# File 'lib/startblock/generators/app_generator.rb', line 77 def configure_app say 'Configuring app' build :configure_action_mailer build :setup_foreman end |
#create_startblock_views ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/startblock/generators/app_generator.rb', line 69 def create_startblock_views say 'Creating Startblock views' build :create_partials_directory build :create_shared_flashes build :create_shared_javascripts build :create_application_layout end |
#customize_gemfile ⇒ Object
39 40 41 42 43 44 |
# File 'lib/startblock/generators/app_generator.rb', line 39 def customize_gemfile build :replace_gemfile build :set_ruby_to_version_being_used bundle_command 'install' end |
#finish_template ⇒ Object
15 16 17 18 |
# File 'lib/startblock/generators/app_generator.rb', line 15 def finish_template invoke :startblock_customization super end |
#outro ⇒ Object
128 129 130 |
# File 'lib/startblock/generators/app_generator.rb', line 128 def outro say 'Congratulations! You just entered our startblock.' end |
#remove_routes_comment_lines ⇒ Object
93 94 95 |
# File 'lib/startblock/generators/app_generator.rb', line 93 def remove_routes_comment_lines build :remove_routes_comment_lines end |
#run_bundle ⇒ Object
132 133 134 |
# File 'lib/startblock/generators/app_generator.rb', line 132 def run_bundle # Let's not: We'll bundle manually at the right spot end |
#setup_database ⇒ Object
108 109 110 111 112 113 114 115 116 |
# File 'lib/startblock/generators/app_generator.rb', line 108 def setup_database say 'Setting up database' if 'postgresql' == [:database] build :use_postgres_config_template end build :create_database end |
#setup_development_environment ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/startblock/generators/app_generator.rb', line 46 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_i18n_for_missing_translations end |
#setup_git ⇒ Object
102 103 104 105 106 |
# File 'lib/startblock/generators/app_generator.rb', line 102 def setup_git say 'Initializing git' build :gitignore_files build :init_git end |
#setup_javascripts ⇒ Object
88 89 90 91 |
# File 'lib/startblock/generators/app_generator.rb', line 88 def setup_javascripts say "Set up javascripts" build :setup_javascripts end |
#setup_mixpanel ⇒ Object
118 119 120 121 |
# File 'lib/startblock/generators/app_generator.rb', line 118 def setup_mixpanel say 'Setting up Mixpanel' build :setup_mixpanel end |
#setup_puma ⇒ Object
97 98 99 100 |
# File 'lib/startblock/generators/app_generator.rb', line 97 def setup_puma say 'Setting up puma' build :copy_puma_config end |
#setup_rubocop ⇒ Object
123 124 125 126 |
# File 'lib/startblock/generators/app_generator.rb', line 123 def setup_rubocop say "Setting up Rubocop" build :setup_rubocop end |
#setup_secret_token ⇒ Object
64 65 66 67 |
# File 'lib/startblock/generators/app_generator.rb', line 64 def setup_secret_token say 'Moving secret token out of version control' build :setup_secret_token end |
#setup_staging_environment ⇒ Object
59 60 61 62 |
# File 'lib/startblock/generators/app_generator.rb', line 59 def setup_staging_environment say 'Setting up the staging environment' build :setup_staging_environment end |
#setup_stylesheets ⇒ Object
83 84 85 86 |
# File 'lib/startblock/generators/app_generator.rb', line 83 def setup_stylesheets say 'Set up stylesheets' build :setup_stylesheets end |
#setup_testing_environment ⇒ Object
54 55 56 57 |
# File 'lib/startblock/generators/app_generator.rb', line 54 def setup_testing_environment say "Setting up the testing environment" build :configuring_test_helper end |
#startblock_customization ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/startblock/generators/app_generator.rb', line 20 def startblock_customization invoke :customize_gemfile invoke :setup_development_environment invoke :setup_testing_environment invoke :setup_staging_environment invoke :setup_secret_token invoke :create_startblock_views invoke :configure_app invoke :setup_stylesheets invoke :setup_javascripts invoke :remove_routes_comment_lines invoke :setup_puma invoke :setup_git invoke :setup_database invoke :setup_mixpanel invoke :setup_rubocop invoke :outro end |