iron_cache 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +4 -4
- data/iron_cache.gemspec +1 -1
- data/lib/iron_cache/caches.rb +5 -0
- data/lib/iron_cache/client.rb +1 -1
- data/lib/iron_cache/items.rb +4 -1
- data/lib/iron_cache/version.rb +1 -1
- data/test/test_iron_cache.rb +10 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
iron_cache (1.1.
|
5
|
-
iron_core (>= 0.
|
4
|
+
iron_cache (1.1.2)
|
5
|
+
iron_core (>= 0.4.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
iron_core (0.
|
11
|
-
rest (>= 2.0.
|
10
|
+
iron_core (0.4.1)
|
11
|
+
rest (>= 2.0.2)
|
12
12
|
memcache-client (1.8.5)
|
13
13
|
mime-types (1.19)
|
14
14
|
minitest (3.3.0)
|
data/iron_cache.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
|
17
17
|
gem.required_rubygems_version = ">= 1.3.6"
|
18
18
|
gem.required_ruby_version = Gem::Requirement.new(">= 1.9")
|
19
|
-
gem.add_runtime_dependency "iron_core", ">= 0.
|
19
|
+
gem.add_runtime_dependency "iron_core", ">= 0.4.0"
|
20
20
|
|
21
21
|
gem.add_development_dependency "test-unit"
|
22
22
|
gem.add_development_dependency "minitest"
|
data/lib/iron_cache/caches.rb
CHANGED
@@ -91,6 +91,11 @@ module IronCache
|
|
91
91
|
@client.items.get(k, options.merge(:cache_name=>name))
|
92
92
|
end
|
93
93
|
|
94
|
+
# Returns the url to this item. It does not actually get the item
|
95
|
+
def url(k, options={})
|
96
|
+
@client.items.url(k, options.merge(:cache_name=>name))
|
97
|
+
end
|
98
|
+
|
94
99
|
def delete(k, options={})
|
95
100
|
@client.items.delete(k, options.merge(:cache_name=>name))
|
96
101
|
end
|
data/lib/iron_cache/client.rb
CHANGED
data/lib/iron_cache/items.rb
CHANGED
@@ -29,7 +29,10 @@ module IronCache
|
|
29
29
|
end
|
30
30
|
raise ex
|
31
31
|
end
|
32
|
+
end
|
32
33
|
|
34
|
+
def url(key, options={})
|
35
|
+
@client.url(path(key, options))
|
33
36
|
end
|
34
37
|
|
35
38
|
# options:
|
@@ -104,7 +107,7 @@ module IronCache
|
|
104
107
|
end
|
105
108
|
|
106
109
|
def delete
|
107
|
-
@messages.delete(self.key)
|
110
|
+
@messages.delete(self.key, cache_name: raw['cache'])
|
108
111
|
end
|
109
112
|
end
|
110
113
|
|
data/lib/iron_cache/version.rb
CHANGED
data/test/test_iron_cache.rb
CHANGED
@@ -70,6 +70,16 @@ class IronCacheTests < TestBase
|
|
70
70
|
assert res.nil?
|
71
71
|
|
72
72
|
|
73
|
+
# different cache names
|
74
|
+
c = @client.cache("new_style")
|
75
|
+
c.put(k, v)
|
76
|
+
item = c.get(k)
|
77
|
+
assert_equal v, item.value
|
78
|
+
item.delete
|
79
|
+
item = c.get(k)
|
80
|
+
assert_nil item
|
81
|
+
|
82
|
+
|
73
83
|
end
|
74
84
|
|
75
85
|
def test_caches
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: iron_core
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.4.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.4.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: test-unit
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|