ears 0.3.3 → 0.7.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/.tool-versions +2 -2
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +20 -13
- data/README.md +56 -1
- data/ears.gemspec +6 -0
- data/lib/ears/configuration.rb +10 -0
- data/lib/ears/consumer.rb +8 -5
- data/lib/ears/middlewares/max_retries.rb +46 -0
- data/lib/ears/setup.rb +51 -1
- data/lib/ears/version.rb +1 -1
- data/lib/ears.rb +12 -3
- data/package-lock.json +69 -0
- data/package.json +5 -5
- metadata +9 -5
- data/yarn.lock +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d26c2fc5a7c55ba2a002cb8137232e06168e84d79a37b3d4f25f404304ce7cbe
|
4
|
+
data.tar.gz: 002ba87fc6d46b3ec4f0b9ed12626b1f3b13d2a41b44685416a329a65d1d20b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05cae7fcff052959abf699b26d02f5024f2ef00793d0424f98f899efc9ceb898b8188c08b63671239663a9bdd950b359a9abe5697318347b4c4f58b3ee9561d7
|
7
|
+
data.tar.gz: 84a75eafa821fba5550bc1a2cc020b49b460473fee2cf0de8bba7b5520e74dca7734505e44996e40515c89b33fe1e7a73dfa6849d48eb67feee31820eab5746a
|
data/.tool-versions
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
ruby 3.0.
|
2
|
-
nodejs
|
1
|
+
ruby 3.0.2
|
2
|
+
nodejs 16.9.0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.7.0 (2021-12-06)
|
4
|
+
|
5
|
+
- add options to create retry and error queues
|
6
|
+
|
7
|
+
## 0.6.0 (2021-11-18)
|
8
|
+
|
9
|
+
- add `connection_name` to configuration and make it a mandatory setting
|
10
|
+
- validate configuration after calling `configure`
|
11
|
+
|
12
|
+
## 0.5.0 (2021-11-03)
|
13
|
+
|
14
|
+
- fix the fact that the configuration was never used and bunny silently fell back to the `RABBITMQ_URL` env var
|
15
|
+
|
16
|
+
## 0.4.3 (2021-07-26)
|
17
|
+
|
18
|
+
### Changes
|
19
|
+
|
20
|
+
- Ears will not exit gracefully on unhandled errors anymore. You have to take care of proper flushing and cleanup yourself (see README for example).
|
21
|
+
|
3
22
|
## 0.3.3 (2021-06-07)
|
4
23
|
|
5
24
|
### Changes
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ears (0.
|
4
|
+
ears (0.7.0)
|
5
5
|
bunny
|
6
6
|
multi_json
|
7
7
|
|
@@ -10,18 +10,20 @@ GEM
|
|
10
10
|
specs:
|
11
11
|
amq-protocol (2.3.2)
|
12
12
|
ast (2.4.2)
|
13
|
-
bunny (2.
|
13
|
+
bunny (2.19.0)
|
14
14
|
amq-protocol (~> 2.3, >= 2.3.1)
|
15
|
+
sorted_set (~> 1, >= 1.0.2)
|
15
16
|
diff-lcs (1.4.4)
|
16
17
|
multi_json (1.15.0)
|
17
18
|
parallel (1.20.1)
|
18
|
-
parser (3.0.
|
19
|
+
parser (3.0.2.0)
|
19
20
|
ast (~> 2.4.1)
|
20
21
|
rainbow (3.0.0)
|
21
|
-
rake (13.0.
|
22
|
+
rake (13.0.6)
|
23
|
+
rbtree (0.4.4)
|
22
24
|
redcarpet (3.5.1)
|
23
25
|
regexp_parser (2.1.1)
|
24
|
-
rexml (3.2.
|
26
|
+
rexml (3.2.5)
|
25
27
|
rspec (3.10.0)
|
26
28
|
rspec-core (~> 3.10.0)
|
27
29
|
rspec-expectations (~> 3.10.0)
|
@@ -35,27 +37,32 @@ GEM
|
|
35
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
36
38
|
rspec-support (~> 3.10.0)
|
37
39
|
rspec-support (3.10.2)
|
38
|
-
rubocop (1.
|
40
|
+
rubocop (1.20.0)
|
39
41
|
parallel (~> 1.10)
|
40
42
|
parser (>= 3.0.0.0)
|
41
43
|
rainbow (>= 2.2.2, < 4.0)
|
42
44
|
regexp_parser (>= 1.8, < 3.0)
|
43
45
|
rexml
|
44
|
-
rubocop-ast (>= 1.
|
46
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
45
47
|
ruby-progressbar (~> 1.7)
|
46
48
|
unicode-display_width (>= 1.4.0, < 3.0)
|
47
|
-
rubocop-ast (1.
|
48
|
-
parser (>=
|
49
|
-
rubocop-rake (0.
|
50
|
-
rubocop
|
51
|
-
rubocop-rspec (2.
|
49
|
+
rubocop-ast (1.11.0)
|
50
|
+
parser (>= 3.0.1.1)
|
51
|
+
rubocop-rake (0.6.0)
|
52
|
+
rubocop (~> 1.0)
|
53
|
+
rubocop-rspec (2.4.0)
|
52
54
|
rubocop (~> 1.0)
|
53
55
|
rubocop-ast (>= 1.1.0)
|
54
56
|
ruby-progressbar (1.11.0)
|
57
|
+
set (1.0.1)
|
58
|
+
sorted_set (1.0.3)
|
59
|
+
rbtree
|
60
|
+
set (~> 1.0)
|
55
61
|
unicode-display_width (2.0.0)
|
56
62
|
yard (0.9.26)
|
57
63
|
|
58
64
|
PLATFORMS
|
65
|
+
arm64-darwin-20
|
59
66
|
x86_64-darwin-20
|
60
67
|
x86_64-linux
|
61
68
|
|
@@ -70,4 +77,4 @@ DEPENDENCIES
|
|
70
77
|
yard
|
71
78
|
|
72
79
|
BUNDLED WITH
|
73
|
-
2.2.
|
80
|
+
2.2.22
|
data/README.md
CHANGED
@@ -22,16 +22,19 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
### Basic usage
|
24
24
|
|
25
|
-
First, you should configure
|
25
|
+
First, you should configure `Ears`.
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
require 'ears'
|
29
29
|
|
30
30
|
Ears.configure do |config|
|
31
31
|
config.rabbitmq_url = 'amqp://user:password@myrmq:5672'
|
32
|
+
config.connection_name = 'My Consumer'
|
32
33
|
end
|
33
34
|
```
|
34
35
|
|
36
|
+
_Note_: `connection_name` is a mandatory setting!
|
37
|
+
|
35
38
|
Next, define your exchanges, queues, and consumers by calling `Ears.setup`.
|
36
39
|
|
37
40
|
```ruby
|
@@ -63,6 +66,16 @@ class MyConsumer < Ears::Consumer
|
|
63
66
|
end
|
64
67
|
```
|
65
68
|
|
69
|
+
And, do not forget to run it. Be prepared that unhandled errors will be reraised. So, take care of cleanup work.
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
begin
|
73
|
+
Ears.run!
|
74
|
+
ensure
|
75
|
+
# all your cleanup work goes here...
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
66
79
|
At the end of the `#work` method, you must always return `ack`, `reject`, or `requeue` to signal what should be done with the message.
|
67
80
|
|
68
81
|
### Middlewares
|
@@ -143,6 +156,48 @@ Ears.setup do
|
|
143
156
|
end
|
144
157
|
```
|
145
158
|
|
159
|
+
### Implementing a retrying queue
|
160
|
+
|
161
|
+
Sometimes you want to automatically retry processing a message, in case it just failed due to temporary problems. In that case, you can set the `retry_queue` and `retry_delay` parameters when creating the queue.
|
162
|
+
|
163
|
+
```ruby
|
164
|
+
my_queue =
|
165
|
+
queue('my_queue', durable: true, retry_queue: true, retry_delay: 5000)
|
166
|
+
```
|
167
|
+
|
168
|
+
This will automatically create a queue named `my_queue.retry` and use the arguments `x-dead-letter-exchange` and `x-dead-letter-routing-key` to route rejected messages to it. When routed to the retry queue, messages will wait there for the number of milliseconds specified in `retry_delay`, after which they will be redelivered to the original queue.
|
169
|
+
|
170
|
+
This will happen indefinitely, so if you want to bail out of this cycle at some point, it is best to use the `error_queue` option to create an error queue and then use the `MaxRetries` middleware to route messages to this error queue after a certain amount of retries.
|
171
|
+
|
172
|
+
### Implementing an error queue
|
173
|
+
|
174
|
+
You can set the `error_queue` parameter to automatically create an error queue.
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
my_queue =
|
178
|
+
queue(
|
179
|
+
'my_queue',
|
180
|
+
durable: true,
|
181
|
+
retry_queue: true,
|
182
|
+
retry_delay: 5000,
|
183
|
+
error_queue: true,
|
184
|
+
)
|
185
|
+
```
|
186
|
+
|
187
|
+
This will automatically create a queue named `my_queue.error`. It does not have any special properties, the helper's main purpose is to enforce naming conventions. In your consumer, you should then use the `MaxRetries` middleware to route messages to the error queue after a certain amount of retries.
|
188
|
+
|
189
|
+
```ruby
|
190
|
+
class MyConsumer < Ears::Consumer
|
191
|
+
use Ears::Middlewares::MaxRetries, retries: 3, error_queue: 'my_queue.error'
|
192
|
+
|
193
|
+
def work(delivery_info, metadata, payload)
|
194
|
+
# ...
|
195
|
+
end
|
196
|
+
end
|
197
|
+
```
|
198
|
+
|
199
|
+
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.
|
200
|
+
|
146
201
|
## Documentation
|
147
202
|
|
148
203
|
If you need more in-depth information, look at [our API documentation](https://www.rubydoc.info/gems/ears).
|
data/ears.gemspec
CHANGED
@@ -19,6 +19,12 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.metadata['changelog_uri'] =
|
20
20
|
'https://github.com/ivx/ears/blob/master/CHANGELOG.md'
|
21
21
|
|
22
|
+
spec.post_install_message =
|
23
|
+
'
|
24
|
+
Ears: the new version changed the exit behaviour in case of uncaught exceptions.
|
25
|
+
You may want to have a look into the CHANGELOG!
|
26
|
+
'
|
27
|
+
|
22
28
|
spec.files =
|
23
29
|
Dir.chdir(File.expand_path('..', __FILE__)) do
|
24
30
|
`git ls-files -z`.split("\x0").reject do |f|
|
data/lib/ears/configuration.rb
CHANGED
@@ -1,13 +1,23 @@
|
|
1
1
|
module Ears
|
2
2
|
# The class representing the global {Ears} configuration.
|
3
3
|
class Configuration
|
4
|
+
class ConnectionNameMissing < StandardError
|
5
|
+
end
|
6
|
+
|
4
7
|
DEFAULT_RABBITMQ_URL = 'amqp://guest:guest@localhost:5672'
|
5
8
|
|
6
9
|
# @return [String] the connection string for RabbitMQ.
|
7
10
|
attr_accessor :rabbitmq_url
|
8
11
|
|
12
|
+
# @return [String] the name for the RabbitMQ connection.
|
13
|
+
attr_accessor :connection_name
|
14
|
+
|
9
15
|
def initialize
|
10
16
|
@rabbitmq_url = DEFAULT_RABBITMQ_URL
|
11
17
|
end
|
18
|
+
|
19
|
+
def validate!
|
20
|
+
raise ConnectionNameMissing unless connection_name
|
21
|
+
end
|
12
22
|
end
|
13
23
|
end
|
data/lib/ears/consumer.rb
CHANGED
@@ -46,11 +46,14 @@ module Ears
|
|
46
46
|
# @param [String] payload The payload of the received message.
|
47
47
|
# @raise [InvalidReturnError] if you return something other than +:ack+, +:reject+ or +:requeue+ from {#work}.
|
48
48
|
def process_delivery(delivery_info, metadata, payload)
|
49
|
-
self
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
self
|
50
|
+
.class
|
51
|
+
.middlewares
|
52
|
+
.reverse
|
53
|
+
.reduce(work_proc) do |next_middleware, middleware|
|
54
|
+
nest_middleware(middleware, next_middleware)
|
55
|
+
end
|
56
|
+
.call(delivery_info, metadata, payload)
|
54
57
|
end
|
55
58
|
|
56
59
|
protected
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'ears/middleware'
|
2
|
+
|
3
|
+
module Ears
|
4
|
+
module Middlewares
|
5
|
+
# A middleware that automatically puts messages on an error queue when the specified number of retries are exceeded.
|
6
|
+
class MaxRetries < Middleware
|
7
|
+
# @param [Hash] opts The options for the middleware.
|
8
|
+
# @option opts [Integer] :retries The number of retries before the message is sent to the error queue.
|
9
|
+
# @option opts [String] :error_queue The name of the queue where messages should be sent to when the max retries are reached.
|
10
|
+
def initialize(opts)
|
11
|
+
super()
|
12
|
+
@retries = opts.fetch(:retries)
|
13
|
+
@error_queue = opts.fetch(:error_queue)
|
14
|
+
end
|
15
|
+
|
16
|
+
def call(delivery_info, metadata, payload, app)
|
17
|
+
return handle_exceeded(payload) if retries_exceeded?(metadata)
|
18
|
+
app.call(delivery_info, metadata, payload)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
attr_reader :retries, :error_queue
|
24
|
+
|
25
|
+
def handle_exceeded(payload)
|
26
|
+
Bunny::Exchange
|
27
|
+
.default(Ears.channel)
|
28
|
+
.publish(payload, routing_key: error_queue)
|
29
|
+
:ack
|
30
|
+
end
|
31
|
+
|
32
|
+
def retries_exceeded?(metadata)
|
33
|
+
rejected_deaths =
|
34
|
+
metadata
|
35
|
+
.headers
|
36
|
+
.fetch('x-death', [])
|
37
|
+
.select { |death| death['reason'] == 'rejected' }
|
38
|
+
|
39
|
+
return false unless rejected_deaths.any?
|
40
|
+
|
41
|
+
retry_count = rejected_deaths.map { |death| death['count'] }.max
|
42
|
+
retry_count > @retries
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/ears/setup.rb
CHANGED
@@ -5,6 +5,8 @@ require 'ears/consumer_wrapper'
|
|
5
5
|
module Ears
|
6
6
|
# Contains methods used in {Ears.setup} to set up your exchanges, queues and consumers.
|
7
7
|
class Setup
|
8
|
+
QUEUE_PARAMS = %i[retry_queue retry_delay error_queue]
|
9
|
+
|
8
10
|
# Creates a new exchange if it does not already exist.
|
9
11
|
#
|
10
12
|
# @param [String] name The name of the exchange.
|
@@ -19,9 +21,22 @@ module Ears
|
|
19
21
|
#
|
20
22
|
# @param [String] name The name of the queue.
|
21
23
|
# @param [Hash] opts The options for the queue. These are passed on to +Bunny::Exchange.new+.
|
24
|
+
# @option args [Boolean] :retry_queue (false) Whether a retry queue should be created. The retry queue is configured as a dead-letter-exchange of the original queue automatically. The name of the queue will be the given name suffixed with ".retry".
|
25
|
+
# @option args [Integer] :retry_delay (5000) How long (in ms) a retried message is delayed before being routed back to the original queue.
|
26
|
+
# @option args [Boolean] :error_queue (false) Whether an error queue should be created. The name of the queue will be the given name suffixed with ".error".
|
22
27
|
# @return [Bunny::Queue] The queue that was either newly created or was already there.
|
23
28
|
def queue(name, opts = {})
|
24
|
-
|
29
|
+
bunny_opts = opts.reject { |k, _| QUEUE_PARAMS.include?(k) }
|
30
|
+
retry_delay = opts.fetch(:retry_delay, 5000)
|
31
|
+
|
32
|
+
create_retry_queue(name, retry_delay, bunny_opts) if opts[:retry_queue]
|
33
|
+
create_error_queue(name, bunny_opts) if opts[:error_queue]
|
34
|
+
|
35
|
+
Bunny::Queue.new(
|
36
|
+
Ears.channel,
|
37
|
+
name,
|
38
|
+
bunny_opts.merge(retry_opts(name, opts)),
|
39
|
+
)
|
25
40
|
end
|
26
41
|
|
27
42
|
# Creates and starts one or many consumers bound to the given queue.
|
@@ -46,6 +61,19 @@ module Ears
|
|
46
61
|
|
47
62
|
private
|
48
63
|
|
64
|
+
def retry_opts(name, opts)
|
65
|
+
if opts[:retry_queue]
|
66
|
+
{
|
67
|
+
arguments: {
|
68
|
+
'x-dead-letter-exchange' => '',
|
69
|
+
'x-dead-letter-routing-key' => "#{name}.retry",
|
70
|
+
},
|
71
|
+
}
|
72
|
+
else
|
73
|
+
{}
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
49
77
|
def create_consumer(queue, consumer_class, args, number)
|
50
78
|
ConsumerWrapper.new(
|
51
79
|
consumer_class.new,
|
@@ -69,5 +97,27 @@ module Ears
|
|
69
97
|
def create_consumer_queue(queue, args)
|
70
98
|
Bunny::Queue.new(create_consumer_channel(args), queue.name, queue.options)
|
71
99
|
end
|
100
|
+
|
101
|
+
def create_retry_queue(name, delay, opts)
|
102
|
+
Bunny::Queue.new(
|
103
|
+
Ears.channel,
|
104
|
+
"#{name}.retry",
|
105
|
+
opts.merge(retry_queue_opts(name, delay)),
|
106
|
+
)
|
107
|
+
end
|
108
|
+
|
109
|
+
def retry_queue_opts(name, delay)
|
110
|
+
{
|
111
|
+
arguments: {
|
112
|
+
'x-message-ttl' => delay,
|
113
|
+
'x-dead-letter-exchange' => '',
|
114
|
+
'x-dead-letter-routing-key' => name,
|
115
|
+
},
|
116
|
+
}
|
117
|
+
end
|
118
|
+
|
119
|
+
def create_error_queue(name, opts)
|
120
|
+
Bunny::Queue.new(Ears.channel, "#{name}.error", opts)
|
121
|
+
end
|
72
122
|
end
|
73
123
|
end
|
data/lib/ears/version.rb
CHANGED
data/lib/ears.rb
CHANGED
@@ -18,13 +18,20 @@ module Ears
|
|
18
18
|
# @yieldparam configuration [Ears::Configuration] The global configuration instance.
|
19
19
|
def configure
|
20
20
|
yield(configuration)
|
21
|
+
configuration.validate!
|
21
22
|
end
|
22
23
|
|
23
24
|
# The global RabbitMQ connection used by Ears.
|
24
25
|
#
|
25
26
|
# @return [Bunny::Session]
|
26
27
|
def connection
|
27
|
-
@connection ||=
|
28
|
+
@connection ||=
|
29
|
+
Bunny
|
30
|
+
.new(
|
31
|
+
configuration.rabbitmq_url,
|
32
|
+
connection_name: configuration.connection_name,
|
33
|
+
)
|
34
|
+
.tap { |conn| conn.start }
|
28
35
|
end
|
29
36
|
|
30
37
|
# The channel for the current thread.
|
@@ -51,7 +58,8 @@ module Ears
|
|
51
58
|
running = true
|
52
59
|
Signal.trap('INT') { running = false }
|
53
60
|
Signal.trap('TERM') { running = false }
|
54
|
-
sleep 1 while running &&
|
61
|
+
sleep 1 while running && @error.nil?
|
62
|
+
raise @error if @error
|
55
63
|
end
|
56
64
|
|
57
65
|
# Signals that an uncaught error has occurred and the process should be stopped.
|
@@ -59,12 +67,13 @@ module Ears
|
|
59
67
|
# @param [Exception] error The unhandled error that occurred.
|
60
68
|
def error!(error)
|
61
69
|
puts(error.full_message)
|
62
|
-
@
|
70
|
+
@error = error
|
63
71
|
end
|
64
72
|
|
65
73
|
# Used internally for testing.
|
66
74
|
def reset!
|
67
75
|
@connection = nil
|
76
|
+
@configuration = nil
|
68
77
|
Thread.current[:ears_channel] = nil
|
69
78
|
end
|
70
79
|
end
|
data/package-lock.json
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
{
|
2
|
+
"name": "ears",
|
3
|
+
"lockfileVersion": 2,
|
4
|
+
"requires": true,
|
5
|
+
"packages": {
|
6
|
+
"": {
|
7
|
+
"name": "ears",
|
8
|
+
"devDependencies": {
|
9
|
+
"@invisionag/prettier-config-ivx": "^3.0.1",
|
10
|
+
"@prettier/plugin-ruby": "^2.0.0",
|
11
|
+
"prettier": "^2.4.1"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"node_modules/@invisionag/prettier-config-ivx": {
|
15
|
+
"version": "3.0.1",
|
16
|
+
"resolved": "https://registry.npmjs.org/@invisionag/prettier-config-ivx/-/prettier-config-ivx-3.0.1.tgz",
|
17
|
+
"integrity": "sha512-l9oq6oWH/5f55StS8btmB4LfebfziO9tOY62ItJBwF4nKeMgI/iKBJ97r9Sqkxbq3qOKERuG1u4rAStX9m9GTg==",
|
18
|
+
"dev": true,
|
19
|
+
"peerDependencies": {
|
20
|
+
"prettier": ">=2.0.0"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"node_modules/@prettier/plugin-ruby": {
|
24
|
+
"version": "2.0.0",
|
25
|
+
"resolved": "https://registry.npmjs.org/@prettier/plugin-ruby/-/plugin-ruby-2.0.0.tgz",
|
26
|
+
"integrity": "sha512-pA0rjTi5J7cT86XPNhXp7CpdV2Tlyj5oqDIsnQRxMu2P7LY2KJI/pyOSM8pzTH8BgRyQfe1P1NPCcTwxUnUWtQ==",
|
27
|
+
"dev": true,
|
28
|
+
"dependencies": {
|
29
|
+
"prettier": ">=2.3.0"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
"node_modules/prettier": {
|
33
|
+
"version": "2.4.1",
|
34
|
+
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
|
35
|
+
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==",
|
36
|
+
"dev": true,
|
37
|
+
"bin": {
|
38
|
+
"prettier": "bin-prettier.js"
|
39
|
+
},
|
40
|
+
"engines": {
|
41
|
+
"node": ">=10.13.0"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"dependencies": {
|
46
|
+
"@invisionag/prettier-config-ivx": {
|
47
|
+
"version": "3.0.1",
|
48
|
+
"resolved": "https://registry.npmjs.org/@invisionag/prettier-config-ivx/-/prettier-config-ivx-3.0.1.tgz",
|
49
|
+
"integrity": "sha512-l9oq6oWH/5f55StS8btmB4LfebfziO9tOY62ItJBwF4nKeMgI/iKBJ97r9Sqkxbq3qOKERuG1u4rAStX9m9GTg==",
|
50
|
+
"dev": true,
|
51
|
+
"requires": {}
|
52
|
+
},
|
53
|
+
"@prettier/plugin-ruby": {
|
54
|
+
"version": "2.0.0",
|
55
|
+
"resolved": "https://registry.npmjs.org/@prettier/plugin-ruby/-/plugin-ruby-2.0.0.tgz",
|
56
|
+
"integrity": "sha512-pA0rjTi5J7cT86XPNhXp7CpdV2Tlyj5oqDIsnQRxMu2P7LY2KJI/pyOSM8pzTH8BgRyQfe1P1NPCcTwxUnUWtQ==",
|
57
|
+
"dev": true,
|
58
|
+
"requires": {
|
59
|
+
"prettier": ">=2.3.0"
|
60
|
+
}
|
61
|
+
},
|
62
|
+
"prettier": {
|
63
|
+
"version": "2.4.1",
|
64
|
+
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
|
65
|
+
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==",
|
66
|
+
"dev": true
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
data/package.json
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
"private": true,
|
4
4
|
"scripts": {
|
5
5
|
"prettify": "prettier \"**/*.{ru,rb,yml,yaml,md,gemspec,json}\" --ignore-path=\".gitignore\"",
|
6
|
-
"lint": "
|
7
|
-
"format": "
|
6
|
+
"lint": "npm run prettify -- --check",
|
7
|
+
"format": "npm run prettify -- --write"
|
8
8
|
},
|
9
9
|
"devDependencies": {
|
10
|
-
"@invisionag/prettier-config-ivx": "^
|
11
|
-
"@prettier/plugin-ruby": "^
|
12
|
-
"prettier": "^2.
|
10
|
+
"@invisionag/prettier-config-ivx": "^3.0.1",
|
11
|
+
"@prettier/plugin-ruby": "^2.0.0",
|
12
|
+
"prettier": "^2.4.1"
|
13
13
|
},
|
14
14
|
"prettier": "@invisionag/prettier-config-ivx"
|
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.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Mainz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06
|
11
|
+
date: 2021-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -163,10 +163,11 @@ files:
|
|
163
163
|
- lib/ears/middleware.rb
|
164
164
|
- lib/ears/middlewares/appsignal.rb
|
165
165
|
- lib/ears/middlewares/json.rb
|
166
|
+
- lib/ears/middlewares/max_retries.rb
|
166
167
|
- lib/ears/setup.rb
|
167
168
|
- lib/ears/version.rb
|
169
|
+
- package-lock.json
|
168
170
|
- package.json
|
169
|
-
- yarn.lock
|
170
171
|
homepage: https://github.com/ivx/ears
|
171
172
|
licenses:
|
172
173
|
- MIT
|
@@ -175,7 +176,10 @@ metadata:
|
|
175
176
|
homepage_uri: https://github.com/ivx/ears
|
176
177
|
source_code_uri: https://github.com/ivx/ears
|
177
178
|
changelog_uri: https://github.com/ivx/ears/blob/master/CHANGELOG.md
|
178
|
-
post_install_message:
|
179
|
+
post_install_message: |2
|
180
|
+
|
181
|
+
Ears: the new version changed the exit behaviour in case of uncaught exceptions.
|
182
|
+
You may want to have a look into the CHANGELOG!
|
179
183
|
rdoc_options: []
|
180
184
|
require_paths:
|
181
185
|
- lib
|
@@ -190,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
194
|
- !ruby/object:Gem::Version
|
191
195
|
version: '0'
|
192
196
|
requirements: []
|
193
|
-
rubygems_version: 3.2.
|
197
|
+
rubygems_version: 3.2.22
|
194
198
|
signing_key:
|
195
199
|
specification_version: 4
|
196
200
|
summary: A gem for building RabbitMQ consumers.
|
data/yarn.lock
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
2
|
-
# yarn lockfile v1
|
3
|
-
|
4
|
-
|
5
|
-
"@invisionag/prettier-config-ivx@^2.1.1":
|
6
|
-
version "2.1.1"
|
7
|
-
resolved "https://registry.yarnpkg.com/@invisionag/prettier-config-ivx/-/prettier-config-ivx-2.1.1.tgz#8899ec027cfde823ff497f2d67326bc14fbdf4bd"
|
8
|
-
integrity sha512-vujtO8XVSwoWU6k1lRZzvOeMCNvX2injJsEfG5rAfQGBjcN0J4a0zwXYBb6GI4gNZsYj6C6iD1Nk2HsMXKFByg==
|
9
|
-
|
10
|
-
"@prettier/plugin-ruby@^1.5.2":
|
11
|
-
version "1.5.3"
|
12
|
-
resolved "https://registry.yarnpkg.com/@prettier/plugin-ruby/-/plugin-ruby-1.5.3.tgz#04c1058fce59651c38c02ace39faa7a0daa4264b"
|
13
|
-
integrity sha512-YXXf0PGsUOMk40UlfnjDeF3NuRmKE4ddN4L2drFaskhqcB/P9jNGabz5FsGJdJt+ibPxfRsqx05gfxGLZo1wHg==
|
14
|
-
dependencies:
|
15
|
-
prettier ">=1.10"
|
16
|
-
|
17
|
-
prettier@>=1.10, prettier@^2.2.0:
|
18
|
-
version "2.2.1"
|
19
|
-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
20
|
-
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|