Class: Spud::SetupGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Spud::SetupGenerator
- Defined in:
- lib/generators/spud/setup_generator.rb
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/spud/setup_generator.rb', line 5 def setup if ask( 'NOTICE: Setup will now attempt to delete and/or overwrite existing files. Continue?', limited_to: ['y', 'n'] ) == 'n' return end install_templates() install_bootstrap() if defined?(Bootstrap) environment(spud_core_configs()) rake('railties:install:migrations') rake('db:migrate') if ask('Migrate the database?', limited_to: ['y', 'n']).downcase == 'y' end |