key_value 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -2
- data/Rakefile +1 -0
- data/Readme.md +6 -8
- data/VERSION +1 -1
- data/key_value.gemspec +4 -4
- metadata +7 -7
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/Readme.md
CHANGED
@@ -24,13 +24,10 @@ Migration
|
|
24
24
|
|
25
25
|
Usage
|
26
26
|
=====
|
27
|
-
# get
|
28
|
-
KeyValue['xxx'] -> {:baz=>'foo'}
|
29
|
-
or KeyValue.get('xxx') -> {:baz=>'foo'}
|
30
27
|
|
31
|
-
# set
|
28
|
+
# set & get
|
32
29
|
KeyValue['xxx'] = {:baz=>'foo'})
|
33
|
-
|
30
|
+
KeyValue['xxx'] -> {:baz=>'foo'}
|
34
31
|
|
35
32
|
# delete
|
36
33
|
KeyValue['xxx'] = nil
|
@@ -38,10 +35,10 @@ Usage
|
|
38
35
|
|
39
36
|
# increment
|
40
37
|
KeyValue.inc('xxx') # !! Not atomic
|
41
|
-
or KeyValue.inc('xxx', 5)
|
38
|
+
or KeyValue.inc('xxx', 5) # increment by 5
|
42
39
|
|
43
40
|
# cache
|
44
|
-
KeyValue.cache('xxx'){ ..something expensive.. }
|
41
|
+
result = KeyValue.cache('xxx'){ ..something expensive.. }
|
45
42
|
|
46
43
|
# defaults (in case the value is not stored yet)
|
47
44
|
KeyValue.defaults['xxx'] = 1
|
@@ -61,7 +58,8 @@ HandlerSocket ([Ubuntu natty guide](http://grosser.it/2011/05/14/installing-mysq
|
|
61
58
|
|
62
59
|
TODO
|
63
60
|
====
|
64
|
-
- HandlerSocket
|
61
|
+
- HandlerSocket [insert+update](https://github.com/miyucy/handlersocket/blob/master/ext/handler_socket.cc#L364) support
|
62
|
+
- Multi-get support `KeyValue.keys('xxx*')` + `KeyValue.multi_get(['xxx1', 'xxx2'])`
|
65
63
|
- make test database configurable
|
66
64
|
|
67
65
|
Authors
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/key_value.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{key_value}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Roman Heinrich", "Michael Grosser"]
|
@@ -34,12 +34,12 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.specification_version = 3
|
35
35
|
|
36
36
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
37
|
-
s.add_runtime_dependency(%q<activerecord>, ["
|
37
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 0"])
|
38
38
|
else
|
39
|
-
s.add_dependency(%q<activerecord>, ["
|
39
|
+
s.add_dependency(%q<activerecord>, [">= 0"])
|
40
40
|
end
|
41
41
|
else
|
42
|
-
s.add_dependency(%q<activerecord>, ["
|
42
|
+
s.add_dependency(%q<activerecord>, [">= 0"])
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: key_value
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 3
|
10
|
+
version: 0.4.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Roman Heinrich
|
@@ -23,12 +23,12 @@ dependencies:
|
|
23
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
28
|
+
hash: 3
|
29
29
|
segments:
|
30
|
-
-
|
31
|
-
version: "
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
32
|
requirement: *id001
|
33
33
|
prerelease: false
|
34
34
|
type: :runtime
|