memcache-auth 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ Echoe.new("memcache-auth") do |p|
8
8
  p.docs_host = "blog.evanweaver.com:~/www/bax/public/files/doc/"
9
9
  p.rdoc_pattern = /README|TODO|LICENSE|CHANGELOG|BENCH|COMPAT|exceptions|behaviors|rails.rb|memcached.rb|memcacheauth.rb/
10
10
  p.clean_pattern += ["ext/lib", "ext/include", "ext/share", "ext/libmemcached-?.??", "ext/bin", "ext/conftest.dSYM"]
11
- p.version = '0.2.2'
11
+ p.version = '0.2.3'
12
12
  end
13
13
 
14
14
  task :exceptions do
data/lib/memcacheauth.rb CHANGED
@@ -9,6 +9,16 @@ class MemcacheAuth < Memcached
9
9
  end
10
10
  end
11
11
 
12
- class MemcacheAuth::Rails < MemcacheAuth
13
- MemCacheError = Memcached::Error
12
+ class MemcacheAuth::Rails < Memcached::Rails
13
+ def initialize(opts = {})
14
+ opts = args.last.is_a?(Hash) ? args.pop : {}
15
+ servers = Array(
16
+ args.any? ? args.unshift : opts.delete(:servers)
17
+ ).flatten.compact
18
+
19
+ if !servers && ENV['MEMCACHE_SERVERS']
20
+ servers = ENV['MEMCACHE_SERVERS'].split(',')
21
+ end
22
+ super(servers, opts)
23
+ end
14
24
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{memcache-auth}
5
- s.version = "0.2.2"
5
+ s.version = "0.2.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver - updated by NorthScale for auth support"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memcache-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver - updated by NorthScale for auth support