capistrano-s3_archive 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2e488e7dda654a95d83fb9971c56510f17b22bc
4
- data.tar.gz: ff10ca9768576a97e114b46413aa5bbb05fd49fe
3
+ metadata.gz: 26d849aca711454ddb7add7f361971a883cca0fe
4
+ data.tar.gz: fd2ae963c34c97f96bf209ffb1fcbbb6b540f838
5
5
  SHA512:
6
- metadata.gz: 7fa6318c80d0d105c2edc95afa89cd8ee9aada7f28d99c3715f93a8c79e32fcbf51b49704947c2fa25dc83b82a6169d5e9f5f07b257e7459485bce1e5595c862
7
- data.tar.gz: 7ecaff5a54de117dc61ae501e99c70c4b9330a6bcb958cf836e9a03e3659e955d1005faf760ffdb602fcdcf0f3070202f35d305391a86dc5abb735906549299f
6
+ metadata.gz: c4878574aa7502b196bc97769d4757073db80a061a82a7770b6bfdf88f8d7bf498e97dc747a64abfe10ecff7594e81003f06273a35b97884bc70a600a92eef1f
7
+ data.tar.gz: ee39db02b789562d469e57a0c963af283192945e7d972700658a47f11b4d95d016299bfd755a8f5488d382e05278dfb8071562753f72bd00aa8ed629fee9bef3
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module S3Archive
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
@@ -145,7 +145,7 @@ module Capistrano
145
145
 
146
146
  def release(server = context.host)
147
147
  unless context.class == SSHKit::Backend::Local
148
- user = server.user + '@' unless server.user.nil?
148
+ user = user_for(server) + '@' unless user_for(server).nil?
149
149
  key = ssh_key_for(server)
150
150
  ssh_port_option = server.port.nil? ? '' : "-p #{server.port}"
151
151
  end
@@ -191,6 +191,16 @@ module Capistrano
191
191
  end
192
192
  end
193
193
 
194
+ def user_for(host)
195
+ if host.user
196
+ host.user
197
+ elsif host.ssh_options && host.ssh_options.has_key?(:user)
198
+ host.ssh_options[:user]
199
+ elsif fetch(:ssh_options, nil) && fetch(:ssh_options).has_key?(:user)
200
+ fetch(:ssh_options)[:user]
201
+ end
202
+ end
203
+
194
204
  private
195
205
  def rsync_cache
196
206
  cache = fetch(:rsync_cache)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-s3_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takuto Komazaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-08 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano