invoca-utils 0.4.0 → 0.4.1
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/Gemfile.lock +1 -1
- data/lib/invoca/utils/exceptions.rb +5 -3
- data/lib/invoca/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2c9db5fc433f7e4f0abfc7ba11ca6a41065e5a4e9a233bb6f38fa8d310e0d0
|
4
|
+
data.tar.gz: 426e3b56dcb95d79b964d613198b2c483050da092999a4ccd4e29348231b0588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0e762c4b3a2e044abc0a340dc741a9258b2a3afbca3caf575f5f160067fef863ce10d40b03bc374275d0953c9984fd0bf2253df8d5cdcc0e43774bbf42948fe
|
7
|
+
data.tar.gz: fc973c0be3d37b5f8e38f2e12d9ea45a87539c78ff8afe7b7f8adf8351d623f847af68a1d9df96bbc39938894dfb6e2bf2fe4f36ef182278f80b3511381cdedf
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
5
5
|
Note: This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.4.1] - 2020-06-17
|
8
|
+
### Fixed
|
9
|
+
- Support Ruby < 2.5 by adding `begin`/`end` around `rescue` in `retry_on_exception`.
|
10
|
+
|
7
11
|
## [0.4.0] - 2020-06-09
|
8
12
|
### Added
|
9
13
|
- Added `Invoca::Utils.retry_on_exception`.
|
data/Gemfile.lock
CHANGED
@@ -13,9 +13,11 @@ module Invoca
|
|
13
13
|
# @return the value from yield
|
14
14
|
def retry_on_exception(exception_classes, retries: 1, before_retry: nil)
|
15
15
|
retries.times do |attempt_number|
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
begin
|
17
|
+
return yield(attempt_number)
|
18
|
+
rescue *Array(exception_classes) => ex
|
19
|
+
before_retry&.call(ex)
|
20
|
+
end
|
19
21
|
end
|
20
22
|
|
21
23
|
yield(retries) # no rescue for this last try, so any exceptions will raise out
|
data/lib/invoca/utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: invoca-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca development
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|