Sha256: cc66146152f53e228a31dced3bb6631d9262b919d9392ebb9b78f9be4f83ef1c

Contents?: true

Size: 777 Bytes

Versions: 1

Compression:

Stored size: 777 Bytes

Contents

gem 'redis', '~> 1.0'
gem 'activesupport', '~> 2.3'
gem 'actionpack', '~> 2.3'

require 'redis'
require 'active_support'
require 'action_controller'

require 'redis_store/marshalled_client'
require 'redis_store/cache/redis_store'
require 'redis_store/session/redis_session_store'

class RedisStore
  class Config < Hash
    def initialize(address_or_options)
      options = if address_or_options.is_a?(Hash)
        address_or_options
      else
        host, port = address_or_options.split(/\:/)
        port, db = port.split(/\//) if port
        { :host => host, :port => port, :db => db }
      end

      self[:host] = options[:host] if options[:host]
      self[:port] = options[:port] if options[:port]
      self[:db] = options[:db] if options[:db]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redis_store_jr-0.2.0 lib/redis_store.rb