lib-bootp 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lib/bootp/version.rb +1 -1
- data/lib/lib/bootp.rb +9 -9
- 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: 35f8b8b8e9cfea345c8c405e4557e6e8a8232c78968d913b6c7c926ba456dbe0
|
4
|
+
data.tar.gz: 5c4344e2a22b5543a2a0a870febd49f4da4d03c33f454a79eaa04718b0ecddd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55720d5ce4bb5e82d9c9d27adbcb86dcbf0d217679857f6aaf7a607727bc8568dcfdde44a5cfd02738d2f4b270543aced68985830b27a273e0f3f678a72b1780
|
7
|
+
data.tar.gz: de807d6fd9da0245e22c7d952e9d949b08471226618a6c473e883328276e23ac48479561d5477b8b125bddcfc98773053d6e48a9bc250900c78c392c5ccbedd4
|
data/lib/lib/bootp/version.rb
CHANGED
data/lib/lib/bootp.rb
CHANGED
@@ -173,8 +173,8 @@ module Lib
|
|
173
173
|
end
|
174
174
|
|
175
175
|
def self.from_json(json)
|
176
|
-
json = JSON.parse
|
177
|
-
|
176
|
+
json = json.is_a?(Hash) ? json: JSON.parse(json)
|
177
|
+
self.new(
|
178
178
|
op: json['op']['code'].to_i,
|
179
179
|
htype: json['htype']['code'].to_i,
|
180
180
|
hlen: json['hlen'].to_i,
|
@@ -182,13 +182,13 @@ module Lib
|
|
182
182
|
xid: json['xid'].to_i,
|
183
183
|
secs: json['secs'].to_i,
|
184
184
|
flags: json['flags'].to_i,
|
185
|
-
ciaddr: json['ciaddr']['address'],
|
186
|
-
yiaddr: json['yiaddr']['address'],
|
187
|
-
siaddr: json['siaddr']['address'],
|
188
|
-
giaddr: json['giaddr']['address'],
|
189
|
-
chaddr: json['chaddr'],
|
190
|
-
sname: json['sname'],
|
191
|
-
file: json['file']
|
185
|
+
ciaddr: json['ciaddr']['address'].to_s,
|
186
|
+
yiaddr: json['yiaddr']['address'].to_s,
|
187
|
+
siaddr: json['siaddr']['address'].to_s,
|
188
|
+
giaddr: json['giaddr']['address'].to_s,
|
189
|
+
chaddr: json['chaddr'].to_s,
|
190
|
+
sname: json['sname'].to_s,
|
191
|
+
file: json['file'].to_s
|
192
192
|
)
|
193
193
|
end
|
194
194
|
|