Skip to content

Commit

Permalink
Fixing lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Apr 19, 2015
1 parent c0fd541 commit 932c6bf
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion doc/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ <h5>Returns:</h5>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2015-04-14T20:02:43-04:00 using the <a
on 2015-04-19T15:33:04-04:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ <h2>License</h2>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2015-04-14T20:02:43-04:00 using the <a
on 2015-04-19T15:33:04-04:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
4 changes: 2 additions & 2 deletions doc/module-tenso.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h2>
<dt class="tag-version">Version:</dt>
<dd class="tag-version">
<ul class="dummy">
<li>1.4.8</li>
<li>1.4.9</li>
</ul>
</dd>

Expand Down Expand Up @@ -344,7 +344,7 @@ <h5>Type:</h5>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2015-04-14T20:02:43-04:00 using the <a
on 2015-04-19T15:33:04-04:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/modules.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ <h2>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2015-04-14T20:02:43-04:00 using the <a
on 2015-04-19T15:33:04-04:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
24 changes: 12 additions & 12 deletions lib/tenso.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @license BSD-3 <https://raw.github.com/avoidwork/tenso/master/LICENSE>
* @link http://avoidwork.github.io/tenso
* @module tenso
* @version 1.4.8
* @version 1.4.9
*/
const CONFIG = require( __dirname + "/../config.json" );
const VERSION = "1.4.8";
const VERSION = "1.4.9";
const SERVER = "tenso/" + VERSION;

let keigai = require( "keigai" ),
Expand Down Expand Up @@ -281,7 +281,7 @@ let auth = ( obj, config ) => {
let asyncFlag = ( req, res, next ) => {
req.protectAsync = true;
next();
}
};

let init = ( session ) => {
passportInit = passport.initialize();
Expand All @@ -291,19 +291,19 @@ let auth = ( obj, config ) => {
passportSession = passport.session();
obj.server.use( passportSession ).blacklist( passportSession );
}
}
};

let guard = ( req, res, next ) => {
if ( req.url === "/login" || req.isAuthenticated() ) {
rate( obj, req, res, next );
} else {
res.redirect( "/login" );
}
}
};

let redirect = ( req, res ) => {
res.redirect( config.auth.redirect );
}
};

obj.server.blacklist( asyncFlag );

Expand Down Expand Up @@ -439,7 +439,7 @@ let auth = ( obj, config ) => {
} else {
cb( new Error( "Unauthorized" ), null );
}
}
};

array.each( config.auth.basic.list || [], ( i ) => {
let args = i.split( ":" );
Expand Down Expand Up @@ -485,7 +485,7 @@ let auth = ( obj, config ) => {
} else {
cb( new Error( "Unauthorized" ), null );
}
}
};

passport.use( new BearerStrategy( ( token, done ) => {
validate( token, ( err, user ) => {
Expand Down Expand Up @@ -724,7 +724,7 @@ let bootstrap = ( obj, config ) => {
};

next();
}
};


let parse = ( req, res, next ) => {
Expand All @@ -748,7 +748,7 @@ let bootstrap = ( obj, config ) => {
}

next();
}
};

obj.server.use( mediator ).blacklist( mediator );
obj.server.use( parse ).blacklist( parse );
Expand Down Expand Up @@ -891,7 +891,7 @@ let hypermedia = ( server, req, rep, headers ) => {
}

return obj;
}
};

