retryable 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +30 -5
- data/lib/retryable.rb +1 -1
- data/lib/retryable/version.rb +1 -1
- data/spec/lib/version_spec.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c055a594c5bd9ebeb455b8185e027ea0d2ce259c
|
4
|
+
data.tar.gz: 2cbbb09e5958d1f211810dbc762bfd962a102eaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1f320b8298024f48f24677e4538d6da832287a7f00269da165b41454a242e2777bc7978c84916148afaa50bf63936090ae315da8e151b9fe3d6ae60d7085229
|
7
|
+
data.tar.gz: f75b5c6bc559c0b5841a95d74914ac16fe24e399365aed35a3b9c7500c1c08d9a636def180e12f0773558252f1ddc371fcf5496f47e16301f300e00ebef904f2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -91,28 +91,52 @@ end
|
|
91
91
|
|
92
92
|
Callback to run after an exception is rescued
|
93
93
|
--------
|
94
|
+
|
95
|
+
```
|
94
96
|
exception_cb = Proc.new do |exception|
|
95
|
-
|
97
|
+
# http://smartinez87.github.io/exception_notification
|
98
|
+
ExceptionNotifier.notify_exception(exception, :data => {:message => "it failed"})
|
96
99
|
end
|
97
100
|
|
98
101
|
retryable(:exception_cb => exception_cb) do
|
99
102
|
# perform risky operation
|
100
103
|
end
|
101
|
-
|
104
|
+
```
|
102
105
|
|
103
106
|
You can temporary disable retryable blocks
|
104
107
|
--------
|
105
108
|
|
106
109
|
```
|
107
|
-
|
110
|
+
Retryable.enabled?
|
108
111
|
=> true
|
109
112
|
|
110
|
-
|
113
|
+
Retryable.disable
|
111
114
|
|
112
|
-
|
115
|
+
Retryable.enabled?
|
113
116
|
=> false
|
114
117
|
```
|
115
118
|
|
119
|
+
Supported Ruby Versions
|
120
|
+
-------
|
121
|
+
|
122
|
+
This library aims to support and is [tested against][travis] the following Ruby
|
123
|
+
versions:
|
124
|
+
|
125
|
+
* Ruby 1.8.7
|
126
|
+
* Ruby 1.9.2
|
127
|
+
* Ruby 1.9.3
|
128
|
+
* Ruby 2.0.0
|
129
|
+
* Ruby 2.1.0
|
130
|
+
|
131
|
+
If something doesn't work on one of these versions, it's a bug.
|
132
|
+
|
133
|
+
This library may inadvertently work (or seem to work) on other Ruby versions,
|
134
|
+
however support will only be provided for the versions listed above.
|
135
|
+
|
136
|
+
If you would like this library to support another Ruby version or
|
137
|
+
implementation, you may volunteer to be a maintainer.
|
138
|
+
|
139
|
+
|
116
140
|
Installation
|
117
141
|
-------
|
118
142
|
|
@@ -134,3 +158,4 @@ gem 'retryable'
|
|
134
158
|
|
135
159
|
[Scott Bronson](https://github.com/bronson/retryable)
|
136
160
|
|
161
|
+
[travis]: http://travis-ci.org/nfedyashev/retryable
|
data/lib/retryable.rb
CHANGED
@@ -18,7 +18,7 @@ module Kernel
|
|
18
18
|
rescue *on_exception => exception
|
19
19
|
raise unless Retryable.enabled?
|
20
20
|
raise unless exception.message =~ opts[:matching]
|
21
|
-
raise if retries+1 >=
|
21
|
+
raise if retries+1 >= tries
|
22
22
|
|
23
23
|
# Interrupt Exception could be raised while sleeping
|
24
24
|
begin
|
data/lib/retryable/version.rb
CHANGED
@@ -2,7 +2,7 @@ module Retryable
|
|
2
2
|
class Version
|
3
3
|
MAJOR = 1 unless defined? Retryable::Version::MAJOR
|
4
4
|
MINOR = 3 unless defined? Retryable::Version::MINOR
|
5
|
-
PATCH =
|
5
|
+
PATCH = 6 unless defined? Retryable::Version::PATCH
|
6
6
|
|
7
7
|
class << self
|
8
8
|
|
data/spec/lib/version_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: retryable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Fedyashev
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-09-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -36,10 +36,10 @@ files:
|
|
36
36
|
- LICENSE.md
|
37
37
|
- README.md
|
38
38
|
- Rakefile
|
39
|
-
- retryable.
|
39
|
+
- lib/retryable.rb
|
40
40
|
- lib/retryable/config.rb
|
41
41
|
- lib/retryable/version.rb
|
42
|
-
-
|
42
|
+
- retryable.gemspec
|
43
43
|
- spec/lib/config_spec.rb
|
44
44
|
- spec/lib/retryable_spec.rb
|
45
45
|
- spec/lib/version_spec.rb
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
version: 1.3.6
|
64
64
|
requirements: []
|
65
65
|
rubyforge_project:
|
66
|
-
rubygems_version: 2.
|
66
|
+
rubygems_version: 2.4.1
|
67
67
|
signing_key:
|
68
68
|
specification_version: 4
|
69
69
|
summary: Kernel#retryable, allow for retrying of code blocks.
|