From 67e2ca44fc6ee7b9fe23c3142967b5bf7c6623d4 Mon Sep 17 00:00:00 2001 From: Alessio Caiazza Date: Sat, 4 Feb 2012 18:11:34 +0100 Subject: [PATCH] capistrano deploy: fixed multiple thin detection --- config/deploy.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/deploy.rb b/config/deploy.rb index 6191ca171..d841c3a08 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -47,7 +47,10 @@ namespace :deploy do task :restart do thins = capture_svstat "/service/thin*" - matches = thins.match(/(thin_\d+):/).captures + matches = thins.split("\n").inject([]) do |list, line| + m = line.match(/(thin_\d+):/) + list << m.captures[0] unless m.nil? + end matches.each_with_index do |thin, index| unless index == 0