block_repeater 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/block_repeater/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 338c684e8ff15a822ae560f39d1de4df380f16213bb8f5fb4d1099f98b06f627
|
|
4
|
+
data.tar.gz: f02a5d355851bf5b1b089bb2a86ff5f4325a76ca260969385aee159fcc0f6e86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9013a8cb077a212b9896bc30d5a1d6bfc7be81f3655b25562307e369a0a6d125b8aae352a5ff0a15046b8899304d0c79c3bf5bc9e8179681bd38bb8345d32ac8
|
|
7
|
+
data.tar.gz: 1b53289cec53d69c0b3a9cce35b685567e8780c350a900e58f1abc9c3e17779d3a3528befce6583b506fe20c95a12ae4036a11b20516454a8e756141235fe6b0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -98,13 +98,13 @@ You can also define default exception handling behaviour which all repeaters in
|
|
|
98
98
|
```ruby
|
|
99
99
|
BlockRepeater::Repeater.default_catch(exceptions: [IOError], behaviour: :defer) do |e|
|
|
100
100
|
puts 'An IOError occurred'
|
|
101
|
-
e
|
|
101
|
+
raise e
|
|
102
102
|
end
|
|
103
103
|
```
|
|
104
104
|
A common use-case for default exception handling is if using a gem such as RSpec, where you may want to handle failed expectations in a uniform manner. To do so you need define the default behaviour first, in a place such as a `env.rb` file or similar:
|
|
105
105
|
```ruby
|
|
106
106
|
BlockRepeater::Repeater.default_catch(exceptions: [RSpec::Expectations::ExpectationNotMetError], behaviour: :defer) do |e|
|
|
107
|
-
e
|
|
107
|
+
raise e
|
|
108
108
|
end
|
|
109
109
|
```
|
|
110
110
|
Then an RSpec expectation can be used in the block for the `until` method. The expectation will be attempted each try, but the exception will only be raised if it has still failed once the number or attempts has been reached.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: block_repeater
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William Bray
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bump
|
|
@@ -126,7 +126,7 @@ licenses:
|
|
|
126
126
|
metadata:
|
|
127
127
|
homepage_uri: https://github.com/dvla/block-repeater
|
|
128
128
|
source_code_uri: https://github.com/dvla/block-repeater
|
|
129
|
-
post_install_message:
|
|
129
|
+
post_install_message:
|
|
130
130
|
rdoc_options: []
|
|
131
131
|
require_paths:
|
|
132
132
|
- lib
|
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
142
142
|
version: '0'
|
|
143
143
|
requirements: []
|
|
144
144
|
rubygems_version: 3.2.15
|
|
145
|
-
signing_key:
|
|
145
|
+
signing_key:
|
|
146
146
|
specification_version: 4
|
|
147
147
|
summary: Conditionally repeat a block of code
|
|
148
148
|
test_files: []
|