if ( rep.status >= 200 && rep.status <= 206 ) {
query = req.parsed.query;
Expand Down Expand Up @@ -1142,7 +1142,7 @@ let renderers = {
} ).join( "\n" ) )
.replace( "{{body}}", JSON.stringify( arg, null, 2 ) )
.replace( "{{year}}", new Date().getFullYear() )
.replace( "{{version}}", "1.4.8" )
.replace( "{{version}}", "1.4.9" )
.replace( "{{allow}}", headers[ "allow" ] )
.replace( "{{methods}}", string.explode( headers[ "allow" ].replace( "GET, HEAD, OPTIONS", "" ) ).filter( function ( i ) {
return i !== "";
Expand Down
6 changes: 3 additions & 3 deletions lib/tenso.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instance
* @license BSD-3 <https://raw.github.com/avoidwork/tenso/master/LICENSE>
* @link http://avoidwork.github.io/tenso
* @module tenso
* @version 1.4.8
* @version 1.4.9
*/
var CONFIG = require(__dirname + "/../config.json");
var VERSION = "1.4.8";
var VERSION = "1.4.9";
var SERVER = "tenso/" + VERSION;

var keigai = require("keigai"),
Expand Down Expand Up @@ -1193,7 +1193,7 @@ var renderers = {
return "<tr><td>" + i + "</td><td>" + sanitize(headers[i]) + "</td></tr>";
}).join("\n")).replace("{{formats}}", req.server.config.renderers.map(function (i) {
return "<option value='" + i + "'>" + i.toUpperCase() + "</option>";
}).join("\n")).replace("{{body}}", JSON.stringify(arg, null, 2)).replace("{{year}}", new Date().getFullYear()).replace("{{version}}", "1.4.8").replace("{{allow}}", headers.allow).replace("{{methods}}", string.explode(headers.allow.replace("GET, HEAD, OPTIONS", "")).filter(function (i) {
}).join("\n")).replace("{{body}}", JSON.stringify(arg, null, 2)).replace("{{year}}", new Date().getFullYear()).replace("{{version}}", "1.4.9").replace("{{allow}}", headers.allow).replace("{{methods}}", string.explode(headers.allow.replace("GET, HEAD, OPTIONS", "")).filter(function (i) {
return i !== "";
}).map(function (i) {
return "<option value='" + i + "'>" + i + "</option>";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is a REST API facade for node.js, designed to simplify the implementation of APIs.",
"version": "1.4.8",
"version": "1.4.9",
"homepage": "http://avoidwork.github.io/tenso",
"author": {
"name": "Jason Mulligan",
Expand Down
12 changes: 6 additions & 6 deletions src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let auth = ( obj, config ) => {
let asyncFlag = ( req, res, next ) => {
req.protectAsync = true;
next();
}
};

let init = ( session ) => {
passportInit = passport.initialize();
Expand All @@ -30,19 +30,19 @@ let auth = ( obj, config ) => {
passportSession = passport.session();
obj.server.use( passportSession ).blacklist( passportSession );
}
}
};

let guard = ( req, res, next ) => {
if ( req.url === "/login" || req.isAuthenticated() ) {
rate( obj, req, res, next );
} else {
res.redirect( "/login" );
}
}
};

let redirect = ( req, res ) => {
res.redirect( config.auth.redirect );
}
};

obj.server.blacklist( asyncFlag );

Expand Down Expand Up @@ -178,7 +178,7 @@ let auth = ( obj, config ) => {
} else {
cb( new Error( "Unauthorized" ), null );
}
}
};

array.each( config.auth.basic.list || [], ( i ) => {
let args = i.split( ":" );
Expand Down Expand Up @@ -224,7 +224,7 @@ let auth = ( obj, config ) => {
} else {
cb( new Error( "Unauthorized" ), null );
}
}
};

passport.use( new BearerStrategy( ( token, done ) => {
validate( token, ( err, user ) => {
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let bootstrap = ( obj, config ) => {
};

next();
}
};


let parse = ( req, res, next ) => {
Expand All @@ -47,7 +47,7 @@ let bootstrap = ( obj, config ) => {
}

next();
}
};

obj.server.use( mediator ).blacklist( mediator );
obj.server.use( parse ).blacklist( parse );
Expand Down
2 changes: 1 addition & 1 deletion src/hypermedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let hypermedia = ( server, req, rep, headers ) => {
}

return obj;
}
};

if ( rep.status >= 200 && rep.status <= 206 ) {
query = req.parsed.query;
Expand Down

0 comments on commit 932c6bf

Please sign in to comment.