diff options
| -rw-r--r-- | bin/coveralls.js | 6 | ||||
| -rw-r--r-- | lib/convertLcovToCoveralls.js | 7 | ||||
| -rw-r--r-- | package.json | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/bin/coveralls.js b/bin/coveralls.js index 7769a0f..1558290 100644 --- a/bin/coveralls.js +++ b/bin/coveralls.js @@ -17,7 +17,9 @@ process.stdin.on('end', function() { var inputToCoveralls = function(input){ console.log(input); - var postData = convertLcovToCoveralls(input); + var libDir = process.argv[2] || 'lib'; + + var postData = convertLcovToCoveralls(input, libDir); sendToCoveralls(postData, function(err, response, body){ if (err){ throw err; @@ -30,3 +32,5 @@ var inputToCoveralls = function(input){ }); }; + + diff --git a/lib/convertLcovToCoveralls.js b/lib/convertLcovToCoveralls.js index cd3ee6d..dfc467c 100644 --- a/lib/convertLcovToCoveralls.js +++ b/lib/convertLcovToCoveralls.js @@ -21,10 +21,15 @@ var convertLcovFileObject = function(file, filepath){ }; var convertLcovToCoveralls = function(input, filepath){ - filepath = filepath || 'lib'; + console.log("in: ", filepath); if (filepath[0] !== '/'){ filepath = process.cwd() + '/' + filepath; } + console.log("now: ", filepath); + if (filepath[filepath.length - 1] !== '/'){ + filepath = filepath + '/'; + } + console.log("abs: ", filepath); var parsed = lcovParse(input); var postJson = { service_job_id : TRAVIS_JOB_ID, diff --git a/package.json b/package.json index cb37c26..01fcaed 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "coveralls", "description" : "takes json-cov output into stdin and POSTs to coveralls.io", "keywords" : ["coverage", "coveralls"], - "version": "2.0.0", + "version": "2.0.1", "bugs": { "url": "https://github.com/cainus/node-coveralls/issues" }, |
