local_cache 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -80,25 +80,25 @@ class LocalCache < ActiveSupport::Cache::Store
80
80
 
81
81
  def read(name, options={})
82
82
  # puts 'read from localcache'
83
- super
83
+ # super
84
84
  ret = get(name, options)
85
85
  # puts 'ret.frozen=' + ret.frozen?.to_s
86
86
  return ret
87
87
  end
88
88
 
89
89
  def write(name, value, options={})
90
- super
90
+ # super
91
91
  put(name, value, options)
92
92
  # puts 'write.frozen=' + value.frozen?.to_s
93
93
  end
94
94
 
95
95
  def delete(name, options={})
96
- super
96
+ # super
97
97
  @cache.delete(name)
98
98
  end
99
99
 
100
100
  def delete_matched(matcher, options={})
101
- super
101
+ # super
102
102
  raise "delete_matched not supported by LocalCache"
103
103
  end
104
104
 
@@ -5,9 +5,12 @@ class LocalCacheTests < Test::Unit::TestCase
5
5
 
6
6
  def test_put_get
7
7
 
8
+ key = "tk"
9
+ to_put = "something"
8
10
  cache = ActiveSupport::Cache::LocalCache.new
9
- cache.write("tk", "somethign")
11
+ cache.write(key, to_put)
10
12
  puts 'read=' + cache.read("tk").inspect
13
+ assert cache.read("tk") == to_put
11
14
 
12
15
  end
13
16
 
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: local_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 2
8
+ - 2
9
+ version: 1.2.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - Travis Reeder
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-11-20 00:00:00 -08:00
17
+ date: 2010-09-19 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -24,6 +29,7 @@ extra_rdoc_files:
24
29
  files:
25
30
  - lib/local_cache.rb
26
31
  - README.markdown
32
+ - test/local_cache_tests.rb
27
33
  has_rdoc: true
28
34
  homepage: http://github.com/appoxy/local_cache/
29
35
  licenses: []
@@ -34,21 +40,25 @@ rdoc_options:
34
40
  require_paths:
35
41
  - lib
36
42
  required_ruby_version: !ruby/object:Gem::Requirement
43
+ none: false
37
44
  requirements:
38
45
  - - ">="
39
46
  - !ruby/object:Gem::Version
47
+ segments:
48
+ - 0
40
49
  version: "0"
41
- version:
42
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
+ none: false
43
52
  requirements:
44
53
  - - ">="
45
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
46
57
  version: "0"
47
- version:
48
58
  requirements: []
49
59
 
50
60
  rubyforge_project:
51
- rubygems_version: 1.3.5
61
+ rubygems_version: 1.3.7
52
62
  signing_key:
53
63
  specification_version: 3
54
64
  summary: Similar to Rails' built in MemoryStore, but adds size limit and expiration.