cache_method 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/cache_method.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_dependency 'cache', '>=0.1.2'
21
+ s.add_dependency 'cache', '>=0.2.1'
22
22
  s.add_development_dependency 'memcached'
23
23
  # if RUBY_VERSION >= '1.9'
24
24
  # s.add_development_dependency 'ruby-debug19'
@@ -25,12 +25,8 @@ module CacheMethod
25
25
  #
26
26
  # Example:
27
27
  # CacheMethod.config.storage = Memcached.new '127.0.0.1:11211'
28
- def storage=(raw_client_or_nil)
29
- if raw_client_or_nil.is_a?(::Cache)
30
- @storage = raw_client_or_nil
31
- else
32
- @storage = ::Cache.new raw_client_or_nil
33
- end
28
+ def storage=(storage = nil)
29
+ @storage = ::Cache.wrap storage
34
30
  end
35
31
 
36
32
  def storage #:nodoc:
@@ -1,3 +1,3 @@
1
1
  module CacheMethod
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/cache_method.rb CHANGED
@@ -65,5 +65,5 @@ end
65
65
 
66
66
  unless ::Object.method_defined? :cache_method
67
67
  ::Object.send :include, ::CacheMethod::InstanceMethods
68
- ::Object.extend ::CacheMethod::ClassMethods
68
+ ::Class.send :include, ::CacheMethod::ClassMethods
69
69
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_method
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-24 00:00:00 -06:00
18
+ date: 2011-03-07 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 31
29
+ hash: 21
30
30
  segments:
31
31
  - 0
32
- - 1
33
32
  - 2
34
- version: 0.1.2
33
+ - 1
34
+ version: 0.2.1
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency