redness 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/README.md +13 -2
- data/lib/redness.rb +4 -0
- data/lib/version.rb +1 -1
- data/spec/spec_integration_helper.rb +0 -2
- metadata +11 -11
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -8,6 +8,7 @@ GEM
|
|
8
8
|
i18n (0.6.0)
|
9
9
|
json (1.6.6)
|
10
10
|
multi_json (1.3.2)
|
11
|
+
rake (0.9.2.2)
|
11
12
|
redis (2.2.2)
|
12
13
|
rspec (2.9.0)
|
13
14
|
rspec-core (~> 2.9.0)
|
@@ -25,6 +26,7 @@ PLATFORMS
|
|
25
26
|
DEPENDENCIES
|
26
27
|
activesupport
|
27
28
|
json
|
29
|
+
rake
|
28
30
|
redis (~> 2.2.2)
|
29
31
|
rspec
|
30
32
|
timecop
|
data/README.md
CHANGED
@@ -14,8 +14,6 @@ to Redis than the client library while remaining more composable and minimal tha
|
|
14
14
|
|
15
15
|
### Playing Around (read the tests for more examples)
|
16
16
|
```ruby
|
17
|
-
require 'redis'
|
18
|
-
require 'json'
|
19
17
|
require 'redness'
|
20
18
|
|
21
19
|
$redis = Redis.new
|
@@ -121,6 +119,19 @@ to Redis than the client library while remaining more composable and minimal tha
|
|
121
119
|
union.get
|
122
120
|
#=> [7,3,6,2,9,1]
|
123
121
|
|
122
|
+
# TimedRedSet is a RedSet with timestamped data
|
123
|
+
TimedRedSet.add("somekey", 1)
|
124
|
+
TimedRedSet.add("somekey", 2)
|
125
|
+
|
126
|
+
TimedRedSet.get("somekey")
|
127
|
+
#=> [2, 1]
|
128
|
+
|
129
|
+
TimedRedSet.get_with_timestamps("somekey")
|
130
|
+
#=> [[2, 2012-05-04 14:29:57 -0400], [1, 2012-05-04 14:29:48 -0400]]
|
131
|
+
|
132
|
+
TimedRedSet.since("somekey", 5.minutes.ago, lower: 1, upper: 2)
|
133
|
+
#=> [1]
|
134
|
+
|
124
135
|
# RedExpire expires the collection with the
|
125
136
|
# provided key in a given number of seconds
|
126
137
|
RedList.new("somelist")
|
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.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -18,7 +18,7 @@ date: 2012-05-04 00:00:00.000000000Z
|
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: json
|
21
|
-
requirement: &
|
21
|
+
requirement: &70095839355840 !ruby/object:Gem::Requirement
|
22
22
|
none: false
|
23
23
|
requirements:
|
24
24
|
- - ! '>='
|
@@ -26,10 +26,10 @@ dependencies:
|
|
26
26
|
version: '0'
|
27
27
|
type: :runtime
|
28
28
|
prerelease: false
|
29
|
-
version_requirements: *
|
29
|
+
version_requirements: *70095839355840
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rspec
|
32
|
-
requirement: &
|
32
|
+
requirement: &70095839355420 !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
35
|
- - ! '>='
|
@@ -37,10 +37,10 @@ dependencies:
|
|
37
37
|
version: '0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
|
-
version_requirements: *
|
40
|
+
version_requirements: *70095839355420
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: redis
|
43
|
-
requirement: &
|
43
|
+
requirement: &70095839354920 !ruby/object:Gem::Requirement
|
44
44
|
none: false
|
45
45
|
requirements:
|
46
46
|
- - ~>
|
@@ -48,10 +48,10 @@ dependencies:
|
|
48
48
|
version: 2.2.2
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
|
-
version_requirements: *
|
51
|
+
version_requirements: *70095839354920
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
53
|
name: activesupport
|
54
|
-
requirement: &
|
54
|
+
requirement: &70095839354500 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
57
|
- - ! '>='
|
@@ -59,10 +59,10 @@ dependencies:
|
|
59
59
|
version: '0'
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
|
-
version_requirements: *
|
62
|
+
version_requirements: *70095839354500
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: timecop
|
65
|
-
requirement: &
|
65
|
+
requirement: &70095839354040 !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
68
|
- - ! '>='
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
version: '0'
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
|
-
version_requirements: *
|
73
|
+
version_requirements: *70095839354040
|
74
74
|
description: Helpful Ruby classes for improved Redis data structures
|
75
75
|
email: dev@howaboutwe.com
|
76
76
|
executables: []
|