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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21564d955c7fdeaa4da5659b23af34e3ef33a502
4
- data.tar.gz: 16c0a32c23c662d1711ac3a1b0dd47bf78707fc5
3
+ metadata.gz: 67133b9825da574c91e2aee2abb4f3d95075bfc5
4
+ data.tar.gz: ccc58c05bc58e0b1419b977ad81990051fde836b
5
5
  SHA512:
6
- metadata.gz: a624addb8fd71e993b43550c1c3b7b6359a84ebd2f4918f46f6483836c177933a17ae2ff13267d8ab109386b5ccf6be91dccdffc85ba4aced97766b92ff5b3c8
7
- data.tar.gz: 762a3e88c051ca923ed0a6a07a40ad09a24031df8059490715658e26f26b4277f9f92af65906cc5d303bb2b8ace09d4b5a7b31ff6f4dd9c5d00915c82e6754fd
6
+ metadata.gz: fbfdeb319884379d2396b471a601c227a6c76b95b257d4f0f91a5d9672e6a51ddb128a8b023d5d3d3e2cb91c7f875ff855a609405f7cd3119de231c9b45f1c73
7
+ data.tar.gz: 87af628f6c06d0bda4e6bb90170ce454c2a224fb177e589efbaced7f999778124420366ed85cad7e0bd43f0df5da1c20d687cbae8fa33af32eb9540bb6e1917c
@@ -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.backends[storage].new(@options || {}) { |d,k| d[k] = [] }
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(storage, options)
26
- @storage = storage
27
- @options = options
28
- @data = nil
31
+ def store_in(*args)
32
+ @storage = *args
33
+ @data = nil
29
34
  end
30
35
 
31
36
  def storage
@@ -1,3 +1,3 @@
1
1
  module Cistern
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
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.0
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-15 00:00:00.000000000 Z
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: