ohai 16.5.4 → 16.5.6

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: 0ad9b4829ddd7c9f0d80fbe665cdd9ce8b2c1aec690af23980d30f2b14a6787f
4
- data.tar.gz: 60f516dec3ca0d7e3b0043f394f19c6554ff9b247563128298caa9d1dc1886f8
3
+ metadata.gz: bdf73dcd0e2c5c510ea32c222ba7d1af4518248bd7da383e830950fc6abae14f
4
+ data.tar.gz: 670279df5019b42e10a62ccfef09a1c14ad23037ec419da228c5dc15ec9f3a9e
5
5
  SHA512:
6
- metadata.gz: f68bab715188ed1fcf41192a9311ede7deff2381b1195f893b8ef64cc0898db86fe26c7e6f6249e94ee10ebfe624591b2950d5c17e62deebe990e1cf2dad0127
7
- data.tar.gz: 9899021fa77161437c708a2fbbe6140600196010f03cf4f0e24153c384cea252d2a7b892406abfee9d3cae17b08bb7a1fa314a61724b40e3185ab3693c4c8f21
6
+ metadata.gz: 573ca2d973a564ca588904e7230f5db4c3aa5a97bdbbcafc8a833830a5530348b9c824a172b0e72bfe672393213e19dd276cabbbe054968a41dabe905a84f523
7
+ data.tar.gz: ee0d263f7213fae70cb7d6a9230103cc5112d54b48669b1b17276dd873117e420222c418646ec5283c93be268083ad09103df0d62f3ffac9215173eb33979ca3
data/Gemfile CHANGED
@@ -11,7 +11,7 @@ group :development do
11
11
  gem "rspec-core", "~> 3.0"
12
12
  gem "rspec-expectations", "~> 3.0"
13
13
  gem "rspec-mocks", "~> 3.0"
14
- gem "rubocop-performance", "1.8.0"
14
+ gem "rubocop-performance", "1.8.1"
15
15
  gem "rubocop-rspec"
16
16
  end
17
17
 
@@ -142,7 +142,7 @@ module Ohai
142
142
  key = expand_path(o)
143
143
  if key[-1..-1] != "/"
144
144
  retr_meta = metadata_get("#{id}#{key}", api_version)
145
- metadata[metadata_key(key)] = retr_meta ? retr_meta : ""
145
+ metadata[metadata_key(key)] = retr_meta || ""
146
146
  elsif not key.eql?("/")
147
147
  metadata[key[0..-2]] = fetch_dir_metadata("#{id}#{key}", api_version)
148
148
  end
@@ -159,7 +159,7 @@ module Ohai
159
159
  key = expand_path(o)
160
160
  if key[-1..-1] != "/"
161
161
  retr_meta = metadata_get("#{id}#{key}", api_version)
162
- data = retr_meta ? retr_meta : ""
162
+ data = retr_meta || ""
163
163
  json = String(data)
164
164
  parser = FFI_Yajl::Parser.new
165
165
  metadata[metadata_key(key)] = parser.parse(json)
@@ -41,7 +41,7 @@ Ohai.plugin(:IPC) do
41
41
  "perms" => parts[3],
42
42
  "bytes" => parts[4].to_i,
43
43
  "nattch" => parts[5].to_i,
44
- "status" => parts[6] ? parts[6] : "",
44
+ "status" => parts[6] || "",
45
45
  }
46
46
 
47
47
  ipc["shm"][parts[1].to_i] = segment
@@ -646,7 +646,7 @@ Ohai.plugin(:Network) do
646
646
  logger.trace("Plugin Network: #{default_prefix}_interface set to #{default_route[:dev]}")
647
647
 
648
648
  # setting gateway to 0.0.0.0 or :: if the default route is a link level one
649
- network["#{default_prefix}_gateway"] = default_route[:via] ? default_route[:via] : family[:default_route].chomp("/0")
649
+ network["#{default_prefix}_gateway"] = default_route[:via] || family[:default_route].chomp("/0")
650
650
  logger.trace("Plugin Network: #{default_prefix}_gateway set to #{network["#{default_prefix}_gateway"]}")
651
651
 
652
652
  # deduce the default route the user most likely cares about to pick {ip,mac,ip6}address below
@@ -161,8 +161,8 @@ Ohai.plugin(:Rackspace) do
161
161
  unless rackspace[:public_ip].nil?
162
162
  rackspace[:public_hostname] = begin
163
163
  Resolv.getname(rackspace[:public_ip])
164
- rescue Resolv::ResolvError, Resolv::ResolvTimeout
165
- rackspace[:public_ip]
164
+ rescue Resolv::ResolvError, Resolv::ResolvTimeout
165
+ rackspace[:public_ip]
166
166
  end
167
167
  end
168
168
  rackspace[:local_ipv4] = rackspace[:private_ip]
@@ -18,5 +18,5 @@
18
18
 
19
19
  module Ohai
20
20
  OHAI_ROOT = File.expand_path(__dir__)
21
- VERSION = "16.5.4".freeze
21
+ VERSION = "16.5.6".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: 16.5.4
4
+ version: 16.5.6
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-09-17 00:00:00.000000000 Z
11
+ date: 2020-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config