diff --git a/app/models/deploy_rsync.rb b/app/models/deploy_rsync.rb index dd661840..c8e0dc8f 100644 --- a/app/models/deploy_rsync.rb +++ b/app/models/deploy_rsync.rb @@ -73,7 +73,7 @@ class DeployRsync < Deploy # # @return [Array] def user_host - destination.split(':', 2).first.split('@', 2).tap do |d| + @user_host ||= destination.split(':', 2).first.split('@', 2).tap do |d| next unless d.size == 1 d.insert(0, nil) @@ -93,4 +93,8 @@ class DeployRsync < Deploy def source site.deploys.find_by(type: 'DeployLocal').destination end + + def url + "https://#{user_host.last}" + end end