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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ccdaa85d6f589d537c34eef40e28fa8c1b4f4b5
4
- data.tar.gz: 975556b3a5d742fe0694b3ae5c0df3f00d712b4c
3
+ metadata.gz: 143b5ee22e1aec1cfa3abeda6d574e5184e79b74
4
+ data.tar.gz: db168ab3f7df31ed9bf00fc70fb786550f9f24b3
5
5
  SHA512:
6
- metadata.gz: 5ca88cf90196e3f11eb1df69dcabd83718063f0a1a2aa634fda6aa3b0fd152c4661fce48eed873214c62fffa9215db1c10d32573de6b6f8d02e6c58901de4550
7
- data.tar.gz: f0a1ea0d98d59c4139d97d364f0748fd1f5241f6e67c4c3744428f9ce01432f7195fbe2b454771ba43ca42c50dbca02af7f549bbefe5b36b25869b3a65e19dce
6
+ metadata.gz: 2194f42a4ff86c5f4f284709ae92e0d3f459277d055fd5bf4b2caf721e06cc4a1554a82a39cc18a1519a0544f358e8a99e84449e79594538dd5a2baded53cae6
7
+ data.tar.gz: 4f0308b33c7d137d8168bb8622ff2a2146f6cc6c837e99e3e6819ac29259c80bf2c4245779ef53bbb364e8d9600dda4b603aea79082cd88658eec203d54fd4f6
data/lib/sconb/cli.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'thor'
2
+ require 'json'
2
3
 
3
4
  module Sconb
4
5
  class CLI < Thor
@@ -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 sconb_load(path, host, options)
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)
@@ -9,7 +9,7 @@ module Sconb
9
9
  @configs = {}
10
10
  return @configs unless File.readable?(file)
11
11
 
12
- @allconfig = Net::SSH::Config.sconb_load(@path, '*', @options)
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.sconb_load(@path, host, @options)
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.sconb_load(@path, value, @options)
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
@@ -1,3 +1,3 @@
1
1
  module Sconb
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
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.0
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-22 00:00:00.000000000 Z
11
+ date: 2016-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor