Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0.8.1
  • Loading branch information
emirotin committed Dec 17, 2016
1 parent 243e289 commit 8867ea2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Expand Up @@ -7,3 +7,8 @@ insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.8.1

* update README

## 0.8.0

* _fix regression_: allow configs with `url` option
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -73,7 +73,8 @@ from the current directory (include it as your project's dependency).

The configuration object can have the following keys:

* `host` — MongoDB host (_optional_ when using _replicaset_, **required** otherwise),
* `url` — full MongoDB connection url (_optional_, when used the rest of the connection params (`host`, `port`, `db`, `user`, `password`, `replicaset`) are ignored),
* `host` — MongoDB host (_optional_ when using `url` or `replicaset`, **required** otherwise),
* `port` _[optional]_ — MongoDB port,
* `db` — MongoDB database name,
* `ssl` _[optional]_ - boolean, if `true`, `'?ssl=true'` is added to the MongoDB URL,
Expand Down
4 changes: 2 additions & 2 deletions lib/url-builder.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "mongodb-migrations",
"version": "0.8.0",
"version": "0.8.1",
"description": "A migration framework for MongoDB",
"main": "lib/mongodb-migrations.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/url-builder.coffee
Expand Up @@ -8,12 +8,12 @@ buildHost = (opts) ->

module.exports =
buildMongoConnString: (config) ->
hasUser = !!config.user
{ replicaset } = config

if config.url
return config.url

hasUser = !!config.user
{ replicaset } = config

s = "mongodb://"

if hasUser
Expand Down

0 comments on commit 8867ea2

Please sign in to comment.