diff --git a/app/models/deploy_rsync.rb b/app/models/deploy_rsync.rb index feaa25b9..e492c88f 100644 --- a/app/models/deploy_rsync.rb +++ b/app/models/deploy_rsync.rb @@ -9,11 +9,11 @@ class DeployRsync < Deploy ssh? && rsync(output: output) end - # No se ocupa espacio local + # El espacio remoto es el mismo que el local # # @return [Integer] def size - 0 + deploy_local.build_stats.last.size end # Devolver el destino o lanzar un error si no está configurado @@ -95,6 +95,10 @@ class DeployRsync < Deploy # # @return [String] def source - site.deploys.find_by(type: 'DeployLocal').destination + deploy_local.destination + end + + def deploy_local + @deploy_local ||= site.deploys.find_by(type: 'DeployLocal') end end