diff --git a/lib/tasks/seed_fu_capistrano3.rake b/lib/tasks/seed_fu_capistrano3.rake index 90d4e02..6515aff 100644 --- a/lib/tasks/seed_fu_capistrano3.rake +++ b/lib/tasks/seed_fu_capistrano3.rake @@ -1,10 +1,14 @@ namespace :db do desc 'Load seed data into database' - task :seed_fu do + task :seed_fu do |_, args| on roles(:db) do within release_path do with rails_env: fetch(:rails_env) do - execute :bundle, :exec, :rake, 'db:seed_fu' + args = [] + %w(FIXTURE_PATH FILTER).each do |key| + args << "#{key}=#{ENV[key]}" if ENV.include? key + end + execute :bundle, :exec, :rake, 'db:seed_fu', args end end end