Class: Autometal::Geoip::Installer

Inherits:
Object
  • Object
show all
Defined in:
lib/geoip/installer.rb

Overview

Installer class that handles downloading and installing databases and binaries

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

Constructor Details

#initialize(package_name = "GeoLiteCity") ⇒ Installer

Returns a new instance of Installer.



11
12
13
14
15
16
# File 'lib/geoip/installer.rb', line 11

def initialize package_name = "GeoLiteCity"
  @package_name = package_name
  @db_url = BASE_DB_URL.gsub("*",@package_name)
  install_binary
  install_database
end