lib/nexaas/auditor/statistics_trackers/stathat.rb in nexaas-auditor-1.0.4 vs lib/nexaas/auditor/statistics_trackers/stathat.rb in nexaas-auditor-1.1.0

- old
+ new

@@ -1,7 +1,5 @@ -require 'stathat' - module Nexaas module Auditor module StatisticsTrackers class Stathat < Base @@ -9,9 +7,12 @@ def initialize(key, namespace=nil) @key = key.to_s @namespace = namespace.to_s @logger = Nexaas::Auditor.configuration.logger + if Nexaas::Auditor.configuration.statistics_service == 'stathat' + require 'stathat' + end raise ArgumentError, "required Stathat EZ Key not found" if @key == '' end private