diff --git a/lib/blitline.js b/lib/blitline.js index 28fb019..c4c588c 100755 --- a/lib/blitline.js +++ b/lib/blitline.js @@ -1,31 +1,24 @@ // jscs:disable requireTrailingComma,requirePaddingNewLinesBeforeLineComments // Library version. -exports.version = '2.0.1'; - -// npm modules -var Promise = require('bluebird'); +exports.version = '2.1.1'; // core modules var https = require('https'); -var url = require('url'); -// exports -module.exports = function() { - var jobs = []; +var jobs = []; - this.addJob = function(jobHash) { +// exports +module.exports = { + addJob: function(jobHash) { if (typeof jobHash !== 'object') { return console.error('The job submitted must be an object!'); } jobs.push(jobHash); return jobs; - }; - - this.postJobs = postJobs; - - function postJobs() { + }, + postJobs: function() { return new Promise(function(resolve, reject) { var result = null; @@ -71,7 +64,7 @@ module.exports = function() { }); request.on('error', function(error) { - console.log('ERROR:Blitline:ErrorHandler: ', error); + console.error('ERROR:Blitline:ErrorHandler: ', error); return reject(error); }); @@ -79,5 +72,4 @@ module.exports = function() { return request.end(); }); } - }; diff --git a/package.json b/package.json index dbcc961..0b326b9 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,13 @@ "author": "Blitline Developer ", "name": "simple_blitline_node", "description": "Thin wrapper around the Blitline service. No rocket science here, just a helper wrapper", - "version": "2.1.0", + "version": "2.1.1", "repository": { "type": "git", "url": "https://github.com/blitline-dev/simple_blitline_node" }, "main": "index.js", "dependencies": { - "bluebird": "^3.0.2" }, "devDependencies": {} }