Skip to content

Commit

Permalink
jovian-hardware-survey: Ingest processor flags
Browse files Browse the repository at this point in the history
  • Loading branch information
samueldr committed Oct 27, 2024
1 parent f956e45 commit 2ccd015
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkgs/jovian-hardware-survey/jovian-hardware-survey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,14 @@ def board_information()
end

def processor_information()
dmi_info["Processor"]["data"]
dmi_info["Processor"]["data"].tap do
# Convert flags into a Hash, for converting into a JSON Object.
_1["Flags"] = _1["Flags"].split("\n").map do |line|
data = line.match(%r{^([^\s]+)\s+\((.*)\)$})
[data[1], data[2]]
end
.to_h
end
end

def memory_information()
Expand Down

0 comments on commit 2ccd015

Please sign in to comment.