Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
aluisiora committed Dec 5, 2017
2 parents 6f6dcc9 + 2ff266f commit 9835a66
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "routeros-client",
"version": "0.2.6",
"version": "0.2.7",
"description": "Easy to use abstraction layer over the node-routeros API",
"main": "./dist/index",
"types": "./dist/index",
Expand Down Expand Up @@ -38,7 +38,7 @@
},
"homepage": "https://github.com/aluisiora/routeros-client#readme",
"devDependencies": {
"@types/chai": "^4.0.6",
"@types/chai": "^4.0.8",
"@types/debug": "0.0.30",
"@types/mocha": "^2.2.44",
"@types/node": "^6.0.92",
Expand All @@ -51,6 +51,6 @@
},
"dependencies": {
"debug": "^3.1.0",
"node-routeros": "^1.0.9"
"node-routeros": "^1.1.2"
}
}
6 changes: 5 additions & 1 deletion src/RosApiCrud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ export abstract class RouterOSAPICrud {
break;
}

if (tmpVal === null) tmpVal = "";
if (typeof tmpVal === "boolean") {
tmpVal = tmpVal ? "yes" : "no";
} else if (tmpVal === null) {
tmpVal = "";
}

tmpKey = (addQuestionMark ? "?" : "=") + tmpKey;

Expand Down
7 changes: 5 additions & 2 deletions test/connection.spec.js → test/1.connection.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ describe("RouterOSClient", () => {
});
});

it("should not connect with invalid username and password", (done) => {
it("should not connect with invalid username and password", function(done) {
this.timeout(7000);

const conn = new RouterOSClient({
host: address,
user: "admin1",
password: "admin1"
password: "admin1",
timeout: 5
});

conn.connect().then((api) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9835a66

Please sign in to comment.