blob: ccea36b93f4995053c5e5eda2de573acb432f8db (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# :mode=ruby:
namespace :deploy do
desc 'Configure Puma'
task :configure_puma do
target_file = File.join(shared_path, 'config', 'puma.rb')
on roles(:app) do
unless test "[ -f #{target_file} ]"
template = ERB.new(IO.read(File.join(Dir.pwd, 'config', 'deploy', 'templates', 'puma.rb.erb')))
upload!(StringIO.new(template.result(binding)), target_file)
end
end
end
before 'deploy:finishing', 'deploy:generate_secret_token'
end
|