From 404da8129f1771ae062a9d878334061b6f9a8f4c Mon Sep 17 00:00:00 2001 From: Michele Franzin Date: Fri, 22 Jul 2016 11:22:31 +0200 Subject: [PATCH] calling via capistrano3 should support FIXTURE_PATH & FILTER variables --- lib/tasks/seed_fu_capistrano3.rake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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