exp_retry 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/Readme.md +14 -0
  4. data/exp-retry.gemspec +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea9f2d770247bb54f9924524a61fc134c642bfb9
4
- data.tar.gz: 93e6e3ca775f7dc85cab22bb928c7adda4370020
3
+ metadata.gz: e98297bc0b70fe30317c7cf6f9fea3d724419c60
4
+ data.tar.gz: 13dd48c6714c1f30c7b9bceed6c9288aa3a0e27f
5
5
  SHA512:
6
- metadata.gz: 3c1902bf3f2021a837837a1fad2e8f6d750c10cbd17fb72a2ff2d82162a996f71c21b31b62b9199d55d677fc9a80db10f1cefc5374cbd63fe2c7377ecad1b530
7
- data.tar.gz: e9c52473e58614613b91f42b5fe6e4e07d4642db85dd50d24bbcd9f319ed77c9d29d21a9e1f5f86bb8153a1de3a7b5bcf9e7b2210e24660bde07edbd9467f27c
6
+ metadata.gz: 5cfb9099fb016055bcd3bb3ae0271df8287420410cfa5e2d07a4721a25515960500d6e894600cf3bd92230d423296af9d36dfbae367cf5092cdb866f80624fd7
7
+ data.tar.gz: 67b0d9c475079e690b777524186a5dc0ce6d36ebc91b9e327d49a9393fbacd463d0bf634036fbc24e3057029227cac5162e234a00dc4a2e750adcf16861a9d0b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exp_retry (0.0.2)
4
+ exp_retry (0.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/Readme.md CHANGED
@@ -8,13 +8,27 @@ A simple exponential backoff retry wrapper.
8
8
 
9
9
  ## Usage
10
10
 
11
+ You can wrap a simple block to enable retries:
12
+
11
13
  ```ruby
12
14
  ExpRetry.new.call do
13
15
  something_unreliable
14
16
  end
17
+ ```
18
+
19
+ You can specify which exception class to allow retries for:
15
20
 
21
+ ```ruby
16
22
  ExpRetry.new.call(exception: SpecificError) do
17
23
  something_generic # errors will surface immediately
18
24
  something_specific # errors will trigger retries
19
25
  end
20
26
  ```
27
+
28
+ You can specify how many retries to allow:
29
+
30
+ ```ruby
31
+ ExpRetry.new.call(retries: 5) do
32
+ something_unreliable # will retry 5 times
33
+ end
34
+ ```
data/exp-retry.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'exp_retry'
3
- s.version = '0.0.3'
3
+ s.version = '0.0.4'
4
4
  s.date = '2018-10-16'
5
5
  s.summary = 'Exponential backoff retry'
6
6
  s.description = 'A simple exponential backoff retry wrapper.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exp_retry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander