capistrano-knife-solo 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/capistrano-knife-solo.gemspec +1 -1
- data/lib/capistrano-knife-solo.rb +7 -3
- 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: 9b7706e2a1b662db3c19af21aa208914e8783ec3
|
4
|
+
data.tar.gz: 7b07c6e46d53ce2550ebae4daae0b570a0f886e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95f28befa60aacf0e387ccb95741d0137b332439eb0dbfd3e2ae7a20f6ff8a44a905b2064e63b601172c29d0bcf0b79cc919612a2d9c9dc8f4f06bc3fd829731
|
7
|
+
data.tar.gz: a31a1933b8c462b3c3d95869373a4ae5ff007450f868ee46925b41c1505474461076bc830738867203e13810363b69cab2f6466cb2f5f09663b1c26436a6795c
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-knife-solo'
|
7
|
-
spec.version = '0.
|
7
|
+
spec.version = '0.2.0'
|
8
8
|
spec.authors = 'Robert Coleman'
|
9
9
|
spec.email = 'github@robert.net.nz'
|
10
10
|
spec.summary = %q{Use knife solo with Capistrano.}
|
@@ -17,12 +17,12 @@ module CapistranoKnifeSolo
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.knife_config(host)
|
20
|
-
ssh_options = fetch(:ssh_options)
|
20
|
+
ssh_options = fetch(:ssh_options, {})
|
21
21
|
options = {}
|
22
22
|
options[:ssh_user] = ssh_options[:user] if ssh_options[:user]
|
23
23
|
options[:ssh_password] = ssh_options[:password] if ssh_options[:password]
|
24
24
|
options[:ssh_port] = ssh_options[:port] if ssh_options[:port]
|
25
|
-
options[:identity_file] = ssh_options[:keys][0] if ssh_options
|
25
|
+
options[:identity_file] = ssh_options[:keys][0] if ssh_options.fetch(:keys, [])[0]
|
26
26
|
options[:forward_agent] = ssh_options[:forward_agent] if ssh_options[:forward_agent]
|
27
27
|
options[:startup_script] = fetch(:knife_startup_script) if fetch(:knife_startup_script)
|
28
28
|
options[:sudo_command] = fetch(:knife_sudo_command) if fetch(:knife_sudo_command)
|
@@ -33,7 +33,11 @@ module CapistranoKnifeSolo
|
|
33
33
|
|
34
34
|
def self.knife_args(host)
|
35
35
|
args = []
|
36
|
-
|
36
|
+
if host.user
|
37
|
+
args << "#{ host.user }@#{ host.hostname }"
|
38
|
+
else
|
39
|
+
args << host.hostname
|
40
|
+
end
|
37
41
|
args << "#{fetch(:knife_args)}" if fetch(:knife_args)
|
38
42
|
return args
|
39
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-knife-solo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Coleman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.4.5
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Use knife solo with Capistrano.
|