capistrano-s3_archive 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano/s3_archive/version.rb +1 -1
- data/lib/capistrano/s3_archive.rb +12 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a8c996040a7790ff1a596a28b0831ea45aa7ce8
|
4
|
+
data.tar.gz: dc697ea439e36316ca1e53bfbb9b78899085eb3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d880c7190585d09d07f0daceb55a46356b77db33f8f47a599367227d5bf26184cfc05c964e9c2acab92e6069e11d2e9c145c7ed75949832baccf955953186f09
|
7
|
+
data.tar.gz: 94fb5aecf5ae0d807a779b028aea5a8f6884f7e002969e08c40abcf0934c896b8a9522862cdaefa0107755322bd74f11d6befe92e28ed0fce53201d3f2707e44
|
@@ -72,7 +72,7 @@ module Capistrano
|
|
72
72
|
def check
|
73
73
|
list_objects(false)
|
74
74
|
return if context.class == SSHKit::Backend::Local
|
75
|
-
ssh_key =
|
75
|
+
ssh_key = ssh_key_for(context.host)
|
76
76
|
if ssh_key.nil?
|
77
77
|
fail MissingSSHKyesError, "#{RsyncStrategy} only supports publickey authentication. Please set #{context.host.hostname}.keys or ssh_options."
|
78
78
|
end
|
@@ -129,7 +129,7 @@ module Capistrano
|
|
129
129
|
def release(server = context.host)
|
130
130
|
unless context.class == SSHKit::Backend::Local
|
131
131
|
user = server.user + '@' unless server.user.nil?
|
132
|
-
key =
|
132
|
+
key = ssh_key_for(server)
|
133
133
|
ssh_port_option = server.port.nil? ? '' : "-p #{server.port}"
|
134
134
|
end
|
135
135
|
rsync = ['rsync']
|
@@ -164,6 +164,16 @@ module Capistrano
|
|
164
164
|
archive_object_key
|
165
165
|
end
|
166
166
|
|
167
|
+
def ssh_key_for(host)
|
168
|
+
if not host.keys.empty?
|
169
|
+
host.keys.first
|
170
|
+
elsif host.ssh_options && host.ssh_options.has_key?(:keys)
|
171
|
+
Array(host.ssh_options[:keys]).first
|
172
|
+
else fetch(:ssh_options, nil) && fetch(:ssh_options).has_key?(:keys)
|
173
|
+
fetch(:ssh_options)[:keys].first
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
167
177
|
private
|
168
178
|
def rsync_cache
|
169
179
|
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.3.
|
4
|
+
version: 0.3.10
|
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-
|
11
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.5.1
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Capistrano deployment from an archive on Amazon S3.
|