fake_smith 0.0.8 → 0.0.9

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: ca8446484ab109dc97446f3e3e96eb118c868c12
4
- data.tar.gz: c98222de3465d17252de59b36e7d631d07bd93e5
3
+ metadata.gz: c136df845572e7ab0ab0626cd1d45bc95819c470
4
+ data.tar.gz: 616523a36d05ddeee705014e85035e5471bc3e87
5
5
  SHA512:
6
- metadata.gz: 57ca17cad38e5ec2bb20ad0cca8021c448f9eb47387e6e7571d6c04ee621764b0011baf27c91bfbd8e12838a8f4a1d7e5d198646b342fb3f34404fcb814340fd
7
- data.tar.gz: 144caaaae3d4851ab4246583728918590c08e6be52717058d1f95676cd87580e6b0a2b8c298fe2b6090d84321e7b225cec410afb763928d5a1aba8e341036626
6
+ metadata.gz: 04b613410fc6babeb64f68081da36cc79327f8419129f5be7ebfac2d39eea4fdb328a6ad98d09e5691d5e0aa0d0187618bccefb30a4244d0132e6ad75f5605f4
7
+ data.tar.gz: 0337515174ec03b2e45f66b24c2e68cd1740f3b64006c235d467ccf037ad046e3c17ca6992249410d5bb29b14762f63afb7023211308991b8023dcde65d59ef6
@@ -1,3 +1,3 @@
1
1
  class FakeSmith
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/fake_smith.rb CHANGED
@@ -91,13 +91,17 @@ module Smith
91
91
  class Sender
92
92
  def initialize(queue_name, &blk)
93
93
  @queue_name = queue_name
94
- blk.call
94
+ blk.call(self) if block_given?
95
95
  end
96
96
 
97
97
  def publish(message, &blk)
98
98
  FakeSmith.add_message(@queue_name, message)
99
99
  blk.call
100
100
  end
101
+
102
+ def message_count(&blk)
103
+ blk.call FakeSmith.get_messages(@queue_name).count if block_given?
104
+ end
101
105
  end
102
106
  end
103
107
  end
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.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Griffith