gaptool-client 0.8.0.pre.beta4 → 0.8.0.pre.beta5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/gaptool_client/ssh.rb +16 -11
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bd2601c8422b74e82e18cee613c05b4c5599435
4
- data.tar.gz: 5b0ed9dee02fb9827122a5d196ab239f9beeaae4
3
+ metadata.gz: cfff28ea314317791306b693214c18de592e63dd
4
+ data.tar.gz: 02349e3f68acd9c5e887f50bfbfac50ce9574903
5
5
  SHA512:
6
- metadata.gz: fe52635d7f258cc49b76cad3406ce54dee6c5a3fe963f25ad78d36101b95cdf3b4d8fde73afc6dbbef1a4b11b76c3f8a71a71cd586e5e4d2340d971bf032d2b3
7
- data.tar.gz: 33160fa18acb2d8dfc66789906a7f038fea505a7fd47a8a72689c32546883415eb9a1727c97b04aae8d92e02a14e0e8955eb67c484ab8e076a136ef00cb67d30
6
+ metadata.gz: 373f6ad2b696e90c63471ac54a2f709e1360da404b37a1487097acb9d9b405271a455026d5ee7df53b47332fd07d6af47e000d52e0d8bf38b55892ff89748070
7
+ data.tar.gz: d9c0853b5f0feae5f233e7a4cf16a3ffa8136f28a0ecaa3438f700ff7d448438f4508a3691b862e9f4f6201f557c4377d01a5382a3a005d7cd1ca2274b4d4a7a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0-beta4
1
+ 0.8.0-beta5
@@ -12,11 +12,14 @@ module Gaptool
12
12
  START_MARKER = '###### GAPTOOL ######'
13
13
  STOP_MARKER = '###### END GAPTOOL ######'
14
14
 
15
+ def self.ssh_identity
16
+ @ssh_id ||= if ENV['GT_SSH_KEY']
17
+ File.realpath(File.expand_path(ENV['GT_SSH_KEY']))
18
+ end
19
+ end
20
+
15
21
  def self.config_for(node)
16
- key = if ENV['GT_SSH_KEY']
17
- path = File.realpath(File.expand_path(ENV['GT_SSH_KEY']))
18
- "\n IdentityFile #{path}"
19
- end
22
+ key = "\n IdentityFile #{ssh_identity}" if ssh_identity
20
23
  host = Gaptool::API.get_host(node)
21
24
  <<-EOF
22
25
  # -- #{node['instance']}
@@ -83,15 +86,17 @@ EOF
83
86
 
84
87
  def self.configure_sshkit(opts = {})
85
88
  SSHKit.config.output_verbosity = opts[:log_level] || Logger::WARN
89
+ opts = {
90
+ forward_agent: true,
91
+ global_known_hosts_file: '/dev/null',
92
+ keys_only: true,
93
+ port: 22,
94
+ user: ENV['GT_USER']
95
+ }
96
+ opts[:keys] = [ssh_identity] if ssh_identity
86
97
  SSHKit::Backend::Netssh.configure do |ssh|
87
98
  ssh.connection_timeout = 30
88
- ssh.ssh_options = {
89
- forward_agent: true,
90
- global_known_hosts_file: '/dev/null',
91
- keys_only: true,
92
- port: 22,
93
- user: ENV['GT_USER']
94
- }
99
+ ssh.ssh_options = opts
95
100
  end
96
101
  end
97
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gaptool-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre.beta4
4
+ version: 0.8.0.pre.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Laurita