From 7d213829038c54de732478417a37a4081774fe01 Mon Sep 17 00:00:00 2001 From: cmar Date: Thu, 19 Jan 2012 09:21:14 -0500 Subject: [PATCH] fixed issue with db bootstrap running twice. reduce noise with install_generator [fixes #977] --- Rakefile | 3 +-- core/lib/generators/spree/install/install_generator.rb | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 985ea2d6402..e69a8c7c20c 100644 --- a/Rakefile +++ b/Rakefile @@ -114,8 +114,7 @@ task :sandbox do require 'spree_core' Spree::SandboxGenerator.start ["--lib_name=spree", "--database=#{ENV['DB_NAME']}"] - Spree::InstallGenerator.start ["--auto-accept", "--test_app", "--skip-install-data"] + Spree::InstallGenerator.start ["--auto-accept"] - cmd = "bundle exec rake db:bootstrap AUTO_ACCEPT=true"; puts cmd; system cmd cmd = "bundle exec rake assets:precompile:nondigest"; puts cmd; system cmd end diff --git a/core/lib/generators/spree/install/install_generator.rb b/core/lib/generators/spree/install/install_generator.rb index 703d69e74a3..601f1428f9d 100644 --- a/core/lib/generators/spree/install/install_generator.rb +++ b/core/lib/generators/spree/install/install_generator.rb @@ -115,7 +115,7 @@ def install_migrations def run_migrations if @run_migrations say_status :running, "migrations" - rake('db:migrate') + quietly { rake 'db:migrate' } else say_status :skipping, "migrations (don't forget to run rake db:migrate)" end @@ -135,7 +135,7 @@ def populate_seed_data def load_sample_data if @load_sample_data say_status :loading, "sample data" - rake('spree_sample:load') + quietly { rake 'spree_sample:load' } else say_status :skipping, "sample data (you can always run rake spree_sample:load)" end