retryable 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +7 -2
- data/Gemfile +0 -5
- data/README.md +2 -0
- data/lib/retryable.rb +1 -1
- data/lib/retryable/version.rb +1 -1
- data/retryable.gemspec +1 -1
- data/spec/retryable_spec.rb +6 -0
- data/spec/spec_helper.rb +0 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ab358b3281332a22c7a8995598640d74e4c275c3
|
4
|
+
data.tar.gz: 1af4d17e2c3c0e3171a98a594273b3c1098be0d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 790c0d7cca9fcec2f1bdcb36ded2451e50af933cb6d181842918a8bf8d3f714bd54716ad63714a218be3825ae8e9d09d16b0b2b1ab8e61a6d75d62553952303b
|
7
|
+
data.tar.gz: 208cdf97146fb043b88b9c046bf0edba12095dc0b3bbd6808702e7620f6457521f7a2cc8ad4a2bd9c0a5e646f1f277f5cbb3ba672278ea56fb8b61dd1e374e7c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## Retryable 3.0.4 ##
|
2
|
+
|
3
|
+
Fixed typo in exception message given invalid :matching argument type https://github.com/nfedyashev/retryable/pull/29
|
4
|
+
Thanks @msroz
|
5
|
+
|
1
6
|
## Retryable 3.0.3 ##
|
2
7
|
|
3
8
|
No changes to the source code, only added direct Changelog link on
|
@@ -16,7 +21,7 @@ NOTE: this version is backwards compatible with 2.0.4 version unless you're runn
|
|
16
21
|
|
17
22
|
* retryable can now also be configured via stored contexts.
|
18
23
|
* Ruby 1.8 support has been dropped.
|
19
|
-
|
24
|
+
|
20
25
|
Thanks @chubchenko for refactoring and various improvements.
|
21
26
|
|
22
27
|
## Retryable 2.0.4 ##
|
@@ -24,7 +29,7 @@ NOTE: this version is backwards compatible with 2.0.4 version unless you're runn
|
|
24
29
|
* :infinite value is now available as :tries paramater. Use it for retrying your blocks infinitely until it stops failing.
|
25
30
|
* :sleep_method parameter has been added. This can be very useful when you are working with Celluloid which implements its own version of the method sleep.
|
26
31
|
Use `:sleep_method: Celluloid.method(:sleep)` in such cases.
|
27
|
-
|
32
|
+
|
28
33
|
Thanks @alexcastano
|
29
34
|
|
30
35
|
## Retryable 2.0.3 ##
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -179,9 +179,11 @@ end
|
|
179
179
|
|
180
180
|
If you prefer to use Rails' native logger:
|
181
181
|
|
182
|
+
```ruby
|
182
183
|
log_method = lambda do |retries, exception|
|
183
184
|
Rails.logger.debug("[Attempt ##{retries}] Retrying because [#{exception.class} - #{exception.message}]: #{exception.backtrace.first(5).join(' | ')}")
|
184
185
|
end
|
186
|
+
```
|
185
187
|
|
186
188
|
Contexts
|
187
189
|
--------
|
data/lib/retryable.rb
CHANGED
data/lib/retryable/version.rb
CHANGED
data/retryable.gemspec
CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new('>= 1.9.3')
|
28
28
|
spec.required_rubygems_version = Gem::Requirement.new('>= 1.3.6')
|
29
29
|
|
30
|
-
spec.add_development_dependency 'bundler'
|
30
|
+
spec.add_development_dependency 'bundler'
|
31
31
|
end
|
data/spec/retryable_spec.rb
CHANGED
@@ -134,6 +134,12 @@ RSpec.describe Retryable do
|
|
134
134
|
expect(counter.count).to eq(4)
|
135
135
|
end
|
136
136
|
|
137
|
+
it 'does not allow invalid type of matching option' do
|
138
|
+
expect do
|
139
|
+
described_class.retryable(matching: 1) { raise 'this is invaid type of matching iotion' }
|
140
|
+
end.to raise_error ArgumentError, ':matching must be a string or regex'
|
141
|
+
end
|
142
|
+
|
137
143
|
it 'does not allow invalid options' do
|
138
144
|
expect do
|
139
145
|
described_class.retryable(bad_option: 2) { raise 'this is bad' }
|
data/spec/spec_helper.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: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Fedyashev
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2019-02-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
28
|
+
version: '0'
|
29
29
|
description: Retrying code blocks in Ruby
|
30
30
|
email:
|
31
31
|
- nfedyashev@gmail.com
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: 1.3.6
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.4.5.2
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Retrying code blocks in Ruby
|