sconb 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sconb/cli.rb +1 -0
- data/lib/sconb/ext/net/ssh/config.rb +1 -1
- data/lib/sconb/ssh_config.rb +3 -3
- data/lib/sconb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 143b5ee22e1aec1cfa3abeda6d574e5184e79b74
|
4
|
+
data.tar.gz: db168ab3f7df31ed9bf00fc70fb786550f9f24b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2194f42a4ff86c5f4f284709ae92e0d3f459277d055fd5bf4b2caf721e06cc4a1554a82a39cc18a1519a0544f358e8a99e84449e79594538dd5a2baded53cae6
|
7
|
+
data.tar.gz: 4f0308b33c7d137d8168bb8622ff2a2146f6cc6c837e99e3e6819ac29259c80bf2c4245779ef53bbb364e8d9600dda4b603aea79082cd88658eec203d54fd4f6
|
data/lib/sconb/cli.rb
CHANGED
@@ -4,7 +4,7 @@ module Net
|
|
4
4
|
class << self
|
5
5
|
# Original code is Net::SSH::Config.load (https://github.com/net-ssh/net-ssh/blob/master/LICENSE.txt)
|
6
6
|
# rubocop:disable all
|
7
|
-
def
|
7
|
+
def load_with_key(path, host, options)
|
8
8
|
settings = {}
|
9
9
|
file = File.expand_path(path)
|
10
10
|
return settings unless File.readable?(file)
|
data/lib/sconb/ssh_config.rb
CHANGED
@@ -9,7 +9,7 @@ module Sconb
|
|
9
9
|
@configs = {}
|
10
10
|
return @configs unless File.readable?(file)
|
11
11
|
|
12
|
-
@allconfig = Net::SSH::Config.
|
12
|
+
@allconfig = Net::SSH::Config.load_with_key(@path, '*', @options)
|
13
13
|
@configs['*'] = @allconfig unless @allconfig.size <= 1
|
14
14
|
IO.foreach(file) do |line|
|
15
15
|
parse(line)
|
@@ -35,7 +35,7 @@ module Sconb
|
|
35
35
|
positive_hosts.each do |host|
|
36
36
|
next if host == '*'
|
37
37
|
next unless host.match @regexp
|
38
|
-
config = Net::SSH::Config.
|
38
|
+
config = Net::SSH::Config.load_with_key(@path, host, @options)
|
39
39
|
|
40
40
|
@allconfig.each do |k, _v|
|
41
41
|
next unless config.key? k
|
@@ -50,7 +50,7 @@ module Sconb
|
|
50
50
|
if key.downcase == 'match'
|
51
51
|
match_key = key + ' ' + value
|
52
52
|
return unless match_key.match @regexp
|
53
|
-
@configs[match_key] = Net::SSH::Config.
|
53
|
+
@configs[match_key] = Net::SSH::Config.load_with_key(@path, value, @options)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
data/lib/sconb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sconb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|