16 lines
616 B
Ruby
16 lines
616 B
Ruby
namespace :test do
|
|
desc 'Seed test users (Barong + Peatio balances) for local/test environments'
|
|
task seed: :environment do
|
|
if ENV.fetch('FIBITEX_SEED_TEST_USERS', 'true') == 'false'
|
|
puts 'SKIP test:seed (FIBITEX_SEED_TEST_USERS=false)'
|
|
next
|
|
end
|
|
|
|
puts '----- Seeding test users (Barong) -----'
|
|
sh 'docker-compose run --rm barong bash -c "bundle exec rails runner ./lib/seed_test_users.rb"'
|
|
|
|
puts '----- Seeding test balances (Peatio) -----'
|
|
sh 'docker-compose run --rm peatio bash -c "ruby ./bin/link_config && bundle exec rails runner ./lib/seed_test_balances.rb"'
|
|
end
|
|
end
|