Skip to content
Browse files

Updated config to include seeds

  • Loading branch information...
1 parent 60e177d commit 25f9f6afabd38a12369ac40c38860a31d3856a84 @mrako committed Jul 1, 2014
Showing with 14 additions and 1 deletion.
  1. +6 −1 lib/generators/templates/config/robot.yml
  2. +8 −0 lib/tasks/robotframework.rake
View
7 lib/generators/templates/config/robot.yml
@@ -1,7 +1,12 @@
env: "test"
+seeds:
+ dirs: "mkdir -p robot/seeds"
+ db: "mysqldump -u root <dev db name> | gzip > robot/seeds/database_seeds.sql.gz"
+ solr: "tar cfz robot/seeds/solr_data.tgz solr/data/development/*"
+
prepare:
- db: "gunzip < robot/seeds/database_seeds.sql.gz | mysql -u root trail_test"
+ db: "gunzip < robot/seeds/database_seeds.sql.gz | mysql -u root <test db name>"
solr: "mkdir -p solr/data/test && tar xfz robot/seeds/solr_data.tgz -C solr/data/test"
setup:
View
8 lib/tasks/robotframework.rake
@@ -46,6 +46,14 @@ $port = $config['port'] || 3333
namespace :robot do
+ desc "Create seeds"
+ task :create_seeds do
+ $config['seeds'].each{ |k, v|
+ puts "Creating #{k} seeds"
+ sh "#{v}"
+ }
+ end
+
desc "Prepare"
task :prepare do
$config['prepare'].each{ |k, v|

0 comments on commit 25f9f6a

Please sign in to comment.
Something went wrong with that request. Please try again.