lib/capistrano/puma.rb in capistrano3-puma-3.0.3 vs lib/capistrano/puma.rb in capistrano3-puma-3.1.0
- old
+ new
@@ -40,10 +40,11 @@
"lib/capistrano/templates/#{from}.erb",
"config/deploy/templates/#{from}.rb.erb",
"config/deploy/templates/#{from}.rb",
"config/deploy/templates/#{from}.erb",
File.expand_path("../templates/#{from}.erb", __FILE__),
+ File.expand_path("../templates/#{from}.rb.erb", __FILE__)
].detect { |path| File.file?(path) }
erb = File.read(file)
backend.upload! StringIO.new(ERB.new(erb, nil, '-').result(binding)), to
end
end
@@ -64,17 +65,19 @@
set_if_empty :puma_workers, 0
set_if_empty :puma_rackup, -> { File.join(current_path, 'config.ru') }
set_if_empty :puma_state, -> { File.join(shared_path, 'tmp', 'pids', 'puma.state') }
set_if_empty :puma_pid, -> { File.join(shared_path, 'tmp', 'pids', 'puma.pid') }
set_if_empty :puma_bind, -> { File.join("unix://#{shared_path}", 'tmp', 'sockets', 'puma.sock') }
+ set_if_empty :puma_control_app, false
set_if_empty :puma_default_control_app, -> { File.join("unix://#{shared_path}", 'tmp', 'sockets', 'pumactl.sock') }
set_if_empty :puma_conf, -> { File.join(shared_path, 'puma.rb') }
set_if_empty :puma_access_log, -> { File.join(shared_path, 'log', 'puma_access.log') }
set_if_empty :puma_error_log, -> { File.join(shared_path, 'log', 'puma_error.log') }
set_if_empty :puma_init_active_record, false
set_if_empty :puma_preload_app, false
set_if_empty :puma_daemonize, false
+ set_if_empty :puma_tag, ''
# Chruby, Rbenv and RVM integration
append :chruby_map_bins, 'puma', 'pumactl'
append :rbenv_map_bins, 'puma', 'pumactl'
append :rvm_map_bins, 'puma', 'pumactl'
@@ -105,14 +108,13 @@
"plugin '#{bind}'"
end.join("\n")
end
def upload_puma_rb(role)
- template_puma 'puma.rb', fetch(:puma_conf), role
+ template_puma 'puma', fetch(:puma_conf), role
end
end
end
-install_plugin Capistrano::Puma
require 'capistrano/puma/workers'
require 'capistrano/puma/monit'
require 'capistrano/puma/jungle'
require 'capistrano/puma/nginx'
\ No newline at end of file