summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-06-30 11:09:21 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-06-30 11:09:21 -0400
commit6050bd37b062f98e2a66b7d77a4781bc0cca598f (patch)
tree4c8396fa37b905d6c0997d72a4d5f406ad81c1c3
parent8f8345dd63c60ec0684176f00e07d66e160cf857 (diff)
cleanup seeds stuff for scripting
-rwxr-xr-xbin/devel/db-drop3
-rw-r--r--db/seeds.rb2
2 files changed, 2 insertions, 3 deletions
diff --git a/bin/devel/db-drop b/bin/devel/db-drop
index 40c2b4c..06e24dc 100755
--- a/bin/devel/db-drop
+++ b/bin/devel/db-drop
@@ -4,5 +4,4 @@ PATH=$bindir:$PATH
set -e
rake db:drop
-rake db:migrate
-rake db:seed
+rake db:setup
diff --git a/db/seeds.rb b/db/seeds.rb
index adc740f..869aa86 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -24,7 +24,7 @@ rockpaperscissors.settings.create!(display_order: 4, name: "lizard_spock_allowed
rockpaperscissors.settings.create!(display_order: 5, name: "favorite_object" , description: "What is your favorite object in RPS?", vartype: GameSetting::types[:pick_one_radio], type_opt: "rock,paper,scissors", default: "rock")
rockpaperscissors.settings.create!(display_order: 6, name: "check_boxes" , description: "Example boxes" , vartype: GameSetting::types[:pick_several] , type_opt: "i_do_not_know,there_is_now_spoon,wow,because_electricity,wat?", default: "wow,wat?")
-if Rails.env.development?
+if Rails.env.development? or (ENV['FORCE_SEED'] and not ENV['FORCE_SEED'].empty?)
# User 1, the ADMIN
admin = User.create!(name: "Administrator", user_name: "admin", email: "root@localhost.lan", password: "password", permissions: 0xFFFFFFFF)