ears 0.3.3 → 0.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3835a06bd5867d23683c78bf3c6e5085d1eb2727942513c149321179148653b3
4
- data.tar.gz: 5d4ca8ca77922b26d1a8942711e5041e5424d770cab14b2d71575dc9649dc18f
3
+ metadata.gz: 6b46a87dfab0c7135fbb74534070d44ef48b693f7dfd848b3df9d68ceb915b29
4
+ data.tar.gz: 3880d424b10a408d49a51dfb1f6e22650ede251d23b642ee5983e42cfa4c0b82
5
5
  SHA512:
6
- metadata.gz: b456745babafd48227eefe833562117a7e31cdc098cb0342b7ce6cdcd3bb69cc12005ef96b7ee6ed76c0dd589f6b36bf8094d3ab096b486912ff34a56975bbcb
7
- data.tar.gz: 74019008d3b642ce586ab490cf520f6c2254f2500707503f1c6e7e5330b2dc0eb6aa75d039c15095b39d0c67118ae71545d318ec065de9c09e28e03f700c9428
6
+ metadata.gz: d7c3368085535d3c385778d0711b89755dbe4f5e2fd8f91fb986c573bf4beeb8a86253c00e8238be5cc38c78e5fbe727dc403500c16752985ac7e04e208d9075
7
+ data.tar.gz: ba1ee1434321eb492948027c31d7180d1254f89bcd756cf3edd11f64abdaae9c553841bacc8fef1607939ac6aa8341cb5c9751441c4b48f807bf9ba73e4a8cf4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.3 (2021-07-26)
4
+
5
+ ### Changes
6
+
7
+ - Ears will not exit gracefully on unhandled errors anymore. You have to take care of proper flushing and cleanup yourself (see README for example).
8
+
3
9
  ## 0.3.3 (2021-06-07)
4
10
 
5
11
  ### Changes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ears (0.3.3)
4
+ ears (0.4.3)
5
5
  bunny
6
6
  multi_json
7
7
 
data/README.md CHANGED
@@ -63,6 +63,16 @@ class MyConsumer < Ears::Consumer
63
63
  end
64
64
  ```
65
65
 
66
+ And, do not forget to run it. Be prepared that unhandled errors will be reraised. So, take care of cleanup work.
67
+
68
+ ```ruby
69
+ begin
70
+ Ears.run!
71
+ ensure
72
+ # all your cleanup work goes here...
73
+ end
74
+ ```
75
+
66
76
  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
77
 
68
78
  ### Middlewares
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.rb CHANGED
@@ -52,6 +52,7 @@ module Ears
52
52
  Signal.trap('INT') { running = false }
53
53
  Signal.trap('TERM') { running = false }
54
54
  sleep 1 while running && !@uncaught_error_occurred
55
+ raise @error if @uncaught_error_occurred
55
56
  end
56
57
 
57
58
  # Signals that an uncaught error has occurred and the process should be stopped.
@@ -60,6 +61,7 @@ module Ears
60
61
  def error!(error)
61
62
  puts(error.full_message)
62
63
  @uncaught_error_occurred = true
64
+ @error = error
63
65
  end
64
66
 
65
67
  # Used internally for testing.
data/lib/ears/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ears
2
- VERSION = '0.3.3'
2
+ VERSION = '0.4.3'
3
3
  end
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.3.3
4
+ version: 0.4.3
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-07 00:00:00.000000000 Z
11
+ date: 2021-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -175,7 +175,10 @@ metadata:
175
175
  homepage_uri: https://github.com/ivx/ears
176
176
  source_code_uri: https://github.com/ivx/ears
177
177
  changelog_uri: https://github.com/ivx/ears/blob/master/CHANGELOG.md
178
- post_install_message:
178
+ post_install_message: |2
179
+
180
+ Ears: the new version changed the exit behaviour in case of uncaught exceptions.
181
+ You may want to have a look into the CHANGELOG!
179
182
  rdoc_options: []
180
183
  require_paths:
181
184
  - lib