mcmire-cache 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cache.rb +6 -5
- data/lib/cache/version.rb +1 -1
- data/test/test_nothing.rb +4 -0
- metadata +2 -2
data/lib/cache.rb
CHANGED
@@ -50,14 +50,15 @@ class Cache
|
|
50
50
|
def initialize(metal)
|
51
51
|
@pid = ::Process.pid
|
52
52
|
@config = Config.new
|
53
|
-
if metal
|
54
|
-
@metal = nil
|
55
|
-
client_class = 'Nothing'
|
56
|
-
driver_class = 'Nothing'
|
57
|
-
else
|
53
|
+
if metal != :nothing
|
58
54
|
@metal = Cache === metal ? metal.metal : metal
|
55
|
+
end
|
56
|
+
if @metal
|
59
57
|
client_class = @metal.class.to_s
|
60
58
|
driver_class = client_class.gsub('::', '')
|
59
|
+
else
|
60
|
+
client_class = 'Nothing'
|
61
|
+
driver_class = 'Nothing'
|
61
62
|
end
|
62
63
|
filename = client_class.
|
63
64
|
gsub(/([a-z])([A-Z]+)/) { [$1.downcase, $2.downcase].join('_') }.
|
data/lib/cache/version.rb
CHANGED
data/test/test_nothing.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mcmire-cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-11-16 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: Wraps memcached, redis(-namespace), memcache-client, dalli and handles
|
17
17
|
their weirdnesses, including forking
|