From efe713eb165a20ab754edb40d7e8403bced79f66 Mon Sep 17 00:00:00 2001 From: Alex Reisner Date: Sun, 7 Apr 2024 15:19:19 -0600 Subject: [PATCH] Make method public (it's called directly by rake task). --- lib/maxmind_database.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/maxmind_database.rb b/lib/maxmind_database.rb index fd07df948..6affe8370 100644 --- a/lib/maxmind_database.rb +++ b/lib/maxmind_database.rb @@ -35,6 +35,14 @@ def archive_filename(package) p[s..-1] end + def archive_edition(package) + { + geolite_country_csv: "GeoLite2-Country-CSV", + geolite_city_csv: "GeoLite2-City-CSV", + geolite_asn_csv: "GeoLite2-ASN-CSV" + }[package] + end + private # ------------------------------------------------------------- def table_columns(table_name) @@ -94,14 +102,6 @@ def archive_url(package) base_url + archive_url_path(package) end - def archive_edition(package) - { - geolite_country_csv: "GeoLite2-Country-CSV", - geolite_city_csv: "GeoLite2-City-CSV", - geolite_asn_csv: "GeoLite2-ASN-CSV" - }[package] - end - def base_url(edition) "https://download.maxmind.com/app/geoip_download?edition_id=#{edition}&license_key=#{ENV['LICENSE_KEY']}&suffix=zip" end