kanrisuru 0.16.4 → 0.16.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/kanrisuru/core/dmi/parsers/dmi.rb +14 -10
- data/lib/kanrisuru/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44eda2d0bb8165ff1df3d763531ffdb64a442b390e6e97ccda473105ddd8b04b
|
4
|
+
data.tar.gz: 14967498be11e552b7f546984173abf279387649da8fc9d45a98b42ed06aaa4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c281ab5f1e6fa063a5f11df3cb7138fe0acd19bb810aaf2e01685b847a1ec7d972420c86e155bc32b23a9d9bf1796077dfa753edfa0c62f7ec671ee81198d09
|
7
|
+
data.tar.gz: 7c64b72d543a18e1eee6d8dad9530c7e281a3856003b15d5587bf1351dd55fbbb49a8177e2c8a8cc749549f587e2b42fe76692dd436f0b1d9f57431d9e36cb9e
|
data/CHANGELOG.md
CHANGED
@@ -93,37 +93,41 @@ module Kanrisuru
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def dmi_field_translate(struct, field)
|
96
|
-
field = field
|
97
|
-
field = field.gsub(/\s/, '_')
|
98
|
-
field = field.gsub('-', '_')
|
99
|
-
field = field.gsub(':', '')
|
96
|
+
field = dmi_scrub_field(field)
|
100
97
|
|
101
98
|
case struct.dmi_type
|
102
99
|
when 'Memory Device'
|
103
100
|
case field
|
104
101
|
when 'size'
|
105
|
-
|
102
|
+
'mem_size'
|
106
103
|
end
|
107
104
|
when 'System Slots'
|
108
105
|
case field
|
109
106
|
when 'length'
|
110
|
-
|
107
|
+
'slot_length'
|
111
108
|
end
|
112
109
|
when 'OEM Strings'
|
113
110
|
case field
|
114
111
|
when /^string/
|
115
|
-
|
112
|
+
'strings'
|
116
113
|
end
|
117
114
|
when 'Boot Integrity Services'
|
118
115
|
case field
|
119
116
|
when '16_bit_entry_point_address'
|
120
|
-
|
117
|
+
'sixteen_bit_entry_point_address'
|
121
118
|
when '32_bit_entry_point_address'
|
122
|
-
|
119
|
+
'thirty_two_bit_entry_point_address'
|
123
120
|
end
|
121
|
+
else
|
122
|
+
field
|
124
123
|
end
|
124
|
+
end
|
125
125
|
|
126
|
-
|
126
|
+
def dmi_scrub_field(field)
|
127
|
+
field = field.downcase
|
128
|
+
field = field.gsub(/\s/, '_')
|
129
|
+
field = field.gsub('-', '_')
|
130
|
+
field.gsub(':', '')
|
127
131
|
end
|
128
132
|
|
129
133
|
def dmi_type_to_struct(type)
|
data/lib/kanrisuru/version.rb
CHANGED