1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Remove deprecated call to Sring#grep for Ruby 1.9.

This commit is contained in:
Martin Carpenter 2010-09-20 10:37:34 +02:00 committed by Lee Hambley
parent af3331cfcd
commit a0240d8f67

View file

@ -69,7 +69,8 @@ module Capistrano
def query_revision(revision)
return revision if revision_type(revision) == :date
revision = yield(scm(cvs_root, :log, "-r#{revision}")).
grep(/^date:/).
split("\n").
select { |line| line =~ /^date:/ }.
map { |line| line[/^date: (.*?);/, 1] }.
sort.last + " UTC"
return revision