ohai 15.9.1 → 15.12.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
  SHA256:
3
- metadata.gz: cdfdd4fa36bb2e7c4a6b62a5cbcce4627e99a09ed3830e664edafb6a5bc8f471
4
- data.tar.gz: 7f0c42d9cae6beedf8ab08e982d68aca51c5250523ced1dfceaa0633dc532fae
3
+ metadata.gz: 3cc502163cd1c79f43b4b934c425a00b2b00c2626cefb82882659fa4756dd82f
4
+ data.tar.gz: 2eadca5148f5f1c0706157f3b2c7c2cfe6606c304f249815c418aba69ca87c53
5
5
  SHA512:
6
- metadata.gz: 4deda99a74a2bb7187d14c3d74068776e4853387d871f6ea0f12ab70f4ef60ef2f8be0286025349c83ff590910d46fe82d03d17a66f0a273605ee97777cd3d96
7
- data.tar.gz: 1ae3e4ac9c24b84d9504d66c18b47826b3b58804d2096fda5e41ed4e92676c9a5cc15a005e167d49307cfabff53bef7f3978f2cc64dc7a020ba1be39e299e538
6
+ metadata.gz: d3e0b6ae3e18c740ca5e30db4d4db8200c1cae7b742bd5cdda9541c05cc30e8d0570250b86b51dc5397cd8cc383d63d82240ffb5bb069ce9457b536a6c87dfed
7
+ data.tar.gz: 3925101539b829009b8215eddaccb20d6b88c791ee69224cddd7d4c824bc5939dab97352e97184183d8f1561b3a14108187370e37ac006869cbc8cceae7ce4f2
data/Gemfile CHANGED
@@ -2,9 +2,8 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- # NOTE: do not submit PRs to add pry as a dep, add to your Gemfile.local
6
5
  group :development do
7
- gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
6
+ gem "chefstyle", "~> 1.0"
8
7
  gem "rake", ">= 10.1.0"
9
8
  gem "rspec-core", "~> 3.0"
10
9
  gem "rspec-expectations", "~> 3.0"
@@ -26,6 +25,6 @@ end
26
25
  group :debug do
27
26
  gem "pry"
28
27
  gem "pry-byebug"
29
- gem "pry-stack_explorer"
28
+ gem "pry-stack_explorer", "~> 0.4.0" # pin until we drop ruby < 2.6
30
29
  gem "rb-readline"
31
30
  end
@@ -41,8 +41,8 @@ Ohai.plugin(:Hardware) do
41
41
  hardware.merge!(hw_hash[0]["_items"][0])
42
42
 
43
43
  # ProductName: Mac OS X
44
- # ProductVersion: 10.12.5
45
- # BuildVersion: 16F73
44
+ # ProductVersion: 10.15.6
45
+ # BuildVersion: 19G46c
46
46
  shell_out("sw_vers").stdout.lines.each do |line|
47
47
  case line
48
48
  when /^ProductName:\s*(.*)$/
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Adam Jacob (<adam@chef.io>)
3
- # Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,11 +23,6 @@ Ohai.plugin(:Platform) do
23
23
  so = shell_out((Ohai.abs_path( "/usr/bin/sw_vers" )).to_s)
24
24
  so.stdout.lines do |line|
25
25
  case line
26
- when /^ProductName:\s+(.+)$/
27
- macname = $1
28
- macname.downcase!
29
- macname.tr!(" ", "_")
30
- platform macname
31
26
  when /^ProductVersion:\s+(.+)$/
32
27
  platform_version $1
33
28
  when /^BuildVersion:\s+(.+)$/
@@ -35,6 +30,8 @@ Ohai.plugin(:Platform) do
35
30
  end
36
31
  end
37
32
 
33
+ # if we're on darwin assume we're on mac_os_x
34
+ platform "mac_os_x"
38
35
  platform_family "mac_os_x"
39
36
  end
40
37
  end
@@ -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) 2008-2018 Chef Software, Inc.
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 blacklisted so we can avoid writing out
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 blacklisted
144
- def blacklisted_wmi_name?(name)
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 blacklisted_wmi_name?(p.name.wmi_underscore)
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 blacklisted_wmi_name?(p.name.wmi_underscore)
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
@@ -18,5 +18,5 @@
18
18
 
19
19
  module Ohai
20
20
  OHAI_ROOT = File.expand_path(File.dirname(__FILE__))
21
- VERSION = "15.9.1".freeze
21
+ VERSION = "15.12.0".freeze
22
22
  end
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: 15.9.1
4
+ version: 15.12.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-04-21 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: systemu