specinfra 2.70.2 → 2.71.0
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/specinfra/helper/os.rb +3 -25
- data/lib/specinfra/version.rb +1 -1
- data/spec/backend/exec/build_command_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22c27e74d4f222ca0d10de2f17c3737876fb76f7
|
|
4
|
+
data.tar.gz: 937890d3ec6635987cd1cc1bcbacd8f0daee7442
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c848931100720913bf72a96a7c098aa920b14045c06936917e8f1fcaacbefc5f8f060acc57299976dbac305222f8ef4ef2ffdb346413737168f538589e61927c
|
|
7
|
+
data.tar.gz: 4fdf5a547e08fbf11fbcd50de361092ceaa8e989d604146b3f9acc650b2fd72fe7cc34de90d8509e2473b3eeeba55bc58a9bed55ea1b6c426ac6c40cf6704677
|
data/lib/specinfra/helper/os.rb
CHANGED
|
@@ -4,32 +4,10 @@ module Specinfra
|
|
|
4
4
|
module Helper
|
|
5
5
|
module Os
|
|
6
6
|
def os
|
|
7
|
-
property[:os] =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
end
|
|
11
|
-
property[:os]
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
def detect_os
|
|
16
|
-
return Specinfra.configuration.os if Specinfra.configuration.os
|
|
17
|
-
|
|
18
|
-
backend = Specinfra.configuration.backend
|
|
19
|
-
if backend == :cmd || backend == :winrm
|
|
20
|
-
return { :family => 'windows', :release => nil, :arch => nil }
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
Specinfra::Helper::DetectOs.subclasses.each do |c|
|
|
24
|
-
res = c.detect
|
|
25
|
-
if res
|
|
26
|
-
res[:arch] ||= Specinfra.backend.run_command('uname -m').stdout.strip
|
|
27
|
-
return res
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
raise NotImplementedError, "Specinfra failed os detection."
|
|
7
|
+
property[:os] = Specinfra.configuration.os ?
|
|
8
|
+
Specinfra.configuration.os :
|
|
9
|
+
Specinfra.backend.os_info
|
|
31
10
|
end
|
|
32
11
|
end
|
|
33
12
|
end
|
|
34
13
|
end
|
|
35
|
-
|
data/lib/specinfra/version.rb
CHANGED
|
@@ -113,6 +113,7 @@ describe 'os' do
|
|
|
113
113
|
# clear os information cache
|
|
114
114
|
property[:os] = nil
|
|
115
115
|
Specinfra.configuration.instance_variable_set(:@os, nil)
|
|
116
|
+
Specinfra.backend.instance_variable_set(:@os_info, nil)
|
|
116
117
|
end
|
|
117
118
|
|
|
118
119
|
context 'test ubuntu with lsb_release command' do
|
|
@@ -185,4 +186,3 @@ EOF
|
|
|
185
186
|
end
|
|
186
187
|
end
|
|
187
188
|
end
|
|
188
|
-
|