services 4.0.0 → 4.0.1

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: 74080ca61d88a944b2f35bfe0f81cd00815c96cc
4
- data.tar.gz: 4be4bae8d75734489654038732c34d922e28b1bc
3
+ metadata.gz: ffdcdb285cbcbd081d2a061bab59150e91478fc0
4
+ data.tar.gz: b7ece5a7a3cf09b02d0020e0e188127c48e92415
5
5
  SHA512:
6
- metadata.gz: a0332a0d2e3be17d07698ee992d85fce822d77744a06051cf8fe1015f6325805aeeb175e21d1d7845d77bfe054c8fa590a54eeed64afba7a20a98d168450bd90
7
- data.tar.gz: 4c4d2fce4a8df600e1457d8ef70c45f1f62d267e0aa43670bd9e9e962ec2ff8c402fe0bd651176e14babe295f9fa99ad209ebf122bcb11f423df3384a4ddaa24
6
+ metadata.gz: 299c7c815229e345be412a0f7ab4bca0d1da1848ac9e29935f0e74b378c9f7dea7e22efed1fe48856060815c68d9bfe0048279da27b313e711ef5dc65c24ef53
7
+ data.tar.gz: a5dd66ac67005ba9530e38a2e483bcde53583a044ffbff553dab3ad82123567408c3e281cef66d8c8055ec6638a4c8620b71c53136b91f743f8b3f6dca78d3df
data/README.md CHANGED
@@ -19,13 +19,9 @@ For disambiguation: when I write "Services" with a uppercase "S", I mean this ge
19
19
 
20
20
  ### Requirements
21
21
 
22
- ### Ruby
22
+ #### Ruby >= 2.0
23
23
 
24
- Ruby >= 2.0
25
-
26
- #### Rails
27
-
28
- Rails >= 3.2
24
+ #### Rails >= 3.2
29
25
 
30
26
  #### Redis
31
27
 
@@ -10,7 +10,8 @@ module Services
10
10
  Numeric
11
11
  ]
12
12
 
13
- InvalidMetaError = Class.new(StandardError)
13
+ InvalidMetaError = Class.new(StandardError)
14
+ EmptyResponseFromRedisMultiError = Class.new(StandardError)
14
15
 
15
16
  def initialize(redis, key = 'logs')
16
17
  @redis, @key = redis, key
@@ -38,10 +39,13 @@ module Services
38
39
  end
39
40
 
40
41
  def clear
41
- @redis.multi do
42
- @redis.lrange @key, 0, -1
43
- @redis.del @key
44
- end.first.map(&method(:log_entry_from_json))
42
+ response = 3.tries on: EmptyResponseFromRedisMultiError do
43
+ @redis.multi do
44
+ @redis.lrange @key, 0, -1
45
+ @redis.del @key
46
+ end or raise EmptyResponseFromRedisMultiError
47
+ end
48
+ response.first.map(&method(:log_entry_from_json))
45
49
  end
46
50
 
47
51
  private
@@ -1,3 +1,3 @@
1
1
  module Services
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: services
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Meurer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake