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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54dcad50905bf9c0d48905b88e563c6418ea4bc852e4f85d4cd892e2b2031096
4
- data.tar.gz: 592dde85e812312a5fb5ff67d34da1d5a0127f0c2c2f5f60538baab3c63d32ff
3
+ metadata.gz: bc2c9db5fc433f7e4f0abfc7ba11ca6a41065e5a4e9a233bb6f38fa8d310e0d0
4
+ data.tar.gz: 426e3b56dcb95d79b964d613198b2c483050da092999a4ccd4e29348231b0588
5
5
  SHA512:
6
- metadata.gz: 6fac4beb8eef9b3a4ebc3615cb7711c9134e401e34ba26a2d0012b89c7962ca19440b2ceb2e0fafd5aaafcd4576717d10fddd276c4583858ffc725904194464a
7
- data.tar.gz: c312101bd66d62f9c145610be64a8e75ec931387d4dc33f581885dc5707ff7565e474fd618ddbf569ed9091a591d0f2e0a164b7899ffe311b889c62fbc5a7d37
6
+ metadata.gz: b0e762c4b3a2e044abc0a340dc741a9258b2a3afbca3caf575f5f160067fef863ce10d40b03bc374275d0953c9984fd0bf2253df8d5cdcc0e43774bbf42948fe
7
+ data.tar.gz: fc973c0be3d37b5f8e38f2e12d9ea45a87539c78ff8afe7b7f8adf8351d623f847af68a1d9df96bbc39938894dfb6e2bf2fe4f36ef182278f80b3511381cdedf
@@ -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`.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- invoca-utils (0.4.0)
4
+ invoca-utils (0.4.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
- return yield(attempt_number)
17
- rescue *Array(exception_classes) => ex
18
- before_retry&.call(ex)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Invoca
4
4
  module Utils
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.1"
6
6
  end
7
7
  end
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.0
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-09 00:00:00.000000000 Z
11
+ date: 2020-06-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: