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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d86aead02e01a95c40e292b642b66949161428f0
4
- data.tar.gz: 24e2b5021ccb5d4ee8e7905ccf5acda753259fa8
3
+ metadata.gz: 463b3d28e3ef8f2d462756cfe2f44b8e78e789fc
4
+ data.tar.gz: 8a2e0278fdabf3e44e221deb3cfef7bcde54ddf1
5
5
  SHA512:
6
- metadata.gz: b0a77a16ae7d71efa2ebc0fe0c99426592d6335194fed1a1c16b7bf3cfccbc3707ef695b6c116999fcd9d230efb2b9ff5b978ce271aaf485a0ac32e161ed2fe5
7
- data.tar.gz: 3fe09968fd63c45e0732567b7d7369fa15f3378e9747c020b7daaa9dc174e9935f31a4d36e718749880abeb9c0d25960755e7b1210a143113a967cb8c568f2ed
6
+ metadata.gz: 7d9ba0cf80958a79edaf34279630024466963970759f71442fb0053e82e1ece03e7573c705e9ec53687cbfba0a61d085cad6f31f80ea2ffd439b747008125aad
7
+ data.tar.gz: f3049888203fdf4c99d78988a8052c5fed4aef26ae4affde81548891face298da7627ea6645b1192fadf5c6c34c15670dc03ea8407c3a8a7b085b6b1845e44e8
@@ -1,3 +1,3 @@
1
1
  module Collectr
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/spec/hash_spec.rb CHANGED
@@ -63,7 +63,7 @@ shared_examples 'a hash' do
63
63
  # end
64
64
  end
65
65
 
66
- if Redis.current
66
+ if redis_exists?
67
67
  describe Collectr::RedisHash do
68
68
  it_behaves_like 'a hash'
69
69
  end
@@ -2,15 +2,17 @@ require 'spec_helper'
2
2
 
3
3
  require 'redis/redis_array'
4
4
 
5
- describe Collectr::RedisArray do
6
- subject(:array) { coll = Collectr::RedisArray.new('arr', max_size: 3); coll.clear; coll }
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
- it 'keeps only the last three' do
9
- array << 1
10
- array << 2
11
- array << 3
12
- array << 4
13
- array << 5
14
- expect(array.to_a).to eq([3,4,5])
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
@@ -7,3 +7,10 @@ require 'pry'
7
7
  require 'collectr'
8
8
 
9
9
  include Collectr
10
+
11
+ def redis_exists?
12
+ Redis.current.dbsize
13
+ true
14
+ rescue
15
+ false
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collectr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Murphy-Dye