class Shoelaces::AppGenerator
Public Instance Methods
configure_app()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 142 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 build :setup_guard build :generate_simple_form build :use_high_voltage_config_template end
copy_miscellaneous_files()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 200 def copy_miscellaneous_files say 'Copying miscellaneous support files' build :copy_miscellaneous_files end
create_github_repo()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 180 def create_github_repo if !options[:skip_git] && options[:github] say 'Creating Github repo' build :create_github_repo, options[:github] end end
create_heroku_apps()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 171 def create_heroku_apps if options[:heroku] say 'Creating Heroku apps' build :create_heroku_apps build :set_heroku_remotes build :set_heroku_rails_secrets end end
create_image_assets()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 126 def create_image_assets say 'Creating image assets' build :add_images end
create_shoelaces_views()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 119 def create_shoelaces_views say 'Creating shoelaces views' build :create_partials_directory build :create_shared_flashes build :create_application_layout end
create_static_pages()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 131 def create_static_pages say 'Creating static pages' build :add_static_pages end
customize_error_pages()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 205 def customize_error_pages say 'Customizing the 500/404/422 pages' build :customize_error_pages end
customize_gemfile()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 57 def customize_gemfile build :replace_gemfile build :set_ruby_to_version_being_used if options[:heroku] build :setup_heroku_specific_gems end bundle_command 'install' end
finish_template()
click to toggle source
Calls superclass method
# File lib/shoelaces/generators/app_generator.rb, line 21 def finish_template invoke :shoelaces_customization super end
init_git()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 196 def init_git build :init_git end
outro()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 214 def outro say 'Congratulations! You just pulled our shoelaces.' say "Remember to run 'rails generate airbrake' with your API key." end
remove_routes_comment_lines()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 210 def remove_routes_comment_lines build :remove_routes_comment_lines end
run_bundle()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 219 def run_bundle # Let's not: We'll bundle manually at the right spot end
set_custom_port_number()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 51 def set_custom_port_number if options[:port] get_builder_class.set_port_number(options[:port].to_i) end end
setup_coffeescript()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 136 def setup_coffeescript say 'Setting up CoffeeScript defaults' build :remove_turbolinks build :setup_bootstrap_javascript end
setup_database()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 68 def setup_database say 'Setting up database' if 'postgresql' == options[:database] build :use_postgres_config_template end build :create_database end
setup_development_environment()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 78 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 :provide_dev_prime_task build :configure_generators build :configure_i18n_for_development_environment end
setup_git()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 163 def setup_git if !options[:skip_git] say 'Initializing git' invoke :setup_gitignore invoke :init_git end end
setup_gitignore()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 192 def setup_gitignore build :gitignore_files end
setup_production_environment()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 101 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()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 114 def setup_secret_token say 'Moving secret token out of version control' build :setup_secret_token end
setup_segment_io()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 187 def setup_segment_io say 'Setting up Segment.io' build :setup_segment_io end
setup_staging_environment()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 109 def setup_staging_environment say 'Setting up the staging environment' build :setup_staging_environment end
setup_stylesheets()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 158 def setup_stylesheets say 'Set up stylesheets' build :setup_stylesheets end
setup_test_environment()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 88 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_for_rspec build :enable_database_cleaner build :configure_spec_support_features build :configure_travis build :configure_i18n_for_test_environment build :configure_action_mailer_in_specs end
shoelaces_customization()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 26 def shoelaces_customization invoke :set_custom_port_number 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_shoelaces_views invoke :create_image_assets invoke :create_static_pages invoke :setup_coffeescript invoke :configure_app invoke :setup_stylesheets invoke :copy_miscellaneous_files invoke :customize_error_pages invoke :remove_routes_comment_lines invoke :setup_git invoke :setup_database invoke :create_heroku_apps invoke :create_github_repo invoke :setup_segment_io invoke :outro end
Protected Instance Methods
get_builder_class()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 225 def get_builder_class Shoelaces::AppBuilder end
using_active_record?()
click to toggle source
# File lib/shoelaces/generators/app_generator.rb, line 229 def using_active_record? !options[:skip_active_record] end