ElmerFudd 0.0.9 → 0.0.11
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/lib/ElmerFudd/version.rb +1 -1
- data/lib/ElmerFudd.rb +21 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 669cb05d744873a78642c880d13d8e8884730e4e
|
|
4
|
+
data.tar.gz: 8996f48ca1a45195ea7afe777a843d8c23562e6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19df278d8405cb8c8904261614e7bba819da7b98d5dbbfed8bbab00207fdc50d1863e67a9731ec8d9a4134f6aba4b0a5c98056141b5d01ee5f710343e3cc01aa
|
|
7
|
+
data.tar.gz: 0a55699417da11e1903538f27eeb76c815683d852ff76166867d8d67b5dc48e49eabf012c66bdb9037c2e211d4c7148694848d64f53f920f42a2716a9fc81334
|
data/lib/ElmerFudd/version.rb
CHANGED
data/lib/ElmerFudd.rb
CHANGED
|
@@ -230,6 +230,27 @@ module ElmerFudd
|
|
|
230
230
|
end
|
|
231
231
|
end
|
|
232
232
|
|
|
233
|
+
class RedirectFailedFilter
|
|
234
|
+
include Filter
|
|
235
|
+
def initialize(producer, error_queue, exception: Exception,
|
|
236
|
+
exception_message_matches: /.*/)
|
|
237
|
+
@producer = producer
|
|
238
|
+
@error_queue = error_queue
|
|
239
|
+
@exception = exception
|
|
240
|
+
@exception_message_matches = exception_message_matches
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
def call(env, message, filters)
|
|
244
|
+
call_next(env, message, filters)
|
|
245
|
+
rescue @exception => e
|
|
246
|
+
if e.message =~ @exception_message_matches
|
|
247
|
+
@producer.cast @error_queue, message.payload
|
|
248
|
+
else
|
|
249
|
+
raise
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
233
254
|
class RetryFilter
|
|
234
255
|
include Filter
|
|
235
256
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ElmerFudd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrzej Sliwa
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bunny
|