2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-04-10 17:37:29 +08:00
|
|
|
require_dependency 'discourse_ip_info'
|
2018-10-09 22:21:41 +08:00
|
|
|
|
|
|
|
desc "downloads MaxMind's GeoLite2-City database"
|
2019-05-28 06:59:28 +08:00
|
|
|
task "maxminddb:get" => :environment do
|
2019-04-10 17:37:29 +08:00
|
|
|
puts "Downloading MaxMindDb's GeoLite2-City..."
|
|
|
|
DiscourseIpInfo.mmdb_download('GeoLite2-City')
|
2018-10-09 22:21:41 +08:00
|
|
|
|
2019-04-10 17:37:29 +08:00
|
|
|
puts "Downloading MaxMindDb's GeoLite2-ASN..."
|
|
|
|
DiscourseIpInfo.mmdb_download('GeoLite2-ASN')
|
2018-10-09 22:21:41 +08:00
|
|
|
end
|