cpi-event-connector 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cpi/connector.rb CHANGED
@@ -16,7 +16,6 @@ module Cpi
16
16
  with_retries options do
17
17
  start
18
18
  queue = options[:queue] || @queue
19
- @bunny.queue(queue, :durable => true)
20
19
  @exchange.publish(message, :key => queue, :persistent => true)
21
20
  @bunny.tx_commit
22
21
  end
data/lib/cpi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cpi
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -62,13 +62,17 @@ describe Cpi::Connector do
62
62
  end
63
63
 
64
64
  it "connects to the default queue" do
65
- bunny.should_receive(:queue).with("cpi", :durable => true).and_return(queue)
65
+ exchange.should_receive(:publish) do |message, params|
66
+ params[:key].should == "cpi"
67
+ end
66
68
 
67
69
  connector.transmit(event)
68
70
  end
69
71
 
70
72
  it "connects to the specified queue" do
71
- bunny.should_receive(:queue).with("my queue", :durable => true).and_return(queue)
73
+ exchange.should_receive(:publish) do |message, params|
74
+ params[:key].should == "my queue"
75
+ end
72
76
 
73
77
  connector.transmit(event, :queue => "my queue")
74
78
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpi-event-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-27 00:00:00.000000000 Z
12
+ date: 2012-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec