diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-08-20 15:58:11 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-08-20 15:58:11 +0100 |
commit | ce30500cea5c2d6304643bc90ce0c5b36a2f5919 (patch) | |
tree | 92ef48879721d017e7b72e663ef8dbc3d6421fb0 /script/load-sample-data | |
parent | f757ce4ba02c6621e04a349376aeda1c1cb553a3 (diff) | |
parent | dfb5f97ac44656f0e021b09856e0c54b9fa41b3f (diff) |
Merge branch 'release/0.13'0.13
Conflicts:
locale/bg/app.po
locale/es/app.po
locale/fi/app.po
locale/fr/app.po
locale/fr_CA/app.po
locale/he_IL/app.po
locale/hr/app.po
locale/nb_NO/app.po
locale/nl/app.po
locale/pt_BR/app.po
locale/ro_RO/app.po
locale/sl/app.po
locale/vi/app.po
script/rails-post-deploy
Diffstat (limited to 'script/load-sample-data')
-rwxr-xr-x | script/load-sample-data | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/script/load-sample-data b/script/load-sample-data index e91516886..c9e5997f5 100755 --- a/script/load-sample-data +++ b/script/load-sample-data @@ -5,22 +5,20 @@ # have a filesystem representation of their contents export LOC=`dirname "$0"` - bundle exec rails runner /dev/stdin <<END require 'rspec/rails' -require "#{ENV['LOC']}/../spec/support/load_file_fixtures.rb" -require "#{ENV['LOC']}/../spec/support/email_helpers.rb" +require Rails.root.join("spec", "support", "load_file_fixtures") +require Rails.root.join("spec", "support", "email_helpers") RSpec.configure do |config| - config.fixture_path = "#{::Rails.root}/spec/fixtures" + config.fixture_path = Rails.root.join("spec","fixtures") end # HACK: Normally to load fixtures you'd run `rake db:fixtures:load` but since we # have .csv files in the fixtures folder Rails tries to load those too. Therefore # we've pinched some code to load the fixtures: # https://github.com/rails/rails/blob/v3.1.11/activerecord/lib/active_record/railties/databases.rake#L311 -fixtures_dir = "#{ENV['LOC']}/../spec/fixtures" - +fixtures_dir = Rails.root.join("spec","fixtures").to_s Dir["#{fixtures_dir}/**/*.yml"].each do |fixture_file| ActiveRecord::Fixtures.create_fixtures(fixtures_dir, fixture_file[(fixtures_dir.size + 1)..-5]) end |