Permalink
Browse files

Set up database before setting up RSpec

Fixes #169
  • Loading branch information...
1 parent d46626e commit 969dbd91a6bfd51b9c1ab5cfe54827cc242bf9d6 @croaky croaky committed Apr 12, 2013
Showing with 17 additions and 17 deletions.
  1. +17 −17 lib/suspenders/generators/app_generator.rb
@@ -23,14 +23,14 @@ def finish_template
def suspenders_customization
invoke :remove_files_we_dont_need
invoke :customize_gemfile
+ invoke :setup_database
invoke :setup_development_environment
invoke :setup_test_environment
invoke :setup_production_environment
invoke :setup_staging_environment
invoke :create_suspenders_views
invoke :create_common_javascripts
invoke :add_jquery_ui
- invoke :setup_database
invoke :configure_app
invoke :setup_stylesheets
invoke :copy_miscellaneous_files
@@ -47,6 +47,22 @@ def remove_files_we_dont_need
build :remove_rails_logo_image
end
+ def customize_gemfile
+ build :replace_gemfile
+ build :set_ruby_to_version_being_used
+ bundle_command 'install --binstubs=bin/stubs'
+ end
+
+ def setup_database
+ say 'Setting up database'
+
+ if 'postgresql' == options[:database]
+ build :use_postgres_config_template
+ end
+
+ build :create_database
+ end
+
def setup_development_environment
say 'Setting up the development environment'
build :raise_delivery_errors
@@ -93,22 +109,6 @@ def add_jquery_ui
build :add_jquery_ui
end
- def customize_gemfile
- build :replace_gemfile
- build :set_ruby_to_version_being_used
- bundle_command 'install --binstubs=bin/stubs'
- end
-
- def setup_database
- say 'Setting up database'
-
- if 'postgresql' == options[:database]
- build :use_postgres_config_template
- end
-
- build :create_database
- end
-
def configure_app
say 'Configuring app'
build :configure_action_mailer

0 comments on commit 969dbd9

Please sign in to comment.