diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-26 10:20:18 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-26 10:20:18 +0000 |
commit | bbbfd5c9741b998808458e0c80843549b68f4b79 (patch) | |
tree | 2c4ae679dd5e622a592de48b7ccf5fc3208241b1 /script/load-sample-data | |
parent | 4853aef253dd94a8d1f731910a2fb8a93ce76773 (diff) | |
parent | b5354e661bd740e482cd3090876f9bd34164dcf3 (diff) |
Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtk
Diffstat (limited to 'script/load-sample-data')
-rwxr-xr-x | script/load-sample-data | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/script/load-sample-data b/script/load-sample-data index 0521ef849..84b8a28eb 100755 --- a/script/load-sample-data +++ b/script/load-sample-data @@ -6,7 +6,15 @@ LOC=`dirname $0` rake --silent spec:db:fixtures:load -"$LOC/runner" 'puts File.expand_path(File.dirname(__FILE__) + "/spec/spec_helper"); require File.expand_path(File.dirname(__FILE__) + "/spec/spec_helper"); RawEmail.all().each {|email| email.data = load_file_fixture("useless_raw_email.email")}' +"$LOC/runner" /dev/stdin <<END +env = ENV["RAILS_ENV"] +require "spec/spec_helper.rb" # Sets RAILS_ENV to 'test' +ENV["RAILS_ENV"] = env +RawEmail.all().each do |email| + puts "Writing #{email.filepath}" + email.data = load_file_fixture("useless_raw_email.email") +end +END -echo "Loaded fixtures."
\ No newline at end of file +echo "Loaded fixtures." |