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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa436950ca64377469516aefa8892d7476172753
4
- data.tar.gz: 2ef2588082cae643c199a6535ea69c00be99435e
3
+ metadata.gz: 9b7706e2a1b662db3c19af21aa208914e8783ec3
4
+ data.tar.gz: 7b07c6e46d53ce2550ebae4daae0b570a0f886e4
5
5
  SHA512:
6
- metadata.gz: f3d12285d01a2a16331826b30e6d6d12c251d96a795dbe8e9ccb219585a645a6b38cf27ac511349d4595b0fc18b8a9eaa5d6dff18a05ca9de86d18b6ae07288f
7
- data.tar.gz: 1ff221d22db6dbfb802338c4e92037200ee9dfded9488132331a5fff4bca7fe8ae0bf5360a77e29c6fde1451c9a4d68e6fc44fe99ef6b4524561dad31f86cf6c
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.1.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[:keys][0]
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
- args << host.hostname
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.1.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: 2014-04-18 00:00:00.000000000 Z
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.2.2
117
+ rubygems_version: 2.4.5
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Use knife solo with Capistrano.