Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chefstyle fixes from Rubocop 0.80 #1431

Merged
merged 1 commit into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ohai/plugins/c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def xcode_installed?
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.")
Expand Down
2 changes: 1 addition & 1 deletion lib/ohai/plugins/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
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')
Expand Down
2 changes: 1 addition & 1 deletion lib/ohai/plugins/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def has_ec2_identifying_number?
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")
Expand Down
4 changes: 2 additions & 2 deletions lib/ohai/plugins/eucalyptus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
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

Expand Down
2 changes: 1 addition & 1 deletion lib/ohai/plugins/gce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def has_gce_system_info?
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")
Expand Down
2 changes: 1 addition & 1 deletion lib/ohai/plugins/rackspace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def has_rackspace_manufacturer?
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

Expand Down