gmalamid-key_value_store 0.0.1 → 0.0.2
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.
- data/README.rdoc +3 -0
- data/key_value_store.gemspec +1 -1
- data/lib/key_value_store.rb +5 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -40,3 +40,6 @@ stores. Objects are serialized in JSON on storage and deserialized on retrieval.
|
|
40
40
|
|
41
41
|
#iterate
|
42
42
|
store.each {|guitar| puts guitar.color}
|
43
|
+
|
44
|
+
|
45
|
+
A word of caution: KeyValueStore doesn't support HashWithIndifferentAccess/Mash type of functionality, so hash keys will be strings on unmarshaling, even if the storage hash was created with symbols.
|
data/key_value_store.gemspec
CHANGED
data/lib/key_value_store.rb
CHANGED
@@ -55,6 +55,10 @@ module KeyValueStore
|
|
55
55
|
def sync
|
56
56
|
connection.sync
|
57
57
|
end
|
58
|
+
|
59
|
+
def copy(path)
|
60
|
+
connection.copy(path)
|
61
|
+
end
|
58
62
|
|
59
63
|
def rm_f
|
60
64
|
path = connection.path
|
@@ -143,7 +147,7 @@ module KeyValueStore
|
|
143
147
|
end
|
144
148
|
|
145
149
|
class MemoryHash
|
146
|
-
def initialize(type)
|
150
|
+
def initialize(store_name, type, permission = :write)
|
147
151
|
@type = type
|
148
152
|
end
|
149
153
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmalamid-key_value_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Jones, Andy Kent, George Malamidis
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-08 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|