Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release/1.0.4'

  • Loading branch information...
commit 47aaa66bca019ce3848c5fba58e883911db932fb 2 parents 887ab05 + f853fbd
@FGRibreau authored
View
4 README.md
@@ -101,8 +101,9 @@ See `examples/` and `docs/` for more information.
* `.bind( name, routingKey )`
### .connect
- * `.connect( amqp, callback(err, amqp) )`
+ * `.connect()`
* `.connect( callback(err, amqp) )`
+ * `.connect( amqp, callback(err, amqp) )`
The `amqp` argument is simply hashtable with the following properties:
@@ -123,6 +124,7 @@ The `amqp` argument is simply hashtable with the following properties:
$ npm test
## Release History
+v1.0.3 - Support for .connect()
v1.0.2 - Critical bug fix
v1.0.1 - .bind & .subscribe can now be called multiple times. This is the behavior that should have been in place since the beginning.
View
4 package.json
@@ -5,12 +5,12 @@
"amqp",
"dsl"
],
- "version": "1.0.3",
+ "version": "1.0.4",
"homepage": "https://github.com/FGRibreau/node-amqp-dsl",
"repository": "",
"dependencies": {
"async": "0.1.x",
- "amqp": "~0.1.4",
+ "amqp": "0.1.3",
"docco": "0.3.x",
"coffee-script": "~1.4.0"
},
View
4 src/AmqpDsl.coffee
@@ -109,6 +109,10 @@ module.exports = class AmqpDsl
#
connect:(amqp, @_callback)->
+ if amqp is undefined
+ @_callback = ->
+ amqp = require 'amqp'
+
if typeof amqp is "function"
@_callback = amqp
amqp = require 'amqp'
View
7 test/AmqpDsl-test.coffee
@@ -167,6 +167,13 @@ suite.addBatch
"connect":
topic: -> AmqpDsl.login()
+ "Accept ()": (cc)->
+
+ cc._connect = (amqp) ->
+ assert.equal amqp, require('amqp')
+
+ cc.connect()
+
"Accept ( callback )": (cc)->
cc._connect = (amqp) ->

0 comments on commit 47aaa66

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