aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/load-sample-data10
-rwxr-xr-xscript/rails-post-deploy4
2 files changed, 6 insertions, 8 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
diff --git a/script/rails-post-deploy b/script/rails-post-deploy
index a3257cf35..6eca2f68f 100755
--- a/script/rails-post-deploy
+++ b/script/rails-post-deploy
@@ -91,9 +91,9 @@ then
fi
bundle install $bundle_install_options
-bundle exec rake themes:install
+bundle exec rake submodules:check
# upgrade database
bundle exec rake db:migrate #--trace
-
+bundle exec rake themes:install