ears 0.9.2 → 0.10.0

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: 006cceadf68b781e5348f4d770da72d2173d737a27127b7dac18f01c6248c2e6
4
- data.tar.gz: 40e7a01e40fac32e2b5fe9b430656e28147ce01d144fc9f3f7820f00c66d3871
3
+ metadata.gz: 5ff51eb26ddd79aebd5f99d8699b8351cdc96fc68485e9b0c99a8fe85502a96e
4
+ data.tar.gz: 91667d959259121b6e973897fb617cb0b92e60b720c6aee451c8ff5b472f6c58
5
5
  SHA512:
6
- metadata.gz: ffb925c9d10039d22e8f2820227115d46773b5a01763c6a949c0f7babe7f3af92aab13eba44b2eaf4116905c09aaa7087191f91c231198b8ffdd58058d43f850
7
- data.tar.gz: 7c8a4ae19fdfb76c189b2213278305287167d529eb97399c968c182596bba2bc6b011e23087fcf0ce0e08617597ace3f9eca8492921c112de199aa8fc3ac5767
6
+ metadata.gz: fc487ab5e78bb55e43c6ccb89fb1d49543f1c3994b1bf3b01b1f4f6349ede74570ff6c6c67be5c1b1d979a4328124cf333db1594f3fde7cc2cdb54397ed3461c
7
+ data.tar.gz: 6f5e2efd6c25c8ff2801d3402064b20ec808b56530a7f65ad55323da549f0583ec5e4f06a66baec83b7b6ebf532bdab644095ac7880a544143ffcd2c73d5ee64
@@ -2,9 +2,9 @@ name: Gem Build and Release
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [master]
5
+ branches: [main]
6
6
  pull_request:
7
- branches: [master]
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/master'
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.1
2
- nodejs 19.7.0
1
+ ruby 3.2.2
2
+ nodejs 20.0.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 (2023-05-16)
4
+
5
+ - Add Ears.stop! method to be able to close the connection and remove consumers.
6
+
7
+ ## 0.9.3 (2023-03-02)
8
+
9
+ - Update gem ownership information
10
+
3
11
  ## 0.9.2 (2023-03-02)
4
12
 
5
13
  - Remove Rubygems MFA requirement to prepare automatic releases
data/CODE_OF_CONDUCT.md CHANGED
@@ -55,10 +55,10 @@ further defined and clarified by project maintainers.
55
55
  ## Enforcement
56
56
 
57
57
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at mario.mainz@invision.de. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
58
+ reported by contacting the project team. All complaints will be reviewed and
59
+ investigated and will result in a response that is deemed necessary and
60
+ appropriate to the circumstances. The project team is obligated to maintain
61
+ confidentiality with regard to the reporter of an incident.
62
62
  Further details of specific enforcement policies may be posted separately.
63
63
 
64
64
  Project maintainers who do not follow or enforce the Code of Conduct in good
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ears (0.9.2)
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.22.1)
24
- parser (3.2.1.0)
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.0)
30
+ prettier_print (1.2.1)
31
31
  rainbow (3.1.1)
32
32
  rake (13.0.6)
33
- rbs (3.0.0)
33
+ rbs (3.0.4)
34
34
  rbtree (0.4.6)
35
35
  redcarpet (3.6.0)
36
- regexp_parser (2.7.0)
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.1)
42
+ rspec-core (3.12.2)
43
43
  rspec-support (~> 3.12.0)
44
- rspec-expectations (3.12.2)
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.3)
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.46.0)
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.26.0, < 2.0)
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.26.0)
61
+ rubocop-ast (1.28.0)
62
62
  parser (>= 3.2.1.0)
63
- rubocop-capybara (2.17.1)
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.18.1)
67
+ rubocop-rspec (2.20.0)
68
68
  rubocop (~> 1.33)
69
69
  rubocop-capybara (~> 2.17)
70
- ruby-progressbar (1.11.0)
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.0.1)
75
+ syntax_tree (6.1.1)
76
76
  prettier_print (>= 1.2.0)
77
- syntax_tree-haml (3.0.0)
78
- haml (>= 5.2, != 6.0.0)
79
- prettier_print (>= 1.0.0)
80
- syntax_tree (>= 5.0.1)
81
- syntax_tree-rbs (0.5.1)
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
- webrick (1.7.0)
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.7
112
+ 2.4.12
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Mario Mainz
3
+ Copyright (c) 2023 InVision AG
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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/master/CODE_OF_CONDUCT.md).
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/master/CODE_OF_CONDUCT.md).
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
@@ -3,8 +3,8 @@ require_relative 'lib/ears/version'
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'ears'
5
5
  spec.version = Ears::VERSION
6
- spec.authors = ['Mario Mainz']
7
- spec.email = ['mario.mainz@invision.de']
6
+ spec.authors = ['InVision AG']
7
+ spec.email = ['johannes.luedke@invision.de']
8
8
 
9
9
  spec.summary = 'A gem for building RabbitMQ consumers.'
10
10
  spec.description = 'A gem for building RabbitMQ consumers.'
@@ -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/master/CHANGELOG.md'
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
@@ -1,3 +1,3 @@
1
1
  module Ears
2
- VERSION = '0.9.2'
2
+ VERSION = '0.10.0'
3
3
  end
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.0",
9
+ "@invisionag/prettier-config": "^2.1.1",
10
10
  "@prettier/plugin-ruby": "^3.2.2",
11
- "prettier": "^2.8.4"
11
+ "prettier": "^2.8.8"
12
12
  }
13
13
  },
14
14
  "node_modules/@invisionag/prettier-config": {
15
- "version": "2.1.0",
16
- "resolved": "https://registry.npmjs.org/@invisionag/prettier-config/-/prettier-config-2.1.0.tgz",
17
- "integrity": "sha512-GQzy9xPlHvqrptweQvBTORArZoBYCokuRXIMgTrOSxsv3xsR8uuJWKNZKpmBCskxX7DkTlDJC2/eevJ3b0V4lA==",
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.4",
34
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
35
- "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
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.0",
51
- "resolved": "https://registry.npmjs.org/@invisionag/prettier-config/-/prettier-config-2.1.0.tgz",
52
- "integrity": "sha512-GQzy9xPlHvqrptweQvBTORArZoBYCokuRXIMgTrOSxsv3xsR8uuJWKNZKpmBCskxX7DkTlDJC2/eevJ3b0V4lA==",
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.4",
67
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
68
- "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
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.0",
10
+ "@invisionag/prettier-config": "^2.1.1",
11
11
  "@prettier/plugin-ruby": "^3.2.2",
12
- "prettier": "^2.8.4"
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.9.2
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
- - Mario Mainz
7
+ - InVision AG
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-02 00:00:00.000000000 Z
11
+ date: 2023-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: '0'
41
41
  description: A gem for building RabbitMQ consumers.
42
42
  email:
43
- - mario.mainz@invision.de
43
+ - johannes.luedke@invision.de
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
@@ -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/master/CHANGELOG.md
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.6
101
+ rubygems_version: 3.4.10
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: A gem for building RabbitMQ consumers.