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 +4 -4
- data/lib/xlogin/factory.rb +6 -2
- data/lib/xlogin/session.rb +1 -1
- data/lib/xlogin/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30e3ea483b43232b7348ba27fc60753704fb36a43492696b35f34a7fdbda3e1a
|
|
4
|
+
data.tar.gz: e625d9412f05af3b850170f67209af887caf6536302e71f03172bb2f6912fa4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 219b1821b33530bccc218807537b8ce4c8292fdb12030c661b1577e4c0d08d37bac3fe0d683a9ab0ac47f5f9e233e322de6664f6529fa850c8639d2ce3370483
|
|
7
|
+
data.tar.gz: 3149a77ee6783a90a7af454999a8ac24fe0d3786275a80cc610e30ce80d8e2e27ca8b5ca4bf217b7372d32cf8f673b5f56f1c2e84c9c4580fdf0cb4696e13c07
|
data/lib/xlogin/factory.rb
CHANGED
|
@@ -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] =
|
|
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
|
data/lib/xlogin/session.rb
CHANGED
|
@@ -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
|
data/lib/xlogin/version.rb
CHANGED
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.
|
|
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:
|
|
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.
|
|
196
|
+
rubygems_version: 3.1.6
|
|
197
197
|
signing_key:
|
|
198
198
|
specification_version: 4
|
|
199
199
|
summary: rancid clogin alternative
|