Sha256: fde8f15b1100949890f8262facf11db63cec6c80fc2f82a7c015a87a79d1869a

Contents?: true

Size: 1.5 KB

Versions: 1

Compression:

Stored size: 1.5 KB

Contents

require 'rubygems'
require 'net/http'
require 'json'
require 'logger'
require 'activesupport'

$:.unshift(File.dirname(__FILE__))
require 'core_ext'
require 'class_to_proc'
require 'endeca/logging'
require 'endeca/benchmarking'
require 'endeca/readers'
require 'endeca/map'
require 'endeca/transformer'
require 'endeca/dimension'
require 'endeca/refinement_dimension'
require 'endeca/refinement'
require 'endeca/breadcrumbs'
require 'endeca/breadcrumb'
require 'endeca/request'
require 'endeca/document_collection'
require 'endeca/document'


module Endeca
  extend Benchmarking
  extend Logging

  # :stopdoc:
  VERSION = '1.3.6'
  # :startdoc:

  # Returns the version string for the library.
  def self.version
    VERSION
  end

  # Set Endeca.debug = true to turn on query logging
  # Set Endeca.benchmark = true to turn on query benchmarking
  class << self
    attr_accessor :logger
    attr_accessor :debug
    attr_accessor :benchmark
    attr_accessor :timeout

    def analyze?
      debug && logger && benchmark
    end

    def timer
      @timer ||= get_timer
    end

    private

    def get_timer
      require 'system_timer'
      SystemTimer
    rescue LoadError
      require 'timeout'
      Timeout
    end
  end

  self.logger = Logger.new(STDOUT)
  self.debug  = false
  self.benchmark  = false
  self.timeout = 8


  # Endeca URIs require colons to be escaped
  def self.escape(str)
    URI.escape(str, /[^-_.!~*'()a-zA-Z\d;\/?@&=+$,\[\]]/n)
  end
end

puts ">> Using Endeca gem version: #{Endeca::VERSION}"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
primedia-endeca-1.3.6 lib/endeca.rb