collectr 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/collectr/version.rb +1 -1
- data/spec/hash_spec.rb +1 -1
- data/spec/redis/redis_array_spec.rb +11 -9
- data/spec/spec_helper.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 463b3d28e3ef8f2d462756cfe2f44b8e78e789fc
|
4
|
+
data.tar.gz: 8a2e0278fdabf3e44e221deb3cfef7bcde54ddf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d9ba0cf80958a79edaf34279630024466963970759f71442fb0053e82e1ece03e7573c705e9ec53687cbfba0a61d085cad6f31f80ea2ffd439b747008125aad
|
7
|
+
data.tar.gz: f3049888203fdf4c99d78988a8052c5fed4aef26ae4affde81548891face298da7627ea6645b1192fadf5c6c34c15670dc03ea8407c3a8a7b085b6b1845e44e8
|
data/lib/collectr/version.rb
CHANGED
data/spec/hash_spec.rb
CHANGED
@@ -2,15 +2,17 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
require 'redis/redis_array'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
if redis_exists?
|
6
|
+
describe Collectr::RedisArray do
|
7
|
+
subject(:array) { coll = Collectr::RedisArray.new('arr', max_size: 3); coll.clear; coll }
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
it 'keeps only the last three' do
|
10
|
+
array << 1
|
11
|
+
array << 2
|
12
|
+
array << 3
|
13
|
+
array << 4
|
14
|
+
array << 5
|
15
|
+
expect(array.to_a).to eq([3,4,5])
|
16
|
+
end
|
15
17
|
end
|
16
18
|
end
|
data/spec/spec_helper.rb
CHANGED