Skip to content

Commit

Permalink
fixes tests and updates readme and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcsapo committed Sep 14, 2017
1 parent 42d06a6 commit d065b46
Show file tree
Hide file tree
Showing 15 changed files with 321 additions and 380 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ tap test --coverage-report=text-lcov | lcov-server-cli
> cli:help
```
Usage: lcov-server-cli [options]
Usage: lcov-server-cli [options]
Options:
-h, --help output usage information
-V, --version output the version number
-u, --url [db] Set the url to upload lcov data too
Options:
-V, --version output the version number
-u, --url [server] Set the url to upload lcov data too
-h, --help output usage information
```

> server
Expand All @@ -54,11 +55,12 @@ lcov-server
> server:help
```
Usage: lcov-server [options]
Usage: lcov-server [options]
Options:
Options:
-h, --help output usage information
-V, --version output the version number
-d, --db Set the db connection
-V, --version output the version number
-d, --db [db] Set the db connection
-h, --help output usage information
```
8 changes: 6 additions & 2 deletions bin/lcov-server-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ updateNotifier({pkg}).notify();

program
.version(pkg.version)
.option('-u, --url [db]', 'Set the url to upload lcov data too', 'http://localhost:8080')
.option('-u, --url [server]', 'Set the url to upload lcov data too', 'http://localhost:8080')
.parse(process.argv);

const parsedUrl = url.parse(program.url);
Expand Down Expand Up @@ -96,7 +96,11 @@ process.stdin.on('end', () => {
})
.catch((err) => {
console.log(err); // eslint-disable-line
process.exit(1);
});
})
.catch((err) => { throw err; } );
.catch((err) => {
console.log(`could not parse lcov report correctly: ${err}`); // eslint-disable-line
process.exit(1);
});
});
4 changes: 2 additions & 2 deletions docs/code/Coverage.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li><li><a href="module-util_lcov.html">util/lcov</a></li></ul>
</nav>

<div id="main">
Expand Down Expand Up @@ -1582,7 +1582,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Tue Sep 12 2017 23:59:34 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Wed Sep 13 2017 18:27:42 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/code/coverage.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li><li><a href="module-util_lcov.html">util/lcov</a></li></ul>
</nav>

<div id="main">
Expand Down Expand Up @@ -199,7 +199,7 @@ <h1 class="page-title">coverage.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Tue Sep 12 2017 23:59:34 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Wed Sep 13 2017 18:27:42 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/code/git.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li><li><a href="module-util_lcov.html">util/lcov</a></li></ul>
</nav>

<div id="main">
Expand Down Expand Up @@ -139,7 +139,7 @@ <h1 class="page-title">git.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Tue Sep 12 2017 23:59:34 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Wed Sep 13 2017 18:27:42 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
8 changes: 5 additions & 3 deletions docs/code/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li><li><a href="module-util_lcov.html">util/lcov</a></li></ul>
</nav>

<div id="main">
Expand Down Expand Up @@ -57,7 +57,6 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.
<a href=""><img src="https://img.shields.io/npm/dt/lcov-server.svg" alt="npm"></a>
<a href=""><img src="https://img.shields.io/npm/dm/lcov-server.svg" alt="npm"></a></p>
<h1>What is this?</h1><p>It is a lcov server! It stores lcov reports and categorizes them based on their origin repo.</p>
<p><img src="./screenshots/main.png" alt="main screenshot"></p>
<h1>Prerequisites</h1><ul>
<li><code>mongodb</code> installed</li>
<li><code>nodejs</code> installed</li>
Expand All @@ -77,6 +76,9 @@ <h1>Install</h1><pre class="prettyprint source"><code>npm install lcov-server -g
-u, --url [db] Set the url to upload lcov data too</code></pre><blockquote>
<p>server</p>
</blockquote>
<pre class="prettyprint source"><code>lcov-server</code></pre><blockquote>
<p>server:help</p>
</blockquote>
<pre class="prettyprint source"><code>Usage: lcov-server [options]

Options:
Expand All @@ -96,7 +98,7 @@ <h1>Install</h1><pre class="prettyprint source"><code>npm install lcov-server -g
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Tue Sep 12 2017 23:59:34 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Wed Sep 13 2017 18:27:42 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
10 changes: 5 additions & 5 deletions docs/code/lcov.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li><li><a href="module-util_lcov.html">util/lcov</a></li></ul>
</nav>

<div id="main">
Expand All @@ -40,15 +40,15 @@ <h1 class="page-title">lcov.js</h1>
<pre class="prettyprint source linenums"><code>'use strict';

/**
* @module util/git
* @module util/lcov
*/

const fs = require('fs');

const lcov = {
walkFile: function(str, cb) {
let data = [],
item;
let data = [];
let item;

['end_of_record'].concat(str.split('\n')).forEach((line) => {
const allparts = line.trim().split(':');
Expand Down Expand Up @@ -179,7 +179,7 @@ <h1 class="page-title">lcov.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Tue Sep 12 2017 23:59:34 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Wed Sep 13 2017 18:27:42 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
156 changes: 2 additions & 154 deletions docs/code/module-util_git.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Coverage.html">Coverage</a><ul class='methods'><li data-type='method'><a href="Coverage.html#.get">get</a></li><li data-type='method'><a href="Coverage.html#.save">save</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-util_git.html">util/git</a><ul class='methods'><li data-type='method'><a href="module-util_git.html#~parse">parse</a></li></ul></li><li><a href="module-util_lcov.html">util/lcov</a></li></ul>
</nav>

<div id="main">
Expand Down Expand Up @@ -106,158 +106,6 @@ <h4 class="name" id="~parse"><span class="type-signature">(inner) </span>parse<s














</dl>



























<h5>Returns:</h5>


<div class="param-desc">
<ul>
<li>returns a promise that resolves with the git information needed</li>
</ul>
</div>



<dl class="param-type">
<dt>
Type
</dt>
<dd>

<span class="param-type">Promise</span>


</dd>
</dl>










</article>

</section>







<section>

<header>



</header>

<article>
<div class="container-overview">





</div>














<h3 class="subsection-title">Methods</h3>






<h4 class="name" id="~parse"><span class="type-signature">(inner) </span>parse<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4>






<dl class="details">


<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="git.js.html">git.js</a>, <a href="git.js.html#line12">line 12</a>
</li></ul></dd>























Expand Down Expand Up @@ -341,7 +189,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Tue Sep 12 2017 23:59:34 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Wed Sep 13 2017 18:27:42 GMT-0700 (PDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading

0 comments on commit d065b46

Please sign in to comment.