train 3.1.8 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/train/file.rb +3 -1
- data/lib/train/platforms/platform.rb +3 -9
- data/lib/train/transports/mock.rb +10 -4
- data/lib/train/transports/ssh_connection.rb +1 -1
- data/lib/train/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8dd3de7c1923ee9b164a40fe8b3fb6bfdfe318c3b9cb3b322397551e8a17a5f
|
4
|
+
data.tar.gz: 7b3b63a44c454963d8b47b1c3e7772b17db8f73b20a6519da955a475823d6b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13928685d3aa1d35942241ce81be9cda15cbdfdfadf2e9c04fdb63da9d0573eba79bfb5431fb907ca57b0732c2a9a6be94abc60dd43261d950297ae764bd2d1e
|
7
|
+
data.tar.gz: 0eb217f2809ff17bc7a0715b9c49566a45d16db343131c208a6dabc9765771095020dc8618af13a3003e5e7c0c72d9804ae649bef56246fd3a77ee690e0e6d15
|
data/lib/train/file.rb
CHANGED
@@ -23,10 +23,8 @@ module Train::Platforms
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def find_family_hierarchy(platform = self)
|
26
|
-
families = platform.families.
|
27
|
-
|
28
|
-
memo << find_family_hierarchy(k) unless k.families.empty?
|
29
|
-
end
|
26
|
+
families = platform.families.map { |k, v| [k.name, find_family_hierarchy(k)] }
|
27
|
+
|
30
28
|
@family_hierarchy = families.flatten
|
31
29
|
end
|
32
30
|
|
@@ -42,11 +40,7 @@ module Train::Platforms
|
|
42
40
|
|
43
41
|
def clean_name(force: false)
|
44
42
|
@cleaned_name = nil if force
|
45
|
-
@cleaned_name ||=
|
46
|
-
name = (@platform[:name] || @name)
|
47
|
-
name.downcase!.tr!(" ", "_") if name =~ /[A-Z ]/
|
48
|
-
name
|
49
|
-
end
|
43
|
+
@cleaned_name ||= (@platform[:name] || @name).downcase.tr(" ", "_")
|
50
44
|
end
|
51
45
|
|
52
46
|
def uuid
|
@@ -70,11 +70,17 @@ class Train::Transports::Mock
|
|
70
70
|
"mock://"
|
71
71
|
end
|
72
72
|
|
73
|
+
DEFAULTS = {
|
74
|
+
name: "mock",
|
75
|
+
family: "mock",
|
76
|
+
release: "unknown",
|
77
|
+
arch: "unknown",
|
78
|
+
}.freeze
|
79
|
+
|
73
80
|
def mock_os(value = {})
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
value = { name: "mock", family: "mock", release: "unknown", arch: "unknown" }.merge(value)
|
81
|
+
value = DEFAULTS
|
82
|
+
.merge(value || {})
|
83
|
+
.transform_values { |v| v || "unknown" }
|
78
84
|
|
79
85
|
platform = Train::Platforms.name(value[:name])
|
80
86
|
platform.find_family_hierarchy
|
@@ -285,7 +285,7 @@ class Train::Transports::SSH
|
|
285
285
|
exit_status = nil
|
286
286
|
session.open_channel do |channel|
|
287
287
|
# wrap commands if that is configured
|
288
|
-
cmd = @cmd_wrapper.run(cmd)
|
288
|
+
cmd = @cmd_wrapper.run(cmd) if @cmd_wrapper
|
289
289
|
|
290
290
|
if @transport_options[:pty]
|
291
291
|
channel.request_pty do |_ch, success|
|
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.2.0
|
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-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -146,6 +146,20 @@ dependencies:
|
|
146
146
|
- - "~>"
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0.17'
|
149
|
+
- !ruby/object:Gem::Dependency
|
150
|
+
name: azure_mgmt_security
|
151
|
+
requirement: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - "~>"
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0.18'
|
156
|
+
type: :runtime
|
157
|
+
prerelease: false
|
158
|
+
version_requirements: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - "~>"
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0.18'
|
149
163
|
- !ruby/object:Gem::Dependency
|
150
164
|
name: activesupport
|
151
165
|
requirement: !ruby/object:Gem::Requirement
|