cache-backend-iron-cache 0.0.3 → 0.0.4

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.
@@ -1,3 +1,7 @@
1
+ # 0.0.4
2
+
3
+ * Fixes return values of setters
4
+
1
5
  # 0.0.3
2
6
 
3
7
  * Eases JSON dependency
@@ -19,6 +19,7 @@ module Cache
19
19
 
20
20
  def set(key, value)
21
21
  @client.put(key, JSON.dump({value: value}))
22
+ value
22
23
  end
23
24
  end
24
25
  end
@@ -1,7 +1,7 @@
1
1
  module Cache
2
2
  module Backend
3
3
  class IronCache
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
@@ -13,7 +13,7 @@ describe Cache::Backend::IronCache do
13
13
  # that's ok
14
14
  end
15
15
  @client.get('a-key').must_be_nil
16
- @client.set('a-key', 'some info')
16
+ @client.set('a-key', 'some info').must_equal('some info')
17
17
  @client.get('a-key').must_equal('some info')
18
18
 
19
19
  @ironcache.get('a-key').value.must_equal(JSON.dump("value" => "some info"))
@@ -36,4 +36,13 @@ describe Cache::Backend::IronCache do
36
36
  @client.set('a-key', 34.546)
37
37
  @client.get('a-key').must_equal(34.546)
38
38
  end
39
+
40
+ it "can fetch stuff" do
41
+ @client.set(['bla', 0], nil)
42
+ @client.fetch(['bla', 0]) do
43
+ "Hello"
44
+ end.must_equal "Hello"
45
+
46
+ @client.get(['bla', 0]).must_equal('Hello')
47
+ end
39
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache-backend-iron-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: