class ActiveTracker::Configuration
Public Class Methods
authentication(&block)
click to toggle source
# File lib/active_tracker/configuration.rb, line 54 def self.authentication(&block) if block @@authentication = block end @@authentication ||= nil end
authentication=(value)
click to toggle source
# File lib/active_tracker/configuration.rb, line 61 def self.authentication=(value) @@authentication = value end
mountpoint()
click to toggle source
# File lib/active_tracker/configuration.rb, line 33 def self.mountpoint @@mountpoint ||= "activetracker" end
mountpoint=(path)
click to toggle source
# File lib/active_tracker/configuration.rb, line 41 def self.mountpoint=(path) @@mountpoint = path end
per_page()
click to toggle source
# File lib/active_tracker/configuration.rb, line 49 def self.per_page @@per_page ||= 20 @@per_page.to_i end
per_page=(value)
click to toggle source
# File lib/active_tracker/configuration.rb, line 45 def self.per_page=(value) @@per_page = value end
plugins()
click to toggle source
# File lib/active_tracker/configuration.rb, line 3 def self.plugins @@plugins ||= [ ActiveTracker::Plugin::Request, ] @@plugins end
plugins=(items)
click to toggle source
# File lib/active_tracker/configuration.rb, line 10 def self.plugins=(items) items.each do |i| if i.respond_to?(:register) i.register else raise PluginInvalidError.new("#{i.name} doesn't correctly implement the ActiveTracker API") end end @@plugins = items.dup end
redis_url()
click to toggle source
# File lib/active_tracker/configuration.rb, line 22 def self.redis_url @@redis_url ||= "redis://localhost:6379/15" end
redis_url=(url)
click to toggle source
# File lib/active_tracker/configuration.rb, line 26 def self.redis_url=(url) unless url.start_with?("redis://") raise PluginInvalidError.new("redis_url isn't a valid Redis URL - should begin with redis://") end @@redis_url = url end
root_path()
click to toggle source
# File lib/active_tracker/configuration.rb, line 37 def self.root_path "/#{mountpoint}" end