train 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: 822b69fa9ee45bff40a62fcce80d792e4605d86d7f55511c289b0bfff86f1d11
|
4
|
+
data.tar.gz: 2052e5189271479302b9079fafb1ed2b612fe02d876a5e35dd468f407ad62270
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52685bfaa63eb3db6db5c36477c2fad2b272264064f30a6da0c5e59ae419d328a392eaa96bc42a1e2c573cfa86e88ba4a0661d97bb39af21c3fdfd8494cb36c6
|
7
|
+
data.tar.gz: b30555ac34ee0fcb74ea05e77db4a78a8570424f8d5843911be532f8cd656bb52813b3e11ba5eed404e2d040a817ba2875cb0a78f919d1513ad733e7ab603863
|
@@ -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
|
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
|