Lots of updates

This commit is contained in:
Dan Milne
2025-11-11 16:54:52 +11:00
parent 26216da9ca
commit cc8213f87a
41 changed files with 1463 additions and 614 deletions

View File

@@ -138,12 +138,21 @@ class GeoliteAsnImporter
# Validate network format
IPAddr.new(network) # This will raise if invalid
# Store raw GeoLite ASN data in network_data
geolite_data = {
asn: {
autonomous_system_number: asn,
autonomous_system_organization: asn_org
}
}
NetworkRange.upsert(
{
network: network,
asn: asn,
asn_org: asn_org,
source: 'geolite_asn',
network_data: { geolite: geolite_data },
updated_at: Time.current
},
unique_by: :index_network_ranges_on_network_unique