stuffed_bunny 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -2
- data/lib/stuffed_bunny/bunny_overrides.rb +2 -4
- data/lib/stuffed_bunny/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'bunny'
|
2
|
-
require 'ostruct'
|
3
2
|
|
4
3
|
# Overriding the Bunny gem's modules and classes.
|
5
4
|
#
|
@@ -41,7 +40,7 @@ module Bunny
|
|
41
40
|
@type = options[:type]
|
42
41
|
end
|
43
42
|
|
44
|
-
# To facilite testing this adds
|
43
|
+
# To facilite testing this adds a Struct containing the data
|
45
44
|
# +message+ and routing +key+ to the +routed_messages+.
|
46
45
|
#
|
47
46
|
# Example usage:
|
@@ -57,8 +56,7 @@ module Bunny
|
|
57
56
|
# assert_equal "some message", routed_message.message
|
58
57
|
# assert_equal "some.routing.key", routed_message.key
|
59
58
|
def publish(data, options = {})
|
60
|
-
@routed_messages <<
|
61
|
-
:key => options[:key])
|
59
|
+
@routed_messages << Struct.new(:message, :key).new(data, options[:key])
|
62
60
|
end
|
63
61
|
end
|
64
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stuffed_bunny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-12-
|
13
|
+
date: 2012-12-06 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: Provides stubbing of the Bunny gem.
|
16
16
|
email:
|