alephant-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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bffd87081f54072fa6fc2d529398aac88e09661
4
- data.tar.gz: bff957d2d404bfb09aca76c16354a5da4b7fbfc2
3
+ metadata.gz: 0b5bf5c741587aefd5d88398fb5ec9412194f566
4
+ data.tar.gz: 831200ba65814a06a4993d3a6cae93bee54423cd
5
5
  SHA512:
6
- metadata.gz: c1d433f7652ff3561a4b29b5631d72335496bfb24cf78493d2e20d531c2206fbda63a2aa2d03e29c196dd8561d5d9e29b980fb534b2a08b059e763c757df07d0
7
- data.tar.gz: 031990a6cffb28cb84bb3cfa84212b78f9bbe4c86e429ad622166649a8f13c767e32266dab919a1519073ae4414e8230eda6a9f81b5f9af023252130e5bbabfe
6
+ metadata.gz: fbfce75cc5f65da0f6bf4d83a38c8835c6b6ae9d1d4d6448af565926044d21ce74e51853fdd13a9263310c1ee099cdf60ea9d28f27c5ef4e2b19c2b395ef602f
7
+ data.tar.gz: 0360a92c0a490b9cc3bd798b58dfd31e08f8ec68307ac77e92da0e155f096706b575dd8074a3fbd99839f80c6001aeadb1520a3a12961ddf5525cde62f8e5253
@@ -20,8 +20,14 @@ module Alephant
20
20
  logger.info("Cache.clear: #{path}")
21
21
  end
22
22
 
23
- def put(id, data)
24
- bucket.objects["#{path}/#{id}"].write(data)
23
+ def put(id, data, meta = {})
24
+ bucket.objects["#{path}/#{id}"].write(
25
+ data,
26
+ {
27
+ :metadata => meta
28
+ }
29
+ )
30
+
25
31
  logger.info("Cache.put: #{path}/#{id}")
26
32
  end
27
33
 
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  class Cache
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -48,7 +48,7 @@ describe Alephant::Cache do
48
48
  describe "put(id, data)" do
49
49
  it "sets bucket path/id content data" do
50
50
  s3_object_collection = double()
51
- s3_object_collection.should_receive(:write).with(:data)
51
+ s3_object_collection.should_receive(:write).with(:data,:metadata=>{})
52
52
 
53
53
  s3_bucket = double()
54
54
  s3_bucket.should_receive(:objects).and_return(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Kenny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-03 00:00:00.000000000 Z
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec