hot_bunnies 1.3.7-java → 1.3.8-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -59,6 +59,8 @@ module HotBunnies
59
59
  end
60
60
 
61
61
  class Subscription
62
+ attr_reader :channel, :queue_name, :consumer_tag
63
+
62
64
  def initialize(channel, queue_name, options={})
63
65
  @channel = channel
64
66
  @queue_name = queue_name
@@ -96,6 +98,10 @@ module HotBunnies
96
98
  maybe_shutdown_executor
97
99
  end
98
100
 
101
+ def cancelled?
102
+ @cancelled.get
103
+ end
104
+
99
105
  def active?
100
106
  !@cancelled.get && !@subscriber.nil? && !@subscriber.consumer_tag.nil?
101
107
  end
@@ -116,7 +122,7 @@ module HotBunnies
116
122
 
117
123
  def run(&block)
118
124
  @subscriber = BlockingSubscriber.new(@channel, self)
119
- @channel.basic_consume(@queue_name, !@ack, @subscriber.consumer)
125
+ @consumer_tag = @channel.basic_consume(@queue_name, !@ack, @subscriber.consumer)
120
126
  @subscriber.on_message(&block)
121
127
  end
122
128
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module HotBunnies
4
- VERSION = '1.3.7'
4
+ VERSION = '1.3.8'
5
5
  end
metadata CHANGED
@@ -1,27 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot_bunnies
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
4
  prerelease:
6
- segments:
7
- - 1
8
- - 3
9
- - 7
10
- version: 1.3.7
5
+ version: 1.3.8
11
6
  platform: java
12
7
  authors:
13
- - Theo Hultberg
14
- - Michael S. Klishin
8
+ - Theo Hultberg
9
+ - Michael S. Klishin
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
13
 
19
- date: 2012-03-30 00:00:00 Z
14
+ date: 2012-06-07 00:00:00 Z
20
15
  dependencies: []
21
16
 
22
17
  description: A object oriented interface to RabbitMQ that uses the Java driver under the hood
23
18
  email:
24
- - theo@burtcorp.com
19
+ - theo@burtcorp.com
25
20
  executables: []
26
21
 
27
22
  extensions: []
@@ -29,37 +24,37 @@ extensions: []
29
24
  extra_rdoc_files: []
30
25
 
31
26
  files:
32
- - .gitignore
33
- - .rvmrc
34
- - .travis.yml
35
- - Gemfile
36
- - LICENSE
37
- - README.md
38
- - Rakefile
39
- - examples/blocking_subscription.rb
40
- - examples/non_blocking_subscription.rb
41
- - examples/non_blocking_subscription_with_executor.rb
42
- - hot_bunnies.gemspec
43
- - lib/ext/commons-io.jar
44
- - lib/ext/rabbitmq-client.jar
45
- - lib/hot_bunnies.rb
46
- - lib/hot_bunnies/channel.rb
47
- - lib/hot_bunnies/exchange.rb
48
- - lib/hot_bunnies/queue.rb
49
- - lib/hot_bunnies/version.rb
50
- - spec/integration/alternate_exchanges_spec.rb
51
- - spec/integration/basic_consume_spec.rb
52
- - spec/integration/connection_spec.rb
53
- - spec/integration/exchange_bind_spec.rb
54
- - spec/integration/exchange_declare_spec.rb
55
- - spec/integration/publisher_confirmations_spec.rb
56
- - spec/integration/queue_bind_spec.rb
57
- - spec/integration/queue_declare_spec.rb
58
- - spec/integration/queue_delete_spec.rb
59
- - spec/integration/queue_purge_spec.rb
60
- - spec/integration/queue_unbind_spec.rb
61
- - spec/integration/sender_selected_distribution_spec.rb
62
- - spec/spec_helper.rb
27
+ - .gitignore
28
+ - .rvmrc
29
+ - .travis.yml
30
+ - Gemfile
31
+ - LICENSE
32
+ - README.md
33
+ - Rakefile
34
+ - examples/blocking_subscription.rb
35
+ - examples/non_blocking_subscription.rb
36
+ - examples/non_blocking_subscription_with_executor.rb
37
+ - hot_bunnies.gemspec
38
+ - lib/ext/commons-io.jar
39
+ - lib/ext/rabbitmq-client.jar
40
+ - lib/hot_bunnies.rb
41
+ - lib/hot_bunnies/channel.rb
42
+ - lib/hot_bunnies/exchange.rb
43
+ - lib/hot_bunnies/queue.rb
44
+ - lib/hot_bunnies/version.rb
45
+ - spec/integration/alternate_exchanges_spec.rb
46
+ - spec/integration/basic_consume_spec.rb
47
+ - spec/integration/connection_spec.rb
48
+ - spec/integration/exchange_bind_spec.rb
49
+ - spec/integration/exchange_declare_spec.rb
50
+ - spec/integration/publisher_confirmations_spec.rb
51
+ - spec/integration/queue_bind_spec.rb
52
+ - spec/integration/queue_declare_spec.rb
53
+ - spec/integration/queue_delete_spec.rb
54
+ - spec/integration/queue_purge_spec.rb
55
+ - spec/integration/queue_unbind_spec.rb
56
+ - spec/integration/sender_selected_distribution_spec.rb
57
+ - spec/spec_helper.rb
63
58
  homepage: http://github.com/iconara/hot_bunnies
64
59
  licenses: []
65
60
 
@@ -67,29 +62,23 @@ post_install_message:
67
62
  rdoc_options: []
68
63
 
69
64
  require_paths:
70
- - lib
65
+ - lib
71
66
  required_ruby_version: !ruby/object:Gem::Requirement
72
67
  none: false
73
68
  requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
- version: "0"
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: "0"
80
72
  required_rubygems_version: !ruby/object:Gem::Requirement
81
73
  none: false
82
74
  requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
89
78
  requirements: []
90
79
 
91
80
  rubyforge_project: hot_bunnies
92
- rubygems_version: 1.8.15
81
+ rubygems_version: 1.8.24
93
82
  signing_key:
94
83
  specification_version: 3
95
84
  summary: Ruby wrapper for the RabbitMQ Java driver