diff options
author | Thom May <thom@may.lt> | 2018-03-07 09:36:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 09:36:21 +0000 |
commit | 5be5fe42f0c6a5bec109e0136e0eb42fc975e202 (patch) | |
tree | 636e072786c5aa143ce3cd964da1548f5b1ea818 /lib/ohai/plugins/dmi.rb | |
parent | 3627eb769d3dd25098cf0cb34a4090c2e2e0b0df (diff) | |
parent | 011db28d6c3026ac41b9c519a87643d70ecf9be5 (diff) | |
download | ohai-5be5fe42f0c6a5bec109e0136e0eb42fc975e202.tar.gz |
Merge pull request #1153 from chef/green_travis
Fix chefstyle issues in ohai
Diffstat (limited to 'lib/ohai/plugins/dmi.rb')
-rw-r--r-- | lib/ohai/plugins/dmi.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ohai/plugins/dmi.rb b/lib/ohai/plugins/dmi.rb index ed7ae9f2..3ff982cf 100644 --- a/lib/ohai/plugins/dmi.rb +++ b/lib/ohai/plugins/dmi.rb @@ -60,21 +60,21 @@ Ohai.plugin(:DMI) do next if blank_line.match(line) line = line.encode(line.encoding, :universal_newline => true) - if dmidecode_version = dmidecode_version_line.match(line) + if ( dmidecode_version = dmidecode_version_line.match(line) ) dmi[:dmidecode_version] = dmidecode_version[1] - elsif smbios_version = smbios_version_line.match(line) + elsif ( smbios_version = smbios_version_line.match(line) ) dmi[:smbios_version] = smbios_version[1] - elsif structures = structures_line.match(line) + elsif ( structures = structures_line.match(line) ) dmi[:structures] = Mash.new dmi[:structures][:count] = structures[1] dmi[:structures][:size] = structures[2] - elsif table_location = table_location_line.match(line) + elsif ( table_location = table_location_line.match(line) ) dmi[:table_location] = table_location[1] - elsif handle = handle_line.match(line) + elsif ( handle = handle_line.match(line) ) # Don't overcapture for now (OHAI-260) unless Ohai::Common::DMI::ID_TO_CAPTURE.include?(handle[2].to_i) dmi_record = nil @@ -91,14 +91,14 @@ Ohai.plugin(:DMI) do dmi[dmi_record[:type]][:all_records][dmi_record[:position]][:size] = handle[2] field = nil - elsif type = type_line.match(line) + elsif ( type = type_line.match(line) ) if dmi_record .nil? Ohai::Log.debug("Plugin DMI: unexpected data line found before header; discarding:\n#{line}") next end dmi[dmi_record[:type]][:all_records][dmi_record[:position]][:application_identifier] = type[1] - elsif data = data_line.match(line) + elsif ( data = data_line.match(line) ) if dmi_record .nil? Ohai::Log.debug("Plugin DMI: unexpected data line found before header; discarding:\n#{line}") next @@ -106,7 +106,7 @@ Ohai.plugin(:DMI) do dmi[dmi_record[:type]][:all_records][dmi_record[:position]][data[1]] = data[2] field = data[1] - elsif extended_data = extended_data_line.match(line) + elsif ( extended_data = extended_data_line.match(line) ) if dmi_record .nil? Ohai::Log.debug("Plugin DMI: unexpected extended data line found before header; discarding:\n#{line}") next |