xlogin 0.16.6 → 0.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7bc26b26eaaf13f1577ebe322b44a888dd5c83426f81d484372e582bb8a1182
4
- data.tar.gz: d3bfdb0e28a4857f2411c59567e0a54e70b94dc580f64b6c963b8e439919f85f
3
+ metadata.gz: 30e3ea483b43232b7348ba27fc60753704fb36a43492696b35f34a7fdbda3e1a
4
+ data.tar.gz: e625d9412f05af3b850170f67209af887caf6536302e71f03172bb2f6912fa4c
5
5
  SHA512:
6
- metadata.gz: 15af0c59968c287bcfb69f422e21de121ae893848b98c6bd6629d33809d4c0939a7a70ed88dd1a49da9e00a02e67bc01cddcce6119ac97396e672a523148a1db
7
- data.tar.gz: 49794803c350a64a7f70d13223ad736b5950eab2e53ff4c090d2673f5fb179b979040c66a67514c9a86881b0954de93a3fe68d1872241e3ac2c1555ca71afd87
6
+ metadata.gz: 219b1821b33530bccc218807537b8ce4c8292fdb12030c661b1577e4c0d08d37bac3fe0d683a9ab0ac47f5f9e233e322de6664f6529fa850c8639d2ce3370483
7
+ data.tar.gz: 3149a77ee6783a90a7af454999a8ac24fe0d3786275a80cc610e30ce80d8e2e27ca8b5ca4bf217b7372d32cf8f673b5f56f1c2e84c9c4580fdf0cb4696e13c07
@@ -6,6 +6,10 @@ require 'xlogin/session_pool'
6
6
  require 'xlogin/template'
7
7
 
8
8
  module Xlogin
9
+
10
+ # gateway tunnel
11
+ Tunnel = Struct.new('Tunnel', :gateway, :ports)
12
+
9
13
  class Factory
10
14
 
11
15
  include Singleton
@@ -70,7 +74,7 @@ module Xlogin
70
74
  port: uri.port || 22
71
75
  )
72
76
 
73
- @tunnels[name] = Struct.new('Tunnel', :gateway, :ports).new(gateway, [])
77
+ @tunnels[name] = Xlogin::Tunnel.new(gateway, [])
74
78
  end
75
79
  end
76
80
 
@@ -97,7 +101,7 @@ module Xlogin
97
101
  template = get_template(type)
98
102
  raise Xlogin::Error.new("Template not found: '#{type}'") unless template
99
103
 
100
- session = template.build(uri(opts), **opts)
104
+ session = template.build(uri(**opts), **opts)
101
105
  return session unless block
102
106
  begin block.call(session) ensure session.close end
103
107
  end
@@ -25,7 +25,7 @@ module Xlogin
25
25
  @host, @port = Xlogin.factory.open_tunnel(@tunnel, @host, @port) if @tunnel
26
26
 
27
27
  num_try = 0
28
- username, password = (opts[:userinfo] || uri.userinfo).to_s.split(':')
28
+ username, password = (opts[:userinfo] || ENV['USERINFO'] || uri.userinfo).to_s.split(':')
29
29
 
30
30
  begin
31
31
  args = Hash.new
@@ -1,3 +1,3 @@
1
1
  module Xlogin
2
- VERSION = "0.16.6"
2
+ VERSION = "0.16.9"
3
3
  end
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.16.6
4
+ version: 0.16.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - haccht
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-telnet
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.0.3
196
+ rubygems_version: 3.1.6
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: rancid clogin alternative