kvj 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.
- checksums.yaml +4 -4
- data/lib/kvj.rb +9 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db683924cd739a41874d4a32113455412d463c18
|
4
|
+
data.tar.gz: ed0981e3425f16b407be7a168641919e91f5860e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 131abac341b8dd544c57a55b1ae15941e60ab034395a1246e2f9927cf9cb93f29554e97c820120e9b13d08d05854defbce6adda786538441eefda458ee8e7b72
|
7
|
+
data.tar.gz: 62d59ad5a545224eabf3db3e6ac48ed1e3fe91da175d44850897f6d498c54ef756f3145152ad61ba8d3128365c4f91b7379dafdc16e7dbed178868a5479a799d
|
data/lib/kvj.rb
CHANGED
@@ -36,6 +36,15 @@ class KVJ
|
|
36
36
|
@file_connector.release_lock
|
37
37
|
end
|
38
38
|
|
39
|
+
def delete(key)
|
40
|
+
@file_connector.grab_ex_lock
|
41
|
+
hash = @file_connector.read
|
42
|
+
hash.delete(key)
|
43
|
+
@file_connector.write(hash)
|
44
|
+
ensure
|
45
|
+
@file_connector.release_lock
|
46
|
+
end
|
47
|
+
|
39
48
|
class << self
|
40
49
|
alias connect new
|
41
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kvj
|
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
|
- RundongGao
|
@@ -24,8 +24,8 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description:
|
28
|
-
|
27
|
+
description: A supper light connectionless key-value storage database provides ACID
|
28
|
+
transcations for multiple programs.
|
29
29
|
email: asphinx423@gmail.com
|
30
30
|
executables: []
|
31
31
|
extensions: []
|
@@ -35,7 +35,7 @@ files:
|
|
35
35
|
- lib/file_connector.rb
|
36
36
|
- lib/kvj.rb
|
37
37
|
- lib/lock_manager.rb
|
38
|
-
homepage:
|
38
|
+
homepage: https://github.com/RundongGao/kvj
|
39
39
|
licenses:
|
40
40
|
- MIT
|
41
41
|
metadata: {}
|
@@ -58,5 +58,5 @@ rubyforge_project:
|
|
58
58
|
rubygems_version: 2.4.6
|
59
59
|
signing_key:
|
60
60
|
specification_version: 4
|
61
|
-
summary: A supper light
|
61
|
+
summary: A supper light connectionless key-value storage database.
|
62
62
|
test_files: []
|