ElmerFudd 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ElmerFudd.rb +20 -5
- data/lib/ElmerFudd/version.rb +1 -1
- 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: bc8da26705616620eae01fffbc82e760c13253d7
|
4
|
+
data.tar.gz: 855f6e8f65dd9f54ca44d30ac28fb5bcd53f37be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 176046832909f4f3fcabf985ce5fde5db93ec597a646ed1b81714526b761101e55c0602be5077600110b8b17d33f50f56527435bff9e8f4d88ff95e4fc120a41
|
7
|
+
data.tar.gz: 1616f43d34a640be58e652b62c2f7bf9975c9db91a278efe3dd1b82cce315e1f55c6166c0756f1b402218cd98bfd0b582038cfd3ec55c4bd310c52d7dddef3e3
|
data/lib/ElmerFudd.rb
CHANGED
@@ -177,13 +177,28 @@ module ElmerFudd
|
|
177
177
|
end
|
178
178
|
|
179
179
|
class DropFailedFilter
|
180
|
-
|
180
|
+
include Filter
|
181
|
+
|
181
182
|
def self.call(env, message, filters)
|
183
|
+
new.call(env, message, filters)
|
184
|
+
end
|
185
|
+
|
186
|
+
def initialize(exception: Exception,
|
187
|
+
exception_message_matches: /.*/)
|
188
|
+
@exception = exception
|
189
|
+
@exception_message_matches = exception_message_matches
|
190
|
+
end
|
191
|
+
|
192
|
+
def call(env, message, filters)
|
182
193
|
call_next(env, message, filters)
|
183
|
-
rescue
|
184
|
-
|
185
|
-
|
186
|
-
|
194
|
+
rescue @exception => e
|
195
|
+
if e.message =~ @exception_message_matches
|
196
|
+
env.logger.info "Ignoring failed payload: #{message.payload}"
|
197
|
+
env.logger.debug "#{e.class}: #{e.message}"
|
198
|
+
e.backtrace.each { |l| env.logger.debug(l) }
|
199
|
+
else
|
200
|
+
raise
|
201
|
+
end
|
187
202
|
end
|
188
203
|
end
|
189
204
|
|
data/lib/ElmerFudd/version.rb
CHANGED
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.15
|
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-07-
|
12
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bunny
|