Sha256: 2360d36b9e586d47ad186a726ad2ed614aeb0b0b3076ebca17199eb5fd9f91f8
Contents?: true
Size: 587 Bytes
Versions: 1
Compression:
Stored size: 587 Bytes
Contents
require 'memcached' class MemcacheAuth < Memcached def initialize(servers = nil, opts = {}) if !servers && ENV['MEMCACHE_SERVERS'] servers = ENV['MEMCACHE_SERVERS'].split(',') end super(servers, opts) end end class MemcacheAuth::Rails < Memcached::Rails def initialize(*args) opts = args.last.is_a?(Hash) ? args.pop : {} servers = Array( args.any? ? args.unshift : opts.delete(:servers) ).flatten.compact if !servers && ENV['MEMCACHE_SERVERS'] servers = ENV['MEMCACHE_SERVERS'].split(',') end super(servers, opts) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
memcache-auth-0.2.4 | lib/memcacheauth.rb |