Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling via capistrano3 should support FIXTURE_PATH & FILTER variables #109

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/tasks/seed_fu_capistrano3.rake
Original file line number Diff line number Diff line change
@@ -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
Expand Down