ears 0.9.3 → 0.10.0
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/.github/workflows/build.yml +3 -3
- data/.tool-versions +2 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +23 -25
- data/README.md +14 -2
- data/ears.gemspec +1 -1
- data/lib/ears/version.rb +1 -1
- data/lib/ears.rb +6 -0
- data/package-lock.json +14 -14
- data/package.json +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ff51eb26ddd79aebd5f99d8699b8351cdc96fc68485e9b0c99a8fe85502a96e
|
4
|
+
data.tar.gz: 91667d959259121b6e973897fb617cb0b92e60b720c6aee451c8ff5b472f6c58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc487ab5e78bb55e43c6ccb89fb1d49543f1c3994b1bf3b01b1f4f6349ede74570ff6c6c67be5c1b1d979a4328124cf333db1594f3fde7cc2cdb54397ed3461c
|
7
|
+
data.tar.gz: 6f5e2efd6c25c8ff2801d3402064b20ec808b56530a7f65ad55323da549f0583ec5e4f06a66baec83b7b6ebf532bdab644095ac7880a544143ffcd2c73d5ee64
|
data/.github/workflows/build.yml
CHANGED
@@ -2,9 +2,9 @@ name: Gem Build and Release
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [
|
5
|
+
branches: [main]
|
6
6
|
pull_request:
|
7
|
-
branches: [
|
7
|
+
branches: [main]
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
test:
|
@@ -50,7 +50,7 @@ jobs:
|
|
50
50
|
- name: Build Gem
|
51
51
|
run: bundle exec rake build
|
52
52
|
- name: Release Gem
|
53
|
-
if: github.ref == 'refs/heads/
|
53
|
+
if: github.ref == 'refs/heads/main'
|
54
54
|
uses: fac/ruby-gem-push-action@v2
|
55
55
|
with:
|
56
56
|
key: rubygems
|
data/.tool-versions
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
ruby 3.2.
|
2
|
-
nodejs
|
1
|
+
ruby 3.2.2
|
2
|
+
nodejs 20.0.0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ears (0.
|
4
|
+
ears (0.10.0)
|
5
5
|
bunny
|
6
6
|
multi_json
|
7
7
|
|
@@ -20,65 +20,65 @@ GEM
|
|
20
20
|
tilt
|
21
21
|
json (2.6.3)
|
22
22
|
multi_json (1.15.0)
|
23
|
-
parallel (1.
|
24
|
-
parser (3.2.1
|
23
|
+
parallel (1.23.0)
|
24
|
+
parser (3.2.2.1)
|
25
25
|
ast (~> 2.4.1)
|
26
26
|
prettier (3.2.2)
|
27
27
|
syntax_tree (>= 2.7.1)
|
28
28
|
syntax_tree-haml (>= 1.1.0)
|
29
29
|
syntax_tree-rbs (>= 0.2.0)
|
30
|
-
prettier_print (1.2.
|
30
|
+
prettier_print (1.2.1)
|
31
31
|
rainbow (3.1.1)
|
32
32
|
rake (13.0.6)
|
33
|
-
rbs (3.0.
|
33
|
+
rbs (3.0.4)
|
34
34
|
rbtree (0.4.6)
|
35
35
|
redcarpet (3.6.0)
|
36
|
-
regexp_parser (2.
|
36
|
+
regexp_parser (2.8.0)
|
37
37
|
rexml (3.2.5)
|
38
38
|
rspec (3.12.0)
|
39
39
|
rspec-core (~> 3.12.0)
|
40
40
|
rspec-expectations (~> 3.12.0)
|
41
41
|
rspec-mocks (~> 3.12.0)
|
42
|
-
rspec-core (3.12.
|
42
|
+
rspec-core (3.12.2)
|
43
43
|
rspec-support (~> 3.12.0)
|
44
|
-
rspec-expectations (3.12.
|
44
|
+
rspec-expectations (3.12.3)
|
45
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
46
46
|
rspec-support (~> 3.12.0)
|
47
|
-
rspec-mocks (3.12.
|
47
|
+
rspec-mocks (3.12.5)
|
48
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
49
49
|
rspec-support (~> 3.12.0)
|
50
50
|
rspec-support (3.12.0)
|
51
|
-
rubocop (1.
|
51
|
+
rubocop (1.50.2)
|
52
52
|
json (~> 2.3)
|
53
53
|
parallel (~> 1.10)
|
54
54
|
parser (>= 3.2.0.0)
|
55
55
|
rainbow (>= 2.2.2, < 4.0)
|
56
56
|
regexp_parser (>= 1.8, < 3.0)
|
57
57
|
rexml (>= 3.2.5, < 4.0)
|
58
|
-
rubocop-ast (>= 1.
|
58
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
59
59
|
ruby-progressbar (~> 1.7)
|
60
60
|
unicode-display_width (>= 2.4.0, < 3.0)
|
61
|
-
rubocop-ast (1.
|
61
|
+
rubocop-ast (1.28.0)
|
62
62
|
parser (>= 3.2.1.0)
|
63
|
-
rubocop-capybara (2.
|
63
|
+
rubocop-capybara (2.18.0)
|
64
64
|
rubocop (~> 1.41)
|
65
65
|
rubocop-rake (0.6.0)
|
66
66
|
rubocop (~> 1.0)
|
67
|
-
rubocop-rspec (2.
|
67
|
+
rubocop-rspec (2.20.0)
|
68
68
|
rubocop (~> 1.33)
|
69
69
|
rubocop-capybara (~> 2.17)
|
70
|
-
ruby-progressbar (1.
|
70
|
+
ruby-progressbar (1.13.0)
|
71
71
|
set (1.0.3)
|
72
72
|
sorted_set (1.0.3)
|
73
73
|
rbtree
|
74
74
|
set (~> 1.0)
|
75
|
-
syntax_tree (6.
|
75
|
+
syntax_tree (6.1.1)
|
76
76
|
prettier_print (>= 1.2.0)
|
77
|
-
syntax_tree-haml (
|
78
|
-
haml (>= 5.2
|
79
|
-
prettier_print (>= 1.
|
80
|
-
syntax_tree (>=
|
81
|
-
syntax_tree-rbs (0.
|
77
|
+
syntax_tree-haml (4.0.3)
|
78
|
+
haml (>= 5.2)
|
79
|
+
prettier_print (>= 1.2.1)
|
80
|
+
syntax_tree (>= 6.0.0)
|
81
|
+
syntax_tree-rbs (1.0.0)
|
82
82
|
prettier_print
|
83
83
|
rbs
|
84
84
|
syntax_tree (>= 2.0.1)
|
@@ -86,9 +86,7 @@ GEM
|
|
86
86
|
thor (1.2.1)
|
87
87
|
tilt (2.1.0)
|
88
88
|
unicode-display_width (2.4.2)
|
89
|
-
|
90
|
-
yard (0.9.28)
|
91
|
-
webrick (~> 1.7.0)
|
89
|
+
yard (0.9.34)
|
92
90
|
|
93
91
|
PLATFORMS
|
94
92
|
arm64-darwin-20
|
@@ -111,4 +109,4 @@ DEPENDENCIES
|
|
111
109
|
yard
|
112
110
|
|
113
111
|
BUNDLED WITH
|
114
|
-
2.4.
|
112
|
+
2.4.12
|
data/README.md
CHANGED
@@ -202,13 +202,25 @@ end
|
|
202
202
|
|
203
203
|
This will automatically route messages to `my_queue.error` after they have been re-tried three times. This prevents you from infinitely retrying a faulty message.
|
204
204
|
|
205
|
+
### Stopping any running consumers
|
206
|
+
|
207
|
+
When you are running Ears in a non-blocking way (e.g. in a Thread), it might be cumbersome to remove the running consumers without restarting the whole app.
|
208
|
+
|
209
|
+
For this use case, there is a stop! method:
|
210
|
+
|
211
|
+
```ruby
|
212
|
+
Ears.stop!
|
213
|
+
```
|
214
|
+
|
215
|
+
It will close and reset the current Bunny connection, leading to all consumers being shut down.
|
216
|
+
|
205
217
|
## Documentation
|
206
218
|
|
207
219
|
If you need more in-depth information, look at [our API documentation](https://www.rubydoc.info/gems/ears).
|
208
220
|
|
209
221
|
## Contributing
|
210
222
|
|
211
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/ivx/ears. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ivx/ears/blob/
|
223
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ivx/ears. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ivx/ears/blob/main/CODE_OF_CONDUCT.md).
|
212
224
|
|
213
225
|
## License
|
214
226
|
|
@@ -216,4 +228,4 @@ The gem is available as open-source under the terms of the [MIT License](https:/
|
|
216
228
|
|
217
229
|
## Code of Conduct
|
218
230
|
|
219
|
-
Everyone interacting in the Ears project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [code of conduct](https://github.com/ivx/ears/blob/
|
231
|
+
Everyone interacting in the Ears project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [code of conduct](https://github.com/ivx/ears/blob/main/CODE_OF_CONDUCT.md).
|
data/ears.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.metadata['source_code_uri'] = 'https://github.com/ivx/ears'
|
22
22
|
spec.metadata[
|
23
23
|
'changelog_uri'
|
24
|
-
] = 'https://github.com/ivx/ears/blob/
|
24
|
+
] = 'https://github.com/ivx/ears/blob/main/CHANGELOG.md'
|
25
25
|
|
26
26
|
spec.post_install_message =
|
27
27
|
'
|
data/lib/ears/version.rb
CHANGED
data/lib/ears.rb
CHANGED
@@ -58,6 +58,12 @@ module Ears
|
|
58
58
|
raise @error if @error
|
59
59
|
end
|
60
60
|
|
61
|
+
# Closes the connection, removing the consumers.
|
62
|
+
def stop!
|
63
|
+
connection.close
|
64
|
+
@connection = nil
|
65
|
+
end
|
66
|
+
|
61
67
|
# Signals that an uncaught error has occurred and the process should be stopped.
|
62
68
|
#
|
63
69
|
# @param [Exception] error The unhandled error that occurred.
|
data/package-lock.json
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
"": {
|
7
7
|
"name": "ears",
|
8
8
|
"devDependencies": {
|
9
|
-
"@invisionag/prettier-config": "^2.1.
|
9
|
+
"@invisionag/prettier-config": "^2.1.1",
|
10
10
|
"@prettier/plugin-ruby": "^3.2.2",
|
11
|
-
"prettier": "^2.8.
|
11
|
+
"prettier": "^2.8.8"
|
12
12
|
}
|
13
13
|
},
|
14
14
|
"node_modules/@invisionag/prettier-config": {
|
15
|
-
"version": "2.1.
|
16
|
-
"resolved": "https://registry.npmjs.org/@invisionag/prettier-config/-/prettier-config-2.1.
|
17
|
-
"integrity": "sha512-
|
15
|
+
"version": "2.1.1",
|
16
|
+
"resolved": "https://registry.npmjs.org/@invisionag/prettier-config/-/prettier-config-2.1.1.tgz",
|
17
|
+
"integrity": "sha512-JWdjOFpM9eaLLvoA2nLjnOy6nzK/3wM4I+uejvXLQul1cD8ygIh5H088okFa05q5ikbzExSbSgaDTCFH70ytyA==",
|
18
18
|
"dev": true,
|
19
19
|
"peerDependencies": {
|
20
20
|
"prettier": ">=2.0.0"
|
@@ -30,9 +30,9 @@
|
|
30
30
|
}
|
31
31
|
},
|
32
32
|
"node_modules/prettier": {
|
33
|
-
"version": "2.8.
|
34
|
-
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.
|
35
|
-
"integrity": "sha512-
|
33
|
+
"version": "2.8.8",
|
34
|
+
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
35
|
+
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
36
36
|
"dev": true,
|
37
37
|
"bin": {
|
38
38
|
"prettier": "bin-prettier.js"
|
@@ -47,9 +47,9 @@
|
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
49
|
"@invisionag/prettier-config": {
|
50
|
-
"version": "2.1.
|
51
|
-
"resolved": "https://registry.npmjs.org/@invisionag/prettier-config/-/prettier-config-2.1.
|
52
|
-
"integrity": "sha512-
|
50
|
+
"version": "2.1.1",
|
51
|
+
"resolved": "https://registry.npmjs.org/@invisionag/prettier-config/-/prettier-config-2.1.1.tgz",
|
52
|
+
"integrity": "sha512-JWdjOFpM9eaLLvoA2nLjnOy6nzK/3wM4I+uejvXLQul1cD8ygIh5H088okFa05q5ikbzExSbSgaDTCFH70ytyA==",
|
53
53
|
"dev": true,
|
54
54
|
"requires": {}
|
55
55
|
},
|
@@ -63,9 +63,9 @@
|
|
63
63
|
}
|
64
64
|
},
|
65
65
|
"prettier": {
|
66
|
-
"version": "2.8.
|
67
|
-
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.
|
68
|
-
"integrity": "sha512-
|
66
|
+
"version": "2.8.8",
|
67
|
+
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
68
|
+
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
69
69
|
"dev": true
|
70
70
|
}
|
71
71
|
}
|
data/package.json
CHANGED
@@ -7,9 +7,9 @@
|
|
7
7
|
"format": "npm run prettify -- --write"
|
8
8
|
},
|
9
9
|
"devDependencies": {
|
10
|
-
"@invisionag/prettier-config": "^2.1.
|
10
|
+
"@invisionag/prettier-config": "^2.1.1",
|
11
11
|
"@prettier/plugin-ruby": "^3.2.2",
|
12
|
-
"prettier": "^2.8.
|
12
|
+
"prettier": "^2.8.8"
|
13
13
|
},
|
14
14
|
"prettier": "@invisionag/prettier-config/ruby"
|
15
15
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ears
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- InVision AG
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -79,7 +79,7 @@ metadata:
|
|
79
79
|
rubygems_mfa_required: 'false'
|
80
80
|
homepage_uri: https://github.com/ivx/ears
|
81
81
|
source_code_uri: https://github.com/ivx/ears
|
82
|
-
changelog_uri: https://github.com/ivx/ears/blob/
|
82
|
+
changelog_uri: https://github.com/ivx/ears/blob/main/CHANGELOG.md
|
83
83
|
post_install_message: |2
|
84
84
|
|
85
85
|
Ears: the new version changed the exit behaviour in case of uncaught exceptions.
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
|
-
rubygems_version: 3.4.
|
101
|
+
rubygems_version: 3.4.10
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: A gem for building RabbitMQ consumers.
|