xlogin 0.8.13 → 0.8.14

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: d4e251188ed2cd4bf54eb0ce913589b90616028c
4
- data.tar.gz: e97da63feb0cfb0c021d5a9a65429ec6ff10175c
3
+ metadata.gz: 8f0d2cc4b93c270d5703ca6327e6df0cfe6b5637
4
+ data.tar.gz: 4acb729d66575f83c0cd581b48aeb4c3043b5f9f
5
5
  SHA512:
6
- metadata.gz: ebb68fec6f598de8e5464acf4d7939d309ba302f125fc3f809c8ffb2669acdb596907563bce762fdfdd44aa90f47cbdd7aa64ebb15dbcc7095da7a0cccf4dcdf
7
- data.tar.gz: dc8d06e60ba16f5c488f8e70abc6ea49b65b31258213ca2c317d4daed4f7942f73bdc8ecee06436aae6ab9b329821d0959db58f3e62c8dafc7cd07018d87db40
6
+ metadata.gz: 20d3cfbb957515b28d2e7c25d3a46948077acaac0e0946eab1b06f846e37ed330d38c46b0cfb714166aaadad6ad0a66e58e41c392635ea915aeabe37c883d282
7
+ data.tar.gz: 129b8413b891cbca0f15e18b2f86a296964b80a68c0a6049c6c7cbb890582093e7440546221a4e0102fef153a86357a92a7239f90c438b9f18d759a3449dc2c8
data/lib/xlogin/cli.rb CHANGED
@@ -75,9 +75,7 @@ module Xlogin
75
75
  end
76
76
 
77
77
  def list(config)
78
- wid1 = config.hostlist.map { |e| e[:type].length }.max
79
- wid2 = config.hostlist.map { |e| e[:name].length }.max
80
- list = config.hostlist.map { |e| "#{e[:type].to_s.ljust(wid1)} #{e[:name].to_s.ljust(wid2)} #{e[:uri]}" }.sort
78
+ list = config.hostlist.map { |e| e[:name] }.uniq.sort
81
79
  $stdout.puts list
82
80
  end
83
81
 
@@ -14,7 +14,7 @@ module Xlogin
14
14
  def source(*files)
15
15
  files.compact.each do |file|
16
16
  raise SessionError.new("Inventory file not found: #{file}") unless File.exist?(file)
17
- instance_eval(IO.read(file)) if File.exist?(file)
17
+ instance_eval(IO.read(file), file) if File.exist?(file)
18
18
  end
19
19
  end
20
20
 
@@ -1,4 +1,4 @@
1
- require 'uri'
1
+ require 'addressable/uri'
2
2
  require 'xlogin/ssh'
3
3
  require 'xlogin/telnet'
4
4
 
@@ -41,7 +41,7 @@ module Xlogin
41
41
  end
42
42
 
43
43
  def build(uri, **opts)
44
- uri = URI(uri.to_s)
44
+ uri = Addressable::URI.parse(uri.to_s)
45
45
  klass = Class.new(Xlogin.const_get(uri.scheme.capitalize))
46
46
  klass.class_exec(@methods) do |methods|
47
47
  methods.each do |name, block|
@@ -1,3 +1,3 @@
1
1
  module Xlogin
2
- VERSION = "0.8.13"
2
+ VERSION = "0.8.14"
3
3
  end
data/xlogin.gemspec CHANGED
@@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_dependency "net-ssh-telnet"
36
36
  spec.add_dependency "net-ssh-gateway"
37
37
  spec.add_dependency "parallel"
38
+ spec.add_dependency "addressable"
38
39
 
39
40
  spec.add_development_dependency "bundler", "~> 1.13"
40
41
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xlogin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.13
4
+ version: 0.8.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - haccht
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-18 00:00:00.000000000 Z
11
+ date: 2018-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-telnet
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: addressable
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement