ElmerFudd 0.0.2 → 0.0.3

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: 9932ca292d2a8f566de3ecdea95018eac7dce021
4
- data.tar.gz: 85c5dabb9551cbd25da1436bc2a75139fe2cd26e
3
+ metadata.gz: d82dbca5e1e9fe7636d0fcdd47e0b325e564a170
4
+ data.tar.gz: f5c2471a901807d192d2525e08e373cdb58c8d7f
5
5
  SHA512:
6
- metadata.gz: e07eb2cf8350aeccd2490b63a566ba8af189c11ee64f0b33c5eca1d90cbadf5aa93f1b2ce7621edcf7095d4aba6a0fd9076303467b8df328616da18b1a4e5622
7
- data.tar.gz: ff8162245807a857568dfbca639737d7b7812b1c60abfebfb5f45792eaf726e2d8517f852e2931a10dede26d77b5bc85d7262274c7050b25ab76946c6b08c4d5
6
+ metadata.gz: 344d7e48bbaeab4be0aa8ae373d1b0fd179f90d220faea79b56603c0e05e125919bcdbae66810331e20e535cc40c2ca0b0c3c708bd9fe96fd61b7e6d6010e51d
7
+ data.tar.gz: 2b1c3cab0b89d75a5dfa81f54690d7026944f0718c8d09ddf6f673825f9259684f953bdefacee2d6e1ddcc8710708bf6c90c589b5592a4c9330977a76a7836e6
@@ -1,3 +1,3 @@
1
1
  module ElmerFudd
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/ElmerFudd.rb CHANGED
@@ -75,11 +75,11 @@ module ElmerFudd
75
75
  end
76
76
 
77
77
  def self.handle_event(route, filters: [], handler: nil, &block)
78
- handlers << TopicHandler.new(route, handler || block, (@filters + filters).uniq)
78
+ handlers << TopicHandler.new(route, handler || block, (@filters + filters + [DiscardReturnValueFilter]).uniq)
79
79
  end
80
80
 
81
81
  def self.handle_cast(route, filters: [], handler: nil, &block)
82
- handlers << DirectHandler.new(route, handler || block, (@filters + filters).uniq)
82
+ handlers << DirectHandler.new(route, handler || block, (@filters + filters + [DiscardReturnValueFilter]).uniq)
83
83
  end
84
84
 
85
85
  def self.handle_call(route, filters: [], handler: nil, &block)
@@ -215,6 +215,14 @@ module ElmerFudd
215
215
  end
216
216
  end
217
217
 
218
+ class DiscardReturnValueFilter
219
+ extend Filter
220
+ def self.call(env, message, filters)
221
+ call_next(env, message, filters)
222
+ nil
223
+ end
224
+ end
225
+
218
226
  class RetryFilter
219
227
  include Filter
220
228
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ElmerFudd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrzej Sliwa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-26 00:00:00.000000000 Z
11
+ date: 2014-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny