fake_smith 0.0.4 → 0.0.5

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: 6407b43b2d9f4d5a55cfedce8fee540e1e48ab10
4
- data.tar.gz: cc5f12b85a56c65d296ca0b9db9406d9d69baebd
3
+ metadata.gz: bbb42aa79f19cb7b81bcd0edb8ea889479bf0019
4
+ data.tar.gz: 2be958a2c307267313943529e40035544edcb429
5
5
  SHA512:
6
- metadata.gz: c71109e7e0736d1805fe5b8e567bcfb095fc9dabdb1d287ac4495a86265a358db78ed80f3c18129220276c2005b827a46e066d66638b5e42eed635925c68ce86
7
- data.tar.gz: f1c63746fd5368fd71620a78ddc56c6eb835c30f7f79e9bbe3b2d4fbd0c8277a4172f99bd7fdfdeefd561218b55efb34d19bae805a5d60f43d674e1e3f6c83f2
6
+ metadata.gz: aec9057db360d3454d58cefa68fde67ab617395f4a0dba088365c0e13b2c894554aceed4ced4657b493f05dac6d430a1f88981f78cebc448a1c0af1fa64871a9
7
+ data.tar.gz: 6d35c8ea28362f8e5af6bccb39d728314fed88bedbe26091028d2e93a5e1e577a113ea265e260bdaf2846d5c84162273bced4379a79f81fee45f391eb9492365
data/README.md CHANGED
@@ -30,7 +30,7 @@ In your spec_helper or in your spec simply:
30
30
  require 'fake_smith'
31
31
  ```
32
32
 
33
- This will stub out all smith methods so you are free to test your agents without even enabling EventMachine (though you may need to if you agent depends on eventmachine stuff)
33
+ This will stub out all smith methods so you are free to test your agents without even starting EventMachine (though you may need to if you agent depends on EventMachine stuff)
34
34
 
35
35
  To start your agent:
36
36
 
@@ -1,3 +1,3 @@
1
1
  class FakeSmith
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/fake_smith.rb CHANGED
@@ -2,6 +2,7 @@ require "fake_smith/version"
2
2
 
3
3
  class FakeSmith
4
4
  def self.send_message(queue_name, payload, receiver)
5
+ raise "no subscribers on queue: #{queue_name}" unless subscriptions[queue_name]
5
6
  subscriptions[queue_name].call(payload, receiver)
6
7
  end
7
8
 
@@ -73,6 +74,10 @@ module Smith
73
74
  def subscribe(&blk)
74
75
  FakeSmith.define_subscription(@queue_name, &blk)
75
76
  end
77
+
78
+ def requeue_parameters(opts)
79
+ @requeue_opts = opts
80
+ end
76
81
  end
77
82
  end
78
83
  end
@@ -108,7 +113,9 @@ module Smith
108
113
  end
109
114
 
110
115
  def receiver(queue_name, opts={}, &blk)
111
- Smith::Messaging::Receiver.new(queue_name, opts, &blk)
116
+ r = Smith::Messaging::Receiver.new(queue_name, opts, &blk)
117
+ blk.call r
118
+ r
112
119
  end
113
120
 
114
121
  def sender(queue_name, opts={}, &blk)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_smith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Griffith