cistern 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cistern/data.rb +10 -5
- data/lib/cistern/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67133b9825da574c91e2aee2abb4f3d95075bfc5
|
4
|
+
data.tar.gz: ccc58c05bc58e0b1419b977ad81990051fde836b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbfdeb319884379d2396b471a601c227a6c76b95b257d4f0f91a5d9672e6a51ddb128a8b023d5d3d3e2cb91c7f875ff855a609405f7cd3119de231c9b45f1c73
|
7
|
+
data.tar.gz: 87af628f6c06d0bda4e6bb90170ce454c2a224fb177e589efbaced7f999778124420366ed85cad7e0bd43f0df5da1c20d687cbae8fa33af32eb9540bb6e1917c
|
data/lib/cistern/data.rb
CHANGED
@@ -8,9 +8,15 @@ module Cistern::Data
|
|
8
8
|
@backends ||= {}
|
9
9
|
end
|
10
10
|
|
11
|
+
def self.backend(*args, &block)
|
12
|
+
engine, options = args
|
13
|
+
|
14
|
+
Cistern::Data.backends[engine].new(options || {}, &block)
|
15
|
+
end
|
16
|
+
|
11
17
|
module ClassMethods
|
12
18
|
def data
|
13
|
-
@data ||= Cistern::Data.
|
19
|
+
@data ||= Cistern::Data.backend(*storage) { |d,k| d[k] = [] }
|
14
20
|
end
|
15
21
|
|
16
22
|
def reset!
|
@@ -22,10 +28,9 @@ module Cistern::Data
|
|
22
28
|
self.data.clear
|
23
29
|
end
|
24
30
|
|
25
|
-
def store_in(
|
26
|
-
@storage =
|
27
|
-
@
|
28
|
-
@data = nil
|
31
|
+
def store_in(*args)
|
32
|
+
@storage = *args
|
33
|
+
@data = nil
|
29
34
|
end
|
30
35
|
|
31
36
|
def storage
|
data/lib/cistern/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cistern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: API client framework extracted from Fog
|
14
14
|
email:
|