module RedisProviderFreedom

Constants

VERSION

Public Class Methods

current_redis() click to toggle source
# File lib/redis_provider_freedom.rb, line 11
def self.current_redis
  if current_uri
    Redis.new(:host => current_uri.host, :port => current_uri.port, :password => current_uri.password)
  else
    Redis.new
  end
end
current_uri() click to toggle source
# File lib/redis_provider_freedom.rb, line 5
def self.current_uri
  return unless ENV["REDIS_PROVIDER_URL_KEY"]

  URI.parse(ENV[ENV["REDIS_PROVIDER_URL_KEY"]])
end