Skip to content
Browse files

.bind & .subscribe can now be called multiple times

  • Loading branch information...
1 parent 52b959d commit d078cfd3ab5aefcd3b3a831a754f3736e88d62c2 @FGRibreau committed Jan 28, 2013
Showing with 161 additions and 427 deletions.
  1. +1 −1 .gitignore
  2. +22 −0 LICENCE-MIT.txt
  3. +14 −6 README.md
  4. 0 grunt.js
  5. +2 −0 index.js
  6. +0 −194 lib/AmqpDsl.js
  7. +0 −24 lib/AmqpExchange.js
  8. +0 −38 lib/AmqpQueue.js
  9. +0 −41 lib/IndexedList.js
  10. +28 −27 package.json
  11. +38 −35 src/AmqpDsl.coffee
  12. +13 −8 src/AmqpQueue.coffee
  13. +43 −53 test/AmqpDsl-test.coffee
View
2 .gitignore
@@ -5,4 +5,4 @@ node_modules
*.log
# mac
-DS_STORE
+.DS_Store
View
22 LICENCE-MIT.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2013 FG Ribreau
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
20 README.md
@@ -25,9 +25,9 @@ amqp.login(
if err
throw err
return
-
+
console.log 'We are connected !'
-
+
)
```
@@ -47,6 +47,7 @@ AmqpDsl.login(
.queue( 'testQueue', (queue) -> console.log "Connected to Queue", queue.name )
.bind( 'stream', '#' )
+ .bind( 'stream2', 'routing.key' )
.subscribe( (message, header, deliveryInfo) -> )
.queue( 'queue2' )
@@ -63,7 +64,7 @@ AmqpDsl.login(
# Do other stuff with `amqp` like subscribing to a queue
queue3 = amqp.queues.queue3
-
+
queue3.subscribe( ack:true, ( message, header, deliveryInfo ) ->
console.log "Hey ! We got one new message !"
queue3.shift()
@@ -102,7 +103,7 @@ See `examples/` and `docs/` for more information.
### .connect
* `.connect( amqp, callback(err, amqp) )`
* `.connect( callback(err, amqp) )`
-
+
The `amqp` argument is simply hashtable with the following properties:
* queues (hashtable of `AMQP::queues`)
@@ -118,5 +119,12 @@ The `amqp` argument is simply hashtable with the following properties:
... and browse `docs/`
## Test
-
- $ npm test
+
+ $ npm test
+
+## Release History
+v1.0.1 - .bind & .subscribe can now be called multiple times. This is the behavior that should have been in place since the beginning.
+
+## License
+Copyright (c) 2013 Francois-Guillaume Ribreau
+Licensed under the MIT license.
View
0 grunt.js
No changes.
View
2 index.js
@@ -0,0 +1,2 @@
+require('coffee-script');
+module.exports = require('./src/AmqpDsl');
View
194 lib/AmqpDsl.js
@@ -1,194 +0,0 @@
-(function() {
- var AmqpDsl, AmqpExchange, AmqpQueue, IndexedList, async;
- var __slice = Array.prototype.slice;
-
- async = require('async');
-
- IndexedList = require('./IndexedList');
-
- AmqpQueue = require('./AmqpQueue');
-
- AmqpExchange = require('./AmqpExchange');
-
- module.exports = AmqpDsl = (function() {
- var LISTENNERS;
-
- LISTENNERS = ['error', 'close', 'ready'];
-
- AmqpDsl.login = function(opt) {
- if (opt == null) opt = {};
- return new AmqpDsl(opt);
- };
-
- function AmqpDsl(opt) {
- if (opt == null) opt = {};
- this._login = '';
- this._password = '';
- this._host = '';
- this._port = 5672;
- this._vhost = '/';
- this._conn = null;
- this._callback = function() {};
- opt.login && (this._login = opt.login);
- opt.password && (this._password = opt.password);
- opt.host && (this._host = opt.host);
- opt.port && (this._port = opt.port);
- opt.vhost && (this._vhost = opt.vhost);
- opt.login && (this._login = opt.login);
- this._events = {};
- this._exchanges = new IndexedList();
- this._queues = new IndexedList();
- }
-
- AmqpDsl.prototype.on = function(event, listener) {
- if (!~LISTENNERS.indexOf(event)) {
- throw new Error("Event '" + event + "' is invalid");
- }
- if (!this._events[event]) this._events[event] = [];
- this._events[event].push(listener);
- return this;
- };
-
- AmqpDsl.prototype.exchange = function(name, options, openCallback) {
- this._exchanges.set(name, new AmqpExchange(name, options, openCallback));
- return this;
- };
-
- AmqpDsl.prototype.queue = function(name, options, openCallback) {
- this._queues.set(name, new AmqpQueue(name, options, openCallback));
- return this;
- };
-
- AmqpDsl.prototype.subscribe = function(options, messageListener) {
- var queue;
- queue = this._queues.last();
- if (!queue) throw new Error("At least one queue must be declared");
- queue.subscribe(options, messageListener);
- return this;
- };
-
- AmqpDsl.prototype.bind = function(name, routingKey) {
- var queue;
- queue = this._queues.last();
- if (!queue) throw new Error("At least one queue must be declared");
- queue.bind(name, routingKey);
- return this;
- };
-
- AmqpDsl.prototype.connect = function(amqp, _callback) {
- this._callback = _callback;
- if (typeof amqp === "function") {
- this._callback = amqp;
- amqp = require('amqp');
- }
- this._connect(amqp);
- return null;
- };
-
- AmqpDsl.prototype._connect = function(amqp) {
- var event, _results;
- var _this = this;
- this.conn = amqp.createConnection({
- host: this._host,
- port: this._port,
- login: this._login,
- password: this._password,
- vhost: this._vhost
- });
- this.on('ready', function() {
- return _this._connectExchanges(_this._connectQueues.bind(_this));
- });
- _results = [];
- for (event in this._events) {
- _results.push(this.conn.on(event, this._getListenerFor(event)));
- }
- return _results;
- };
-
- AmqpDsl.prototype._getListenerFor = function(event) {
- var _this = this;
- if (this._events[event].length === 1) {
- return this._events[event][0];
- } else {
- return function() {
- var args, listener, _i, _len, _ref;
- args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
- _ref = _this._events[event];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- listener = _ref[_i];
- listener.apply(null, args);
- }
- return true;
- };
- }
- };
-
- AmqpDsl.prototype._connectExchanges = function(next) {
- var _this = this;
- return async.forEach(this._exchanges.list(), this._connectExchange.bind(this), function(err) {
- if (err) {
- throw new Error("Couldn't connect to the exchanges: " + err.message);
- return;
- }
- return next();
- });
- };
-
- AmqpDsl.prototype._connectExchange = function(exchange, callback) {
- return this.conn.exchange(exchange.name, exchange.options, function(exchangeRef) {
- exchange.ref = exchangeRef;
- exchange.openCallback(exchangeRef);
- return callback(null, true);
- });
- };
-
- AmqpDsl.prototype._connectQueues = function() {
- var _this = this;
- return async.forEach(this._queues.list(), this._connectQueue.bind(this), function(err) {
- if (err) {
- throw new Error("Couldn't connect to the queues: " + err.message);
- return;
- }
- return _this._done();
- });
- };
-
- AmqpDsl.prototype._connectQueue = function(queue, callback) {
- return this.conn.queue(queue.name, queue.options, function(queueRef) {
- queue.ref = queueRef;
- queue.openCallback(queueRef);
- if (queue.exchangeName) {
- queueRef.bind(queue.exchangeName, queue.routingKey);
- }
- if (queue.messageListener) {
- queueRef.subscribe(queue.sOptions, queue.messageListener);
- }
- return callback(null, true);
- });
- };
-
- AmqpDsl.prototype._done = function() {
- var k, msg, v, _ref, _ref2;
- msg = {
- queues: {},
- exchanges: {},
- connection: this.conn
- };
- _ref = this._queues.index();
- for (k in _ref) {
- v = _ref[k];
- msg.queues[k] = v.ref;
- }
- _ref2 = this._exchanges.index();
- for (k in _ref2) {
- v = _ref2[k];
- msg.exchanges[k] = v.ref;
- }
- return this._callback(null, msg);
- };
-
- return AmqpDsl;
-
- })();
-
-}).call(this);
View
24 lib/AmqpExchange.js
@@ -1,24 +0,0 @@
-(function() {
- var AmqpExchange;
-
- module.exports = AmqpExchange = (function() {
-
- function AmqpExchange(name, options, openCallback) {
- this.name = name;
- if (!this.name) throw new Error("Exchange must have a name");
- this.options = {};
- this.openCallback = function() {};
- if (typeof options === "function") {
- this.openCallback = options;
- } else if (typeof options === "object") {
- this.options = options;
- }
- if (typeof openCallback === "function") this.openCallback = openCallback;
- this.ref = null;
- }
-
- return AmqpExchange;
-
- })();
-
-}).call(this);
View
38 lib/AmqpQueue.js
@@ -1,38 +0,0 @@
-(function() {
- var AmqpQueue;
-
- module.exports = AmqpQueue = (function() {
-
- function AmqpQueue(name, options, openCallback) {
- this.name = name;
- if (!this.name) throw new Error("Queue must have a name");
- this.options = {};
- this.openCallback = function() {};
- if (typeof options === "function") {
- this.openCallback = options;
- } else if (typeof options === "object") {
- this.options = options;
- }
- if (typeof openCallback === "function") this.openCallback = openCallback;
- this.ref = null;
- }
-
- AmqpQueue.prototype.bind = function(exchangeName, routingKey) {
- this.exchangeName = exchangeName;
- this.routingKey = routingKey;
- };
-
- AmqpQueue.prototype.subscribe = function(sOptions, messageListener) {
- this.sOptions = sOptions;
- this.messageListener = messageListener;
- if (typeof this.sOptions === 'function') {
- this.messageListener = this.sOptions;
- return this.sOptions = {};
- }
- };
-
- return AmqpQueue;
-
- })();
-
-}).call(this);
View
41 lib/IndexedList.js
@@ -1,41 +0,0 @@
-(function() {
- var IndexedList;
-
- module.exports = IndexedList = (function() {
-
- function IndexedList() {
- this._index = {};
- this._list = [];
- }
-
- IndexedList.prototype.get = function(key) {
- return this._index[key] || false;
- };
-
- IndexedList.prototype.set = function(key, value) {
- this._list.push(value);
- this._index[key] = value;
- return null;
- };
-
- IndexedList.prototype.length = function() {
- return this._list.length;
- };
-
- IndexedList.prototype.last = function() {
- return this._list[this._list.length - 1] || false;
- };
-
- IndexedList.prototype.index = function() {
- return this._index;
- };
-
- IndexedList.prototype.list = function() {
- return this._list;
- };
-
- return IndexedList;
-
- })();
-
-}).call(this);
View
55 package.json
@@ -1,28 +1,29 @@
{
- "name" : "amqp-dsl",
- "description" : "Amqp-DSL - Fluent interface for node-amqp",
- "keywords": ["amqp","dsl"],
- "version": "1.0.1",
- "homepage": "https://github.com/FGRibreau/node-amqp-dsl",
- "repository": "git://github.com/FGRibreau/node-amqp-dsl.git",
-
- "dependencies": {
- "coffee-script":"1.0.0",
- "async":"0.1.x",
- "amqp":"0.1.x",
- "docco":"0.3.x"
- },
-
- "devDependencies":{
- "vows":"0.6.x"
- },
-
- "scripts": {
- "test": "./node_modules/vows/bin/vows --spec"
- },
-
- "repository": "",
- "author" : "Francois-Guillaume Ribreau <npm@fgribreau.com> (http://fgribreau.com)",
- "main" : "lib/AmqpDsl",
- "engines": { "node": ">= 0.4.12" }
-}
+ "name": "amqp-dsl",
+ "description": "Amqp-DSL - Fluent interface for node-amqp",
+ "keywords": [
+ "amqp",
+ "dsl"
+ ],
+ "version": "1.0.1",
+ "homepage": "https://github.com/FGRibreau/node-amqp-dsl",
+ "repository": "",
+ "dependencies": {
+ "async": "0.1.x",
+ "amqp": "~0.1.4",
+ "docco": "0.3.x",
+ "coffee-script": "~1.4.0"
+ },
+ "devDependencies": {
+ "vows": "~0.7.0",
+ "grunt": "~0.3.17"
+ },
+ "scripts": {
+ "test": "./node_modules/vows/bin/vows --spec"
+ },
+ "author": "Francois-Guillaume Ribreau <npm@fgribreau.com> (http://fgribreau.com)",
+ "main": "./index",
+ "engines": {
+ "node": ">= 0.4.12"
+ }
+}
View
73 src/AmqpDsl.coffee
@@ -1,14 +1,14 @@
# Amqp-DSL - Fluent interface for node-amqp
-async = require 'async'
+async = require 'async'
-IndexedList = require './IndexedList'
-AmqpQueue = require './AmqpQueue'
-AmqpExchange = require './AmqpExchange'
+IndexedList = require './IndexedList'
+AmqpQueue = require './AmqpQueue'
+AmqpExchange = require './AmqpExchange'
module.exports = class AmqpDsl
- LISTENNERS =['error','close','ready']
+ LISTENNERS =['error','close','ready']
## Public API
#### require('amqp-dsl').login
@@ -45,7 +45,7 @@ module.exports = class AmqpDsl
# Queues
@_queues = new IndexedList()
-
+
#### .on
# * `on( event, listener )`
on:( event, listener ) ->
@@ -57,53 +57,51 @@ module.exports = class AmqpDsl
@_events[event].push(listener)
this
-
+
#### .exchange
# * `.exchange( name, options )`
# * `.exchange( name, callback(exchange) )`
# * `.exchange( name, options, callback(exchange) )`
exchange:( name, options, openCallback ) ->
@_exchanges.set(name, new AmqpExchange(name, options, openCallback))
this
-
+
#### .queue
# * `.queue( name, options )`
# * `.queue( name, callback(queue) )`
# * `.queue( name, options, callback(queue) )`
queue:( name, options, openCallback ) ->
@_queues.set(name, new AmqpQueue(name, options, openCallback))
this
-
+
#### .queue(...).subscribe
# * `.subscribe( callback(message, header, deliveryInfo) )`
# * `.subscribe( options, callback(message, header, deliveryInfo) )`
subscribe:( options, messageListener ) ->
queue = @_queues.last()
-
+
throw new Error("At least one queue must be declared") if !queue
-
+
queue.subscribe(options, messageListener)
this
-
+
#### .queue(...).bind
# * `.bind( name, routingKey )`
bind:( name, routingKey ) ->
queue = @_queues.last()
-
throw new Error("At least one queue must be declared") if !queue
-
queue.bind(name, routingKey)
this
-
+
#### .connect
# * `.connect( amqp, callback(err, amqp) )`
# * `.connect( callback(err, amqp) )`
- #
+ #
# `amqp` parameter is an hashtable which contain
#
# queues:
# sampleQueue:[Amqp::Queue]
- #
+ #
# exchanges:
# sampleExchange:[Amqp::Exchange]
#
@@ -114,11 +112,11 @@ module.exports = class AmqpDsl
if typeof amqp is "function"
@_callback = amqp
amqp = require 'amqp'
-
+
@_connect(amqp)
null
-
+
## Private API
# Create the connection to amqp and bind events
@@ -137,7 +135,7 @@ module.exports = class AmqpDsl
# Set event listeners
@conn.on(event, @_getListenerFor(event)) for event of @_events
-
+
# Return a listener fonction for the event `event`.
_getListenerFor: (event) ->
@@ -147,17 +145,17 @@ module.exports = class AmqpDsl
return (args...) =>
listener.apply(null, args) for listener in @_events[event]
true
-
+
# Connect to exchanges
_connectExchanges:(next) ->
-
+
async.forEach @_exchanges.list(), @_connectExchange.bind(@), (err) =>
if err
throw new Error("Couldn't connect to the exchanges: #{err.message}")
return
-
+
next()
-
+
# Exchange connection iterator
_connectExchange:(exchange, callback) ->
@@ -174,9 +172,9 @@ module.exports = class AmqpDsl
if err
throw new Error("Couldn't connect to the queues: #{err.message}")
return
-
+
@_done()
-
+
# Queue connection iterator
_connectQueue:(queue, callback) ->
@@ -185,25 +183,30 @@ module.exports = class AmqpDsl
queue.openCallback(queueRef)
- if queue.exchangeName
- queueRef.bind queue.exchangeName, queue.routingKey
-
- if queue.messageListener
- queueRef.subscribe queue.sOptions, queue.messageListener
-
+ queue.bindTo.forEach((bind) ->
+ {exchange, routingKey} = bind
+ queueRef.bind exchange, routingKey
+ )
+
+ queue.listenTo.forEach((listen) ->
+ {option, listener} = listen
+ queueRef.subscribe option, listener
+ )
+
+
callback(null, true)
-
+
# When everything's connected, trigger the final callback
_done:() ->
msg =
queues : {}
exchanges : {}
connection : @conn
-
+
for k,v of @_queues.index()
msg.queues[k] = v.ref
-
+
for k,v of @_exchanges.index()
msg.exchanges[k] = v.ref
View
21 src/AmqpQueue.coffee
@@ -8,8 +8,10 @@ module.exports = class AmqpQueue
if !@name
throw new Error("Queue must have a name")
- @options = {}
+ @options = {}
@openCallback = ->
+ @bindTo = []
+ @listenTo = []
if typeof options == "function"
@openCallback = options
@@ -18,16 +20,19 @@ module.exports = class AmqpQueue
if typeof openCallback == "function"
@openCallback = openCallback
-
+
# Real reference to an AMQP::Queue object
@ref = null
-
+
# * `.bind( name, routingKey )`
- bind:( @exchangeName, @routingKey ) ->
+ bind:( exchangeName, routingKey ) ->
+ @bindTo.push([exchangeName, routingKey])
# * `subscribe( callback(message, header, deliveryInfo) )`
# * `subscribe( options, callback(message, header, deliveryInfo) )`
- subscribe:( @sOptions, @messageListener ) ->
- if typeof @sOptions == 'function'
- @messageListener = @sOptions
- @sOptions = {}
+ subscribe:( options, listener ) ->
+ if typeof options == 'function'
+ listener = options
+ options = {}
+
+ @listenTo.push([options, listener])
View
96 test/AmqpDsl-test.coffee
@@ -3,20 +3,20 @@
vows = require("vows")
assert = require("assert")
-AmqpDsl = require("../src/AmqpDsl")
+AmqpDsl = require("../")
suite = vows.describe("AmqpDsl test")
suite.options.error = true
-suite.addBatch
- ".login":
+suite.addBatch
+ ".login":
topic: -> AmqpDsl
-
+
"runs without issue": (cc) ->
assert.isObject cc.login()
assert.instanceOf cc.login(), AmqpDsl
-
+
"save options": (cc) ->
amqpdsl = cc.login(
login:'l'
@@ -31,31 +31,31 @@ suite.addBatch
assert.equal amqpdsl._host, 'h'
assert.equal amqpdsl._port, 10
assert.equal amqpdsl._vhost, 'v'
-
+
".on":
topic: -> AmqpDsl.login()
"No events by default": (cc) ->
assert.equal Object.keys(cc._events).length, 0
-
+
"can add listener": (cc) ->
a = () -> "ok"
cc.on('ready', a)
assert.equal cc._events['ready'].length, 1
assert.equal cc._events['ready'][0], a
-
+
"can't add listen to unsupported event":(cc) ->
assert.throws () ->
cc.on('unsupported', () ->)
-
+
"allow multiple listener to the same event":(cc) ->
cc.on('ready', () -> "ok2")
assert.equal cc._events['ready'].length, 2
-
+
".exchange":
topic: -> AmqpDsl.login()
@@ -68,7 +68,7 @@ suite.addBatch
assert.equal cc._exchanges.last().name, "exchg1"
assert.equal cc._exchanges.last().options.a, true
-
+
"Accept (name, callback)":(cc)->
a = () -> false
@@ -77,7 +77,7 @@ suite.addBatch
assert.equal cc._exchanges.length(), 2
assert.equal cc._exchanges.last().name, "exchg2"
assert.equal cc._exchanges.last().openCallback, a
-
+
"Accept (name, options, callback)":(cc)->
a = () -> false
@@ -87,8 +87,8 @@ suite.addBatch
assert.equal cc._exchanges.last().name, "exchg3"
assert.equal cc._exchanges.last().options.b, false
assert.equal cc._exchanges.last().openCallback, a
-
-
+
+
"queue":
topic: -> AmqpDsl.login()
@@ -101,7 +101,7 @@ suite.addBatch
assert.equal cc._queues.last().name, "queue1"
assert.equal cc._queues.last().options.a, true
-
+
"Accept (name, callback)":(cc)->
a = () -> false
@@ -110,7 +110,7 @@ suite.addBatch
assert.equal cc._queues.length(), 2
assert.equal cc._queues.last().name, "queue2"
assert.equal cc._queues.last().openCallback, a
-
+
"Accept (name, options, callback)":(cc)->
a = () -> false
@@ -120,8 +120,8 @@ suite.addBatch
assert.equal cc._queues.last().name, "queue3"
assert.equal cc._queues.last().options.b, false
assert.equal cc._queues.last().openCallback, a
-
-
+
+
"subscribe":
topic: -> AmqpDsl.login()
@@ -130,70 +130,60 @@ suite.addBatch
assert.throws () ->
cc.subscribe(() ->)
-
+
"Accept subscribe( callback )":(cc) ->
+ fn = () -> throw new Error("ok")
cc
.queue("queue")
- .subscribe(() -> throw new Error("ok"))
+ .subscribe(fn)
queue = cc._queues.last()
+ assert.deepEqual queue.listenTo[0], [{}, fn]
- assert.isFunction queue.messageListener
-
- assert.throws () ->
- queue.messageListener()
- , "ok"
-
"Accept subscribe( option, callback )":(cc) ->
+ fn = () -> throw new Error("ok")
cc
.queue("queue2")
- .subscribe(ack:true, () -> throw new Error("ok"))
-
+ .subscribe(ack:true, fn)
+
queue = cc._queues.last()
+ assert.deepEqual queue.listenTo[0], [{ack:true}, fn]
+
- assert.equal queue.sOptions.ack, true
- assert.isFunction queue.messageListener
-
- assert.throws () ->
- queue.messageListener()
- , "ok"
-
-
"bind":
topic: -> AmqpDsl.login()
"Accept (name, routingKey)":(cc)->
cc
.queue("queue")
.bind("exch1", "#")
+ .bind("exch2", "#rk2")
queue = cc._queues.last()
+ assert.deepEqual queue.bindTo[0], ["exch1", "#"]
+ assert.deepEqual queue.bindTo[1], ["exch2", "#rk2"]
- assert.equal queue.exchangeName, "exch1"
- assert.equal queue.routingKey, "#"
-
-
"connect":
topic: -> AmqpDsl.login()
"Accept ( callback )": (cc)->
-
+
cc._connect = (amqp) ->
assert.equal amqp, require('amqp')
-
+
cc.connect(->)
"Accept ( amqp, callback )": (cc)->
cc._connect = (amqp) -> assert.isTrue amqp
-
+
cc.connect(true, ->)
"(private) _connect":
topic: -> AmqpDsl.login()
-
+
"(private) _getListenerFor":
topic: -> AmqpDsl.login()
@@ -202,7 +192,7 @@ suite.addBatch
cc.on('error', a)
- assert.equal cc._getListenerFor('error'), a
+ assert.equal cc._getListenerFor('error'), a
"get listener for multiple listener":(cc) ->
b = () -> assert.ok true
@@ -216,35 +206,35 @@ suite.addBatch
assert.throws () ->
cc._getListenerFor('error')()
, "ok1"
-
-
+
+
"(private) _connectExchanges":
topic: -> AmqpDsl.login()
-
+
"#todo":(cc) ->
"(private) _connectExchange":
topic: -> AmqpDsl.login()
-
+
"#todo":(cc) ->
"(private) _connectQueues":
topic: -> AmqpDsl.login()
-
+
"#todo":(cc) ->
"(private) _connectQueue":
topic: -> AmqpDsl.login()
-
+
"#todo":(cc) ->
"(private) _done":
topic: -> AmqpDsl.login()
-
+
"#todo":(cc) ->
if process.argv[1] == __filename
suite.run()
else
- suite.export module
+ suite.export module

0 comments on commit d078cfd

Please sign in to comment.
Something went wrong with that request. Please try again.