diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-02-19 17:01:20 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-02-19 17:01:20 -0800 |
commit | f8182fe410bede9053503303af1dd0dcc51f76d7 (patch) | |
tree | 4f6a10604d99bad0bede984d896a044e58bce659 | |
parent | cff06feb1e7267aeb517cc1070a4aa30e9357e67 (diff) | |
download | ohai-f8182fe410bede9053503303af1dd0dcc51f76d7.tar.gz |
Chefstyle fixes from Rubocop 0.80
This gets us ready for the engine upgrade later.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/plugins/c.rb | 4 | ||||
-rw-r--r-- | lib/ohai/plugins/docker.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/ec2.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/eucalyptus.rb | 4 | ||||
-rw-r--r-- | lib/ohai/plugins/gce.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/rackspace.rb | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/ohai/plugins/c.rb b/lib/ohai/plugins/c.rb index 29383e57..690e101c 100644 --- a/lib/ohai/plugins/c.rb +++ b/lib/ohai/plugins/c.rb @@ -36,10 +36,10 @@ Ohai.plugin(:C) do so = shell_out("/usr/bin/xcode-select -p") if so.exitstatus == 0 logger.trace("Plugin C: Xcode Command Line Tools found.") - return true + true else logger.trace("Plugin C: Xcode Command Line Tools not found.") - return false + false end rescue Ohai::Exceptions::Exec logger.trace("Plugin C: xcode-select binary could not be found. Skipping data.") diff --git a/lib/ohai/plugins/docker.rb b/lib/ohai/plugins/docker.rb index 12a6eef2..6bea2ace 100644 --- a/lib/ohai/plugins/docker.rb +++ b/lib/ohai/plugins/docker.rb @@ -24,7 +24,7 @@ Ohai.plugin(:Docker) do def docker_info_json so = shell_out("docker info --format '{{json .}}'") if so.exitstatus == 0 - return JSON.parse(so.stdout) + JSON.parse(so.stdout) end rescue Ohai::Exceptions::Exec logger.trace('Plugin Docker: Could not shell_out "docker info --format \'{{json .}}\'". Skipping plugin') diff --git a/lib/ohai/plugins/ec2.rb b/lib/ohai/plugins/ec2.rb index 8ae0cdb2..a3abf06a 100644 --- a/lib/ohai/plugins/ec2.rb +++ b/lib/ohai/plugins/ec2.rb @@ -86,7 +86,7 @@ Ohai.plugin(:EC2) do wmi = WmiLite::Wmi.new if wmi.first_of("Win32_ComputerSystemProduct")["identifyingnumber"] =~ /^ec2/ logger.trace("Plugin EC2: has_ec2_identifying_number? == true") - return true + true end else logger.trace("Plugin EC2: has_ec2_identifying_number? == false") diff --git a/lib/ohai/plugins/eucalyptus.rb b/lib/ohai/plugins/eucalyptus.rb index 616d523f..a03ece31 100644 --- a/lib/ohai/plugins/eucalyptus.rb +++ b/lib/ohai/plugins/eucalyptus.rb @@ -32,9 +32,9 @@ Ohai.plugin(:Eucalyptus) do def get_mac_address(addresses) detected_addresses = addresses.detect { |address, keypair| keypair == { "family" => "lladdr" } } if detected_addresses - return detected_addresses.first + detected_addresses.first else - return "" + "" end end diff --git a/lib/ohai/plugins/gce.rb b/lib/ohai/plugins/gce.rb index 974adaff..0b2a0155 100644 --- a/lib/ohai/plugins/gce.rb +++ b/lib/ohai/plugins/gce.rb @@ -54,7 +54,7 @@ Ohai.plugin(:GCE) do computer_system = wmi.first_of("Win32_ComputerSystem") if computer_system["Manufacturer"] =~ /^Google/ && computer_system["Model"] =~ /^Google/ logger.trace("Plugin GCE: has_gce_system_info? == true") - return true + true end else logger.trace("Plugin GCE: has_gce_system_info? == false") diff --git a/lib/ohai/plugins/rackspace.rb b/lib/ohai/plugins/rackspace.rb index 3199723c..a435a1ee 100644 --- a/lib/ohai/plugins/rackspace.rb +++ b/lib/ohai/plugins/rackspace.rb @@ -54,7 +54,7 @@ Ohai.plugin(:Rackspace) do wmi = WmiLite::Wmi.new if wmi.first_of("Win32_ComputerSystem")["PrimaryOwnerName"] == "Rackspace" logger.trace("Plugin Rackspace: has_rackspace_manufacturer? == true") - return true + true end end |