train-core 3.7.0 → 3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/train/extras/stat.rb +1 -1
- data/lib/train/platforms/detect/specifications/os.rb +8 -0
- data/lib/train/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: 017550b023185b37f89bc36e7e1cc920079543ac11fe6d7788813b5363934ed4
|
4
|
+
data.tar.gz: bbd262ace02d7da95ae1ecce35e1c42514cf7a1fcd83f2ae7725b82b8fa65a3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7792c1fa21fb7207d23b1c283dbc0a4c989f0d1593747b5d1954b8e349ab9d5b209d5146f2af7442de1e79c519de152e376d7cf240cd1983440da0ed4ddea17
|
7
|
+
data.tar.gz: 55f506d5dbc20b38f89c5f150ffa69f4d6067a20311c891068ece4ce705ee5af01c6c740ced8fc0e52788cd9ab13c25000d47d2800ab7d023580bf18e1a147a8
|
data/lib/train/extras/stat.rb
CHANGED
@@ -34,7 +34,7 @@ module Train::Extras
|
|
34
34
|
|
35
35
|
def self.linux_stat(shell_escaped_path, backend, follow_symlink)
|
36
36
|
lstat = follow_symlink ? " -L" : ""
|
37
|
-
format = (backend.os.esx? ||
|
37
|
+
format = (backend.os.esx? || %w{alpine yocto ubios}.include?(backend.os[:name])) ? "-c" : "--printf"
|
38
38
|
res = backend.run_command("stat#{lstat} #{shell_escaped_path} 2>/dev/null #{format} '%s\n%f\n%U\n%u\n%G\n%g\n%X\n%Y\n%C'")
|
39
39
|
# ignore the exit_code: it is != 0 if selinux labels are not supported
|
40
40
|
# on the system.
|
@@ -74,6 +74,14 @@ module Train::Platforms::Detect::Specifications
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
+
declare_instance("ubios", "Ubiquiti UbiOS", "ubios") do
|
78
|
+
l_o_r = linux_os_release
|
79
|
+
if l_o_r && l_o_r["ID"] == "ubios"
|
80
|
+
@platform[:release] = l_o_r["VERSION_ID"]
|
81
|
+
true
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
77
85
|
declare_instance("debian", "Debian Linux", "debian") do
|
78
86
|
# if we get this far we have to be some type of debian
|
79
87
|
@platform[:release] = unix_file_contents("/etc/debian_version").chomp
|
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.7.
|
4
|
+
version: 3.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef InSpec Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements:
|
182
182
|
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: '2.
|
184
|
+
version: '2.5'
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|