lib/ahoy.rb in ahoy_matey-1.0.2 vs lib/ahoy.rb in ahoy_matey-1.1.0

- old
+ new

@@ -3,10 +3,11 @@ require "geocoder" require "referer-parser" require "user_agent_parser" require "request_store" require "uuidtools" +require "errbase" require "ahoy/version" require "ahoy/tracker" require "ahoy/controller" require "ahoy/model" @@ -22,10 +23,18 @@ require "ahoy/stores/log_store" require "ahoy/stores/mongoid_store" require "ahoy/engine" require "ahoy/warden" if defined?(Warden) +# background jobs +begin + require "active_job" +rescue LoadError + # do nothing +end +require "ahoy/geocode_job" if defined?(ActiveJob) + # deprecated require "ahoy/subscribers/active_record" module Ahoy UUID_NAMESPACE = UUIDTools::UUID.parse("a82ae811-5011-45ab-a728-569df7499c5f") @@ -41,9 +50,12 @@ mattr_accessor :track_visits_immediately self.track_visits_immediately = false mattr_accessor :quiet self.quiet = true + + mattr_accessor :geocode + self.geocode = true def self.ensure_uuid(id) valid = UUIDTools::UUID.parse(id) rescue nil if valid id