bugs_bunny 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
data/bin/bbunny CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ # $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
  require 'rubygems'
4
4
  require 'optparse'
5
5
  require 'bugs_bunny'
data/bugs_bunny.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bugs_bunny}
8
- s.version = "0.0.8"
8
+ s.version = "0.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marcos Piccinini"]
@@ -19,7 +19,8 @@ module BugsBunny
19
19
  end
20
20
 
21
21
  def initialize(*params)
22
- @name, d, a,_,_,@msgs,_,_,@users, @transactions, @mem = *params
22
+ @name, d, a,_,_,ready,_,all,@users, @transactions, @mem = *params
23
+ @msgs = ready.to_i + all.to_i
23
24
  @durable = eval(d) if d #ugly
24
25
  @auto_delete = eval(a) if a #more ugly
25
26
  @mq = MQ.queue(@name, :passive => true)
@@ -40,7 +41,7 @@ module BugsBunny
40
41
 
41
42
  def inspect
42
43
  puts ""
43
- @mq.subscribe(:ack => true) do |h, body| #, :nowait => false
44
+ @mq.bind(MQ.fanout(@name)).subscribe(:ack => true) do |h, body| #, :nowait => false
44
45
  puts "-------\n"
45
46
  print "QUEUE #{h.delivery_tag} (#{h.content_type}): "
46
47
  print "Redelivered " if h.redelivered
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 8
9
- version: 0.0.8
8
+ - 9
9
+ version: 0.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Marcos Piccinini