ohai 16.1.1 → 16.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/ohai/plugins/kernel.rb +8 -7
- data/lib/ohai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b01a821d5ffa3a329d434aa798b7e6396cd38329a5aed167cc9fa5d790e1e40b
|
4
|
+
data.tar.gz: 832b596c834b379cd996bdad0d097e38684be9e175fcd50d59fce4cebc04ec19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad4cbe610a98f04f3525b4d025e7053712dbe7c9218d38e506dd6beb031ded0e5d969ede709a0b2fdf95cea747905d18b021eea7d29db25271f24792c439bc4b
|
7
|
+
data.tar.gz: 5359aff83afbfceb44068bc838ce4a8153e863a6684319a65b1164e48169e6ba406e38e537c4686d1102e4bfc29e1f783fe4bdc216654fd0d19af53d8c5fbbf0
|
data/Gemfile
CHANGED
data/lib/ohai/plugins/kernel.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# Author:: Bryan McLellan (<btm@loftninjas.org>)
|
5
5
|
# Author:: Claire McQuin (<claire@chef.io>)
|
6
6
|
# Author:: James Gartrell (<jgartrel@gmail.com>)
|
7
|
-
# Copyright:: Copyright (c)
|
7
|
+
# Copyright:: Copyright (c) Chef Software, Inc.
|
8
8
|
# Copyright:: Copyright (c) 2009 Bryan McLellan
|
9
9
|
# License:: Apache License, Version 2.0
|
10
10
|
#
|
@@ -137,11 +137,12 @@ Ohai.plugin(:Kernel) do
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
# see if a WMI name is
|
141
|
-
# useless data to ohai
|
140
|
+
# see if a WMI name is in the blocked list so we can avoid writing
|
141
|
+
# out useless data to ohai
|
142
|
+
#
|
142
143
|
# @param [String] name the wmi name to check
|
143
|
-
# @return [Boolean] is the wmi name
|
144
|
-
def
|
144
|
+
# @return [Boolean] is the wmi name in the blocked list
|
145
|
+
def blocked_wmi_name?(name)
|
145
146
|
[
|
146
147
|
"creation_class_name", # this is just the wmi name
|
147
148
|
"cs_creation_class_name", # this is just the wmi name
|
@@ -262,7 +263,7 @@ Ohai.plugin(:Kernel) do
|
|
262
263
|
host = wmi.first_of("Win32_OperatingSystem")
|
263
264
|
kernel[:os_info] = Mash.new
|
264
265
|
host.wmi_ole_object.properties_.each do |p|
|
265
|
-
next if
|
266
|
+
next if blocked_wmi_name?(p.name.wmi_underscore)
|
266
267
|
|
267
268
|
kernel[:os_info][p.name.wmi_underscore.to_sym] = host[p.name.downcase]
|
268
269
|
end
|
@@ -277,7 +278,7 @@ Ohai.plugin(:Kernel) do
|
|
277
278
|
kernel[:cs_info] = Mash.new
|
278
279
|
host = wmi.first_of("Win32_ComputerSystem")
|
279
280
|
host.wmi_ole_object.properties_.each do |p|
|
280
|
-
next if
|
281
|
+
next if blocked_wmi_name?(p.name.wmi_underscore)
|
281
282
|
|
282
283
|
kernel[:cs_info][p.name.wmi_underscore.to_sym] = host[p.name.downcase]
|
283
284
|
end
|
data/lib/ohai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.
|
4
|
+
version: 16.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|