redness 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +28 -1
- data/lib/redness/timed_red_set.rb +1 -0
- data/lib/redness.rb +2 -0
- data/lib/version.rb +1 -1
- metadata +14 -39
- /data/{spec → lib}/precisionable.rb +0 -0
data/README.md
CHANGED
@@ -94,12 +94,39 @@ to Redis than the client library while remaining more composable and minimal tha
|
|
94
94
|
red_hash.all
|
95
95
|
#=> {}
|
96
96
|
|
97
|
+
# RedSetMulti stores a collection of RedSets
|
98
|
+
RedSet.add("razzle", 1)
|
99
|
+
RedSet.add("razzle", 2)
|
100
|
+
|
101
|
+
RedSet.add("dazzle", 1)
|
102
|
+
RedSet.add("dazzle", 2)
|
103
|
+
RedSet.add("dazzle", 3)
|
104
|
+
|
105
|
+
multi_set = RedSetMulti.new(RedSet.get("razzle"), RedSet.get("dazzle"))
|
106
|
+
multi_set.get
|
107
|
+
#=> [[2, 1], [3, 2, 1]]
|
108
|
+
|
109
|
+
# RedSetUnion represents the union of two or more RedSets
|
110
|
+
RedSet.add("key1", 1)
|
111
|
+
RedSet.add("key1", 2)
|
112
|
+
RedSet.add("key1", 3)
|
113
|
+
|
114
|
+
RedSet.add("key2", 1)
|
115
|
+
RedSet.add("key2", 6)
|
116
|
+
RedSet.add("key2", 7)
|
117
|
+
|
118
|
+
RedSet.add("key3", 9)
|
119
|
+
|
120
|
+
union = RedSetUnion.new("key1", "key2", "key3")
|
121
|
+
union.get
|
122
|
+
#=> [7,3,6,2,9,1]
|
123
|
+
|
97
124
|
# RedExpire expires the collection with the
|
98
125
|
# provided key in a given number of seconds
|
99
126
|
RedList.new("somelist")
|
100
127
|
RedList.add("somelist", 0)
|
101
128
|
# => 1
|
102
|
-
|
129
|
+
RedList.get("somelist")
|
103
130
|
#=> [1]
|
104
131
|
# Expire the 'somelist' RedList in 1 second
|
105
132
|
RedExpire.set("somelist", 1.second)
|
data/lib/redness.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,11 +14,11 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2012-04
|
17
|
+
date: 2012-05-04 00:00:00.000000000Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: json
|
21
|
-
requirement: !ruby/object:Gem::Requirement
|
21
|
+
requirement: &70214144946880 !ruby/object:Gem::Requirement
|
22
22
|
none: false
|
23
23
|
requirements:
|
24
24
|
- - ! '>='
|
@@ -26,15 +26,10 @@ dependencies:
|
|
26
26
|
version: '0'
|
27
27
|
type: :runtime
|
28
28
|
prerelease: false
|
29
|
-
version_requirements:
|
30
|
-
none: false
|
31
|
-
requirements:
|
32
|
-
- - ! '>='
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
29
|
+
version_requirements: *70214144946880
|
35
30
|
- !ruby/object:Gem::Dependency
|
36
31
|
name: rspec
|
37
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirement: &70214144946460 !ruby/object:Gem::Requirement
|
38
33
|
none: false
|
39
34
|
requirements:
|
40
35
|
- - ! '>='
|
@@ -42,15 +37,10 @@ dependencies:
|
|
42
37
|
version: '0'
|
43
38
|
type: :runtime
|
44
39
|
prerelease: false
|
45
|
-
version_requirements:
|
46
|
-
none: false
|
47
|
-
requirements:
|
48
|
-
- - ! '>='
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '0'
|
40
|
+
version_requirements: *70214144946460
|
51
41
|
- !ruby/object:Gem::Dependency
|
52
42
|
name: redis
|
53
|
-
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirement: &70214144945960 !ruby/object:Gem::Requirement
|
54
44
|
none: false
|
55
45
|
requirements:
|
56
46
|
- - ~>
|
@@ -58,15 +48,10 @@ dependencies:
|
|
58
48
|
version: 2.2.2
|
59
49
|
type: :runtime
|
60
50
|
prerelease: false
|
61
|
-
version_requirements:
|
62
|
-
none: false
|
63
|
-
requirements:
|
64
|
-
- - ~>
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 2.2.2
|
51
|
+
version_requirements: *70214144945960
|
67
52
|
- !ruby/object:Gem::Dependency
|
68
53
|
name: activesupport
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
54
|
+
requirement: &70214144945540 !ruby/object:Gem::Requirement
|
70
55
|
none: false
|
71
56
|
requirements:
|
72
57
|
- - ! '>='
|
@@ -74,15 +59,10 @@ dependencies:
|
|
74
59
|
version: '0'
|
75
60
|
type: :runtime
|
76
61
|
prerelease: false
|
77
|
-
version_requirements:
|
78
|
-
none: false
|
79
|
-
requirements:
|
80
|
-
- - ! '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
62
|
+
version_requirements: *70214144945540
|
83
63
|
- !ruby/object:Gem::Dependency
|
84
64
|
name: timecop
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirement: &70214144945080 !ruby/object:Gem::Requirement
|
86
66
|
none: false
|
87
67
|
requirements:
|
88
68
|
- - ! '>='
|
@@ -90,12 +70,7 @@ dependencies:
|
|
90
70
|
version: '0'
|
91
71
|
type: :runtime
|
92
72
|
prerelease: false
|
93
|
-
version_requirements:
|
94
|
-
none: false
|
95
|
-
requirements:
|
96
|
-
- - ! '>='
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '0'
|
73
|
+
version_requirements: *70214144945080
|
99
74
|
description: Helpful Ruby classes for improved Redis data structures
|
100
75
|
email: dev@howaboutwe.com
|
101
76
|
executables: []
|
@@ -109,6 +84,7 @@ files:
|
|
109
84
|
- RAKEFILE
|
110
85
|
- README.md
|
111
86
|
- Rakefile
|
87
|
+
- lib/precisionable.rb
|
112
88
|
- lib/redness.rb
|
113
89
|
- lib/redness/red.rb
|
114
90
|
- lib/redness/red_capped_list.rb
|
@@ -122,7 +98,6 @@ files:
|
|
122
98
|
- lib/redness/timed_red_set.rb
|
123
99
|
- lib/version.rb
|
124
100
|
- redness.gemspec
|
125
|
-
- spec/precisionable.rb
|
126
101
|
- spec/redis_runner.rb
|
127
102
|
- spec/redness/red_capped_list_spec.rb
|
128
103
|
- spec/redness/red_expire_spec.rb
|
@@ -155,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
130
|
version: '0'
|
156
131
|
requirements: []
|
157
132
|
rubyforge_project:
|
158
|
-
rubygems_version: 1.8.
|
133
|
+
rubygems_version: 1.8.16
|
159
134
|
signing_key:
|
160
135
|
specification_version: 3
|
161
136
|
summary: Helpful Ruby classes for improved Redis data structures
|
File without changes
|