Class: Autometal::Geoip::Installer
- Inherits:
-
Object
- Object
- Autometal::Geoip::Installer
- Defined in:
- lib/geoip/installer.rb
Overview
Installer class that handles downloading and installing GeoIP databases and binaries
It will call the two shellscripts included in <gem_root>/shellscripts/
Constant Summary collapse
- BASE_DB_URL =
"http://geolite.maxmind.com/download/geoip/database/*.dat.gz"
- PACKAGE_URL =
"http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz"
Instance Method Summary collapse
-
#initialize(package_name = "GeoLiteCity") ⇒ Installer
constructor
A new instance of Installer.
Constructor Details
#initialize(package_name = "GeoLiteCity") ⇒ Installer
Returns a new instance of Installer.
12 13 14 15 16 17 |
# File 'lib/geoip/installer.rb', line 12 def initialize package_name = "GeoLiteCity" @package_name = package_name @db_url = BASE_DB_URL.gsub("*",@package_name) install_binary install_database end |