ElmerFudd 0.0.17 → 0.0.18

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: f89c5aa3e2803b6edc3e45dd83d5ffc802cf9383
4
- data.tar.gz: 6cd2713cfe25845a75b0ad6753d51eee8ce499e7
3
+ metadata.gz: 74999b7aa0290bc49ca4edce1f54520a4f851410
4
+ data.tar.gz: 52f441ed43519db2b3d7f8f3780b79d02442e42a
5
5
  SHA512:
6
- metadata.gz: 7009b94e28241492449ba49498c5e01f6cb6d55f2d3839cdd966cfcbfd976fe5e01bcea606a76ece1490fdd6139afaf3bad93794e562050a6687b2d9c699c48c
7
- data.tar.gz: d4761b1312202cbe4359e980c3334fbdf4643cca6e0e16549cd03ad374f81a13a754584e95283c5f42aa8c677a93cab1e19e2327a7e61fc58a053e2dc6ba1d04
6
+ metadata.gz: 7e245ccf3bcc2d609f391bbae6848235a3d50270d85e039501cf2d46ebcc68f6bf0e8bd625ce366f353e6109e57eed9fea19de10bb32f9c8ec20c83bccf21945
7
+ data.tar.gz: 72fc4d7efc690f659b7a6ae09e85f53ca1ae54a7fb133053135a54afe47b3d6cbd10905900277c1d58c7a01cc8b112906be6ac902c84b1dbea70d7c7bfc75e28
data/README.md CHANGED
@@ -44,15 +44,15 @@ class TestWorker < ElmerFudd::Worker
44
44
  default_filters(ElmerFudd::JsonFilter)
45
45
 
46
46
  handle_cast(Route('test.print')) do |env, message|
47
- puts "message: #{message.payload["text"]"
47
+ puts %{message: #{message.payload["text"]}}
48
48
  end
49
49
 
50
50
  handle_call(Route('test.ping')) do |env, message|
51
- "pong: #{message.payload["text"]"
51
+ %{pong: #{message.payload["text"]}}
52
52
  end
53
53
 
54
54
  handle_call(Route('test.ping')) do |env, message|
55
- "pong: #{message.payload["text"]"
55
+ %{pong: #{message.payload["text"]}}
56
56
  end
57
57
 
58
58
  handle_event(Route('test.log', 'a_topic_exchange' => 'test.#'),
@@ -85,7 +85,7 @@ $rabbit.notify('a_topic_exchange', 'test.log.some.event', count: 1) # will print
85
85
  Filters allow to mutate an incoming message in consumer before it hits appropiate handler or to modify return value (or handle errors) after the handler finishes its job. You can define default filters which will be applied to all handlers in consumer or activate them on handler level by passing filters list as a param, i.e.:
86
86
 
87
87
  ```ruby
88
- handle_cast(Route('math.divide')
88
+ handle_cast(Route('math.divide'),
89
89
  filter: [DropFailedFilter.new(exception: ZeroDivisionError)]) do |env, message|
90
90
  puts "#{payload['a'] / payload['b']}"
91
91
  end
@@ -56,7 +56,7 @@ RSpec::Matchers.define :have_received_cast_on do |queue_name|
56
56
  queue
57
57
  end
58
58
 
59
- failure_message_for_should do |rabbit|
59
+ failure_message do |rabbit|
60
60
  if @count
61
61
  "expected a message on '#{queue_name}' #{@count} times, but received #{queue(rabbit).size} times"
62
62
  else
@@ -64,7 +64,7 @@ RSpec::Matchers.define :have_received_cast_on do |queue_name|
64
64
  end
65
65
  end
66
66
 
67
- failure_message_for_should_not do |rabbit|
67
+ failure_message_when_negated do |rabbit|
68
68
  "expected no message on '#{queue_name}', but receved at least one"
69
69
  end
70
70
 
@@ -96,7 +96,7 @@ RSpec::Matchers.define :have_received_notification_on do |exchange_name, options
96
96
  queue
97
97
  end
98
98
 
99
- failure_message_for_should do |rabbit|
99
+ failure_message do |rabbit|
100
100
  if @count
101
101
  "expected a message on '#{exchange_name}' with routing key '#{routing_key}' #{@count} times, but received #{queue(rabbit).size} times"
102
102
  else
@@ -104,7 +104,7 @@ RSpec::Matchers.define :have_received_notification_on do |exchange_name, options
104
104
  end
105
105
  end
106
106
 
107
- failure_message_for_should_not do |rabbit|
107
+ failure_message_when_negated do |rabbit|
108
108
  "expected no message on '#{queue_name}', but receved at least one"
109
109
  end
110
110
 
@@ -1,3 +1,3 @@
1
1
  module ElmerFudd
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
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.17
4
+ version: 0.0.18
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-10 00:00:00.000000000 Z
12
+ date: 2014-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bunny