lib/rack/geoip/lookup.rb in rack-geoip-0.1.1 vs lib/rack/geoip/lookup.rb in rack-geoip-0.1.2

- old
+ new

@@ -3,15 +3,15 @@ module Rack::Geoip # Implements Rack's middleware interface and provides the geoip # lookup service class Lookup - DEFAULT = {:path => '/geoip/lookup', :db => 'GeoLiteCity.dat'} + DEFAULT = {:path => '/geoip/lookup', :db => 'GeoLiteCity.dat', :db_lookup => :memory} def initialize(app, options={}) @app, @options = app, DEFAULT.merge(options) - @db = GeoIPCity::Database.new(@options[:db]) + @db = GeoIPCity::Database.new(@options[:db], @options[:db_lookup]) end def call(env) dup._call(env) end @@ -27,6 +27,6 @@ else @app.call(env) end end end -end \ No newline at end of file +end