summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/cpu.rb
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-02-20 19:04:16 +0530
committerGitHub <noreply@github.com>2023-02-20 19:04:16 +0530
commitc9196d809d4429c7cea90731446039090da33730 (patch)
treeedd4da7759ddfffba7be64cccfbff88ffb4b21a9 /lib/ohai/plugins/cpu.rb
parent540555c0543f20b65f7416a7bc245d582534613a (diff)
downloadohai-c9196d809d4429c7cea90731446039090da33730.tar.gz
Update rubocop-performance requirement from 1.15.2 to 1.16.0 (#1784)
* Update rubocop-performance requirement from 1.15.2 to 1.16.0 Updates the requirements on [rubocop-performance](https://github.com/rubocop/rubocop-performance) to permit the latest version. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.15.2...v1.16.0) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * Fix chefstyle linting errors Signed-off-by: Neha Pansare <neha.pansare@progress.com> * Fix unit test failures due to changing match with include? to fix chefstye error. This happens because method file_val_if_exists returns string only when file is found, else it returns nil Signed-off-by: Neha Pansare <neha.pansare@progress.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Neha Pansare <neha.pansare@progress.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Neha Pansare <neha.pansare@progress.com>
Diffstat (limited to 'lib/ohai/plugins/cpu.rb')
-rw-r--r--lib/ohai/plugins/cpu.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/cpu.rb b/lib/ohai/plugins/cpu.rb
index 897f716b..510c2018 100644
--- a/lib/ohai/plugins/cpu.rb
+++ b/lib/ohai/plugins/cpu.rb
@@ -524,7 +524,7 @@ Ohai.plugin(:CPU) do
cpu[index] = Mash.new
cpu[index][:status] = status
cpu[index][:location] = location
- if /Available/.match?(status)
+ if status.include?("Available")
cpu[:available] += 1
lsattr = shell_out("lsattr -El #{name}").stdout.lines
lsattr.each do |attribute|