rabbit_feed 2.4.1 → 2.4.2

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
  SHA1:
3
- metadata.gz: 6b5abf99a3ec7c000ae4cdce1305089b50a75884
4
- data.tar.gz: c4ac6137152be286d2185fce267b8b5e7a92271f
3
+ metadata.gz: 8a93c5517c96292a4f5b66d94f7b47e22a4b03e7
4
+ data.tar.gz: e7287f3b58512d1f978b12f76c4cbbf0dcf93de3
5
5
  SHA512:
6
- metadata.gz: 1782920ca72bc88963633bf1c628e8a962850b1bf65c3b31401b87545372c47bcbe0f5ebe877e581b7584ba4ae1aafe775d6d270d684f3c9915d43783d73c94c
7
- data.tar.gz: 39c27c3e838126da3d186e133680c1c917758d20d9aabb1d97bd07c079f0065f516a8d138cd2d5cfe0630e7303f0ee9631d1afd658adfa4e1ac7c0979a290de3
6
+ metadata.gz: 0915d485965f4d1d8af0164c1fdfa958f6e332405c7dbb48416a9c0646911320362a780abbcf7382cedf95a5014c0cd0818906f4d859a545f1312d454e6c8d49
7
+ data.tar.gz: 024c4dace050cb7c72e09333d88a5eede77e68f4d1c549daaf4c557a94ad4fd5f67e6647931cfb5731219775bb2c4af04018eb0ca2bc34219d71936eb0b985bf
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../
3
3
  specs:
4
- rabbit_feed (2.4.1)
4
+ rabbit_feed (2.4.2)
5
5
  activemodel (>= 3.2.0, < 5.0.0)
6
6
  activesupport (>= 3.2.0, < 5.0.0)
7
7
  avro (>= 1.5.4, < 1.8.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../
3
3
  specs:
4
- rabbit_feed (2.4.1)
4
+ rabbit_feed (2.4.2)
5
5
  activemodel (>= 3.2.0, < 5.0.0)
6
6
  activesupport (>= 3.2.0, < 5.0.0)
7
7
  avro (>= 1.5.4, < 1.8.0)
@@ -37,7 +37,7 @@ module RabbitFeed
37
37
  end
38
38
 
39
39
  sleep # Sleep indefinitely, as the consumer runs in its own thread
40
- rescue SystemExit, Interrupt
40
+ rescue SystemExit, Interrupt, SignalException
41
41
  RabbitFeed.log.info {{ event: :unsubscribe_from_queue, queue: RabbitFeed.configuration.queue }}
42
42
  ensure
43
43
  (cancel_consumer consumer) if consumer.present?
@@ -1,3 +1,3 @@
1
1
  module RabbitFeed
2
- VERSION = '2.4.1'
2
+ VERSION = '2.4.2'
3
3
  end
@@ -79,6 +79,34 @@ module RabbitFeed
79
79
 
80
80
  context 'when an exception is raised' do
81
81
 
82
+ context 'when the exception is' do
83
+ [SystemExit.new, Interrupt.new, SignalException.new('SIGTERM')].each do |exception|
84
+ context exception.to_s do
85
+ let!(:logger) do
86
+ test_logger_string_io = StringIO.new
87
+ logger = Logger.new test_logger_string_io
88
+ logger.formatter = RabbitFeed::JsonLogFormatter
89
+ old_logger = RabbitFeed.log
90
+ RabbitFeed.log = logger
91
+ test_logger_string_io
92
+ end
93
+
94
+ before { allow(subject).to receive(:handle_message).and_raise(exception) }
95
+
96
+ it 'does not re-raise error' do
97
+ expect { subject.consume { } }.to_not raise_error
98
+ end
99
+
100
+ it 'logs unsubscribe_from_queue' do
101
+ subject.consume { }
102
+
103
+ expect(logger.string).to match /unsubscribe_from_queue/
104
+ end
105
+
106
+ end
107
+ end
108
+ end
109
+
82
110
  context 'when consumer_exit_after_fail is true' do
83
111
  before { allow(RabbitFeed.configuration).to receive(:consumer_exit_after_fail).and_return(true) }
84
112
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_feed
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simply Business
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-23 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -368,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
368
368
  version: '0'
369
369
  requirements: []
370
370
  rubyforge_project:
371
- rubygems_version: 2.4.5.1
371
+ rubygems_version: 2.0.14
372
372
  signing_key:
373
373
  specification_version: 4
374
374
  summary: Enables your Ruby applications to perform centralized event logging with