108874730-depp_parsing changed

This commit is contained in:
Stas 2015-12-16 17:55:56 +02:00
parent 4ee7294a3f
commit c54bc69936

View file

@ -152,23 +152,17 @@ module Depp
} }
end end
data.css('dsData').each_with_index do |x, i| data.css('keyData').each_with_index do |x, i|
ds = { ret[:dnskeys_attributes][i] = {
ds_key_tag: x.css('keyTag').first.try(:text), flags: x.css('flags').text,
ds_alg: x.css('alg').first.try(:text), protocol: x.css('protocol').text,
ds_digest_type: x.css('digestType').first.try(:text), alg: x.css('alg').text,
ds_digest: x.css('digest').first.try(:text) public_key: x.css('pubKey').text,
ds_key_tag: x.css('keyTag').first.try(:text),
ds_alg: x.css('alg').first.try(:text),
ds_digest_type: x.css('digestType').first.try(:text),
ds_digest: x.css('digest').first.try(:text)
} }
kd = x.css('keyData').first
ds.merge!({
flags: kd.css('flags').first.try(:text),
protocol: kd.css('protocol').first.try(:text),
alg: kd.css('alg').first.try(:text),
public_key: kd.css('pubKey').first.try(:text)
}) if kd
ret[:dnskeys_attributes][i] = ds
end end
data.css('status').each_with_index do |x, i| data.css('status').each_with_index do |x, i|