specinfra 2.70.2 → 2.71.0

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
  SHA1:
3
- metadata.gz: c9f1e31f2b84909f7eda6a32e53c04f204af4f95
4
- data.tar.gz: f0abfe1a2001257c1bcef67222524f69200aa874
3
+ metadata.gz: 22c27e74d4f222ca0d10de2f17c3737876fb76f7
4
+ data.tar.gz: 937890d3ec6635987cd1cc1bcbacd8f0daee7442
5
5
  SHA512:
6
- metadata.gz: 824139d2535ef1fff566a13acd4544075919155425b32dab07dfb79d49ca9d06efd8fe147dc26977a60e721b7c799a1c66f58d1f0fbddd1986ac8a16e76ea4a7
7
- data.tar.gz: 879cc5284d2722a6529c28d456ccd66842ba0c9eec2602cf2e871d3718a042215e1cf58bab448c9df6562a09c35f9dc3c9dbf7912c3be20142e4bafcba7bd102
6
+ metadata.gz: c848931100720913bf72a96a7c098aa920b14045c06936917e8f1fcaacbefc5f8f060acc57299976dbac305222f8ef4ef2ffdb346413737168f538589e61927c
7
+ data.tar.gz: 4fdf5a547e08fbf11fbcd50de361092ceaa8e989d604146b3f9acc650b2fd72fe7cc34de90d8509e2473b3eeeba55bc58a9bed55ea1b6c426ac6c40cf6704677
@@ -4,32 +4,10 @@ module Specinfra
4
4
  module Helper
5
5
  module Os
6
6
  def os
7
- property[:os] = {} if ! property[:os]
8
- if ! property[:os].include?(:family)
9
- property[:os] = detect_os
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
-
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.70.2"
2
+ VERSION = "2.71.0"
3
3
  end
@@ -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
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.70.2
4
+ version: 2.71.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita