rabbit_jobs 0.0.8 → 0.0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -66,6 +66,7 @@ module RabbitJobs
66
66
 
67
67
  messages_count = 0
68
68
  routing_keys.each do |routing_key|
69
+ routing_key = routing_key.to_s
69
70
  queue = exchange.channel.queue(RabbitJobs.config.queue_name(routing_key), RabbitJobs.config[:queues][routing_key])
70
71
  queue.bind(exchange, :routing_key => routing_key)
71
72
 
@@ -1,3 +1,3 @@
1
1
  module RabbitJobs
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.8.1"
3
3
  end
@@ -5,11 +5,14 @@ require 'json'
5
5
  describe RabbitJobs::Publisher do
6
6
 
7
7
  before(:each) do
8
- queue_name = 'test'
9
8
  RabbitJobs.configure do |c|
10
9
  c.exchange 'test'
11
10
  c.queue 'rspec_queue'
11
+ c.queue 'rspec_queue2'
12
+ c.queue 'rspec_queue3'
12
13
  end
14
+
15
+ RabbitJobs::Publisher.purge_queue(:rspec_queue, :rspec_queue2, :rspec_queue3)
13
16
  end
14
17
 
15
18
  it 'should publish message to queue' do
@@ -21,4 +24,11 @@ describe RabbitJobs::Publisher do
21
24
  RabbitJobs.publish_to(:rspec_queue, TestJob)
22
25
  RabbitJobs::Publisher.purge_queue('rspec_queue').should == 1
23
26
  end
27
+
28
+ it 'purge_queue should accept many queues' do
29
+ RabbitJobs.publish_to(:rspec_queue, TestJob)
30
+ RabbitJobs.publish_to(:rspec_queue2, TestJob)
31
+ RabbitJobs.publish_to(:rspec_queue3, TestJob)
32
+ RabbitJobs::Publisher.purge_queue(:rspec_queue, :rspec_queue2, :rspec_queue3).should == 3
33
+ end
24
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-21 00:00:00.000000000 Z
12
+ date: 2012-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: amqp
16
- requirement: &70110815973060 !ruby/object:Gem::Requirement
16
+ requirement: &70326148231000 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.9'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70110815973060
24
+ version_requirements: *70326148231000
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70110815972640 !ruby/object:Gem::Requirement
27
+ requirement: &70326148230580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70110815972640
35
+ version_requirements: *70326148230580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rufus-scheduler
38
- requirement: &70110815972100 !ruby/object:Gem::Requirement
38
+ requirement: &70326148230040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '2.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70110815972100
46
+ version_requirements: *70326148230040
47
47
  description: Background jobs on RabbitMQ
48
48
  email:
49
49
  - lazureykis@gmail.com