Created
June 3, 2015 03:51
-
-
Save garin/f93aa66f465faaf35767 to your computer and use it in GitHub Desktop.
lib/capistrano/tasks/fixturesload.rake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# require capistrano/rails | |
# https://github.com/capistrano/rails | |
# | |
# fixtures:load | |
namespace :deploy do | |
desc 'Runs rake db:fixtures:load (original)' | |
task :fixtures => [:set_rails_env] do | |
on primary fetch(:fixtures_role) do | |
info '[deploy:migrate] Run `rake db:fixtures:load`' | |
within release_path do | |
with rails_env: fetch(:rails_env) do | |
execute :rake, "db:fixtures:load" | |
end | |
end | |
end | |
end | |
after 'deploy:updated', 'deploy:migrate' | |
end | |
namespace :load do | |
task :defaults do | |
set :fixtures_role, fetch(:fixtures_role, :db) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment