train-core 3.0.3 → 3.1.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 498cde88401e4600e70ca7a11c60e22000252b8e6e453849e050f005bd5fa0eb
|
4
|
+
data.tar.gz: fb23a404a78eb64b4918ab4e5726d0f9cff1270cc750b9f5b77e6d9b67ec0ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be868622834db36c1c07c3c8221a13b7cc112c94c176db9fdd923160945bb28b0436d9405c8f9dd58175dbbc234278eab847cd55f866eaa56adf13c416868e25
|
7
|
+
data.tar.gz: a166c00d0eda33cc8942ed19cb2926433997c9f2975322e701c6a01ea52c9f614684e7d53df0489b8fbbf53e35375bf05cdc85eb7af5c2ee800cb12c531aacb3
|
@@ -37,11 +37,11 @@ module Train::Platforms::Detect::Helpers
|
|
37
37
|
|
38
38
|
raw.lines.each_with_object({}) do |line, memo|
|
39
39
|
line.strip!
|
40
|
+
next if line.nil? || line.empty?
|
40
41
|
next if line.start_with?("#")
|
41
|
-
next if line.empty?
|
42
42
|
|
43
43
|
key, value = line.split("=", 2)
|
44
|
-
memo[key] = value.gsub(/\A"|"\Z/, "") unless value.empty?
|
44
|
+
memo[key] = value.gsub(/\A"|"\Z/, "") unless value.nil? || value.empty?
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -33,7 +33,7 @@ module Train::Transports
|
|
33
33
|
}
|
34
34
|
|
35
35
|
# rubocop:disable Metrics/ParameterLists
|
36
|
-
# rubocop:disable
|
36
|
+
# rubocop:disable Security/Eval
|
37
37
|
set_trace_func(proc { |event, _file, _line, id, binding, classname|
|
38
38
|
unless classname.to_s.start_with?("Train::Transports::Mock") &&
|
39
39
|
(event == "call") &&
|
data/lib/train/transports/ssh.rb
CHANGED
@@ -103,8 +103,10 @@ module Train::Transports
|
|
103
103
|
|
104
104
|
if options[:auth_methods] == ["none"]
|
105
105
|
if ssh_known_identities.empty?
|
106
|
-
raise Train::ClientError
|
107
|
-
"Your SSH Agent has no keys added, and you have not specified a password or a key file"
|
106
|
+
raise Train::ClientError.new(
|
107
|
+
"Your SSH Agent has no keys added, and you have not specified a password or a key file",
|
108
|
+
:no_ssh_password_or_key_available
|
109
|
+
)
|
108
110
|
else
|
109
111
|
logger.debug("[SSH] Using Agent keys as no password or key file have been specified")
|
110
112
|
options[:auth_methods].push("publickey")
|
@@ -149,6 +149,11 @@ class Train::Transports::SSH
|
|
149
149
|
"ssh://#{@username}@#{@hostname}:#{@port}"
|
150
150
|
end
|
151
151
|
|
152
|
+
# remote_port_forwarding
|
153
|
+
def forward_remote(port, host, remote_port, remote_host = "127.0.0.1")
|
154
|
+
@session.forward.remote(port, host, remote_port, remote_host)
|
155
|
+
end
|
156
|
+
|
152
157
|
private
|
153
158
|
|
154
159
|
PING_COMMAND = "echo '[SSH] Established'".freeze
|
data/lib/train/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: train-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Richter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|