Sha256: ff33a9b6bbbf1267715823a62022d885f435034af0fa1c6f22cdcc190bbee4b8
Contents?: true
Size: 1.1 KB
Versions: 9
Compression:
Stored size: 1.1 KB
Contents
class AllSeeingEye def self.environment ENV['RUBBER_ENV'] || ENV['RAILS_ENV'] || ENV['ALL_SEEING_EYE_ENV'] || 'development' end def self.configuration location = ENV['ALL_SEEING_EYE_CONFIG'] || 'config' @@configuration ||= Hash.new @@configuration[:redis] ||= begin YAML::load_file("./#{location}/resque.yml")[AllSeeingEye.environment] rescue begin YAML::load_file("./#{location}/redis.yml")[AllSeeingEye.environment] rescue 'localhost:6379' end end @@configuration[:all_seeing_eye] ||= YAML::load_file("./#{location}/all_seeing_eye.yml") @@configuration end def self.redis @@redis ||= Redis.new(:host => AllSeeingEye.configuration[:redis].split(':').first, :port => AllSeeingEye.configuration[:redis].split(':').last) end end require 'redis' require 'yaml' require 'chronic' require 'rbtree' require 'active_support' require 'active_support/all' require 'all_seeing_eye/model' require 'all_seeing_eye/models/request' require 'all_seeing_eye/integrations/rails2' if defined?(Rails)
Version data entries
9 entries across 9 versions & 1 rubygems