lib/capistrano/tasks/passenger.cap in capistrano-passenger-0.1.1 vs lib/capistrano/tasks/passenger.cap in capistrano-passenger-0.2.0
- old
+ new
@@ -10,10 +10,15 @@
end
on roles(fetch(:passenger_roles)), in: fetch(:passenger_restart_runner), wait: fetch(:passenger_restart_wait), limit: fetch(:passenger_restart_limit) do
with fetch(:passenger_environment_variables) do
within(release_path) do
if restart_with_touch.nil?
- passenger_version = capture(:passenger, '-v').match(/^Phusion Passenger (Enterprise )?version (.*)$/)[2]
+ # 'passenger -v' may output one of the following depending on the version:
+ # Phusion Passenger version x.x.x
+ # Phusion Passenger Enterprise version x.x.x
+ # Phusion Passenger x.x.x
+ # Phusion Passenger Enterprise x.x.x
+ passenger_version = capture(:passenger, '-v').match(/^Phusion Passenger (Enterprise )?(version )?(.*)$/)[3]
restart_with_touch = Gem::Version.new(passenger_version) < Gem::Version.new('4.0.33')
end
if restart_with_touch
execute :mkdir, '-p', release_path.join('tmp')