mirror of https://github.com/rails/rails
28 lines
696 B
Ruby
28 lines
696 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "bundler/setup"
|
|
require "bundler/gem_tasks"
|
|
require "rake/testtask"
|
|
|
|
Rake::TestTask.new do |t|
|
|
t.libs << "app/controllers"
|
|
t.libs << "test"
|
|
t.test_files = FileList["test/**/*_test.rb"]
|
|
t.verbose = true
|
|
t.warning = true
|
|
end
|
|
|
|
if ENV["encrypted_0fb9444d0374_key"] && ENV["encrypted_0fb9444d0374_iv"]
|
|
config_file = "test/service/configurations.yml"
|
|
file config_file do
|
|
puts "Generating #{config_file} for Active Storage tests..."
|
|
system "openssl aes-256-cbc -K $encrypted_0fb9444d0374_key -iv $encrypted_0fb9444d0374_iv -in #{config_file}.enc -out #{config_file} -d"
|
|
end
|
|
|
|
task test: config_file
|
|
end
|
|
|
|
task :package
|
|
|
|
task default: :test
|