lib/endeca.rb in endeca-1.3.8 vs lib/endeca.rb in endeca-1.4.0
- old
+ new
@@ -1,13 +1,11 @@
-require 'rubygems'
-require 'net/http'
-require 'json'
+require 'curb'
+require 'yajl'
require 'logger'
$:.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'
@@ -24,11 +22,11 @@
module Endeca
extend Benchmarking
extend Logging
# :stopdoc:
- VERSION = '1.3.8'
+ VERSION = '1.4.0'
# :startdoc:
# Returns the version string for the library.
def self.version
VERSION
@@ -44,29 +42,15 @@
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