coverband 1.0.2 → 1.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: 053a4656762684a3293fdaf19c267660d8f1a495
4
- data.tar.gz: 372ce2923b56e30cfe94ac2345e62b3db1974518
3
+ metadata.gz: 32fd77ef72fd2521addf3e66074af44d1963f16b
4
+ data.tar.gz: 6f978b929e31a9d2ad67e1964ea431b8823eed2e
5
5
  SHA512:
6
- metadata.gz: 7673df791c9d6f443d7b04436656d0e6800fd414e9c6363be6a6bfe89dc39b39437cd91954639cbc1f519001f66d5ba52af0ffa1120d217583c66985322c8256
7
- data.tar.gz: c41882f81a929e15aa9068ddc03774a6fa6af3040dd3405f9b2ca334f8c4f742a9ec54df4dc1e637ed4120383ec1582990965e73334b720e8fbc383dba883bcc
6
+ metadata.gz: 5f88e79d2e75dfeb687438f27d251e3eda0693622cbd9dd8697b45bdff95d6ba6c750d2a3aae048829a2cacac87090747320d3e9a5dfe2f7fb17378a765bc2ea
7
+ data.tar.gz: 6802dcf7c4d5efdd7f757f4ff7bf4ae5b4eafac379c9742580f28a84dc5396c8b2ca0f2a08c72c77e6724507d8650c260e0f3d174fbd1f9c28ab9b778ea94202
@@ -2,21 +2,21 @@ module Coverband
2
2
  class RedisStore
3
3
  def initialize(redis)
4
4
  @redis = redis
5
+ @_sadd_supports_array = recent_gem_version? && recent_server_version?
5
6
  end
6
7
 
7
8
  def store_report(report)
8
- store_array('coverband', report.keys)
9
+ redis.pipelined do
10
+ store_array('coverband', report.keys)
9
11
 
10
- report.each do |file, lines|
11
- store_array("coverband.#{file}", lines)
12
+ report.each do |file, lines|
13
+ store_array("coverband.#{file}", lines)
14
+ end
12
15
  end
13
16
  end
14
17
 
15
18
  def sadd_supports_array?
16
- # if the value is false, ||= would reevaluate the right side
17
- return @_sadd_supports_array if defined?(@_sadd_supports_array)
18
-
19
- @_sadd_supports_array = recent_gem_version? && recent_server_version?
19
+ @_sadd_supports_array
20
20
  end
21
21
 
22
22
  private
@@ -1,3 +1,3 @@
1
1
  module Coverband
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coverband
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-21 00:00:00.000000000 Z
11
+ date: 2015-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler