Skip to content

Commit

Permalink
Upgrading turtle.io to 4.0.0, initial changes to support it (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed May 25, 2015
1 parent 8d2eb8c commit e0fcbb2
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 235 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = function (grunt) {
" *\n" +
" * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n" +
" * @copyright <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>\n" +
" * @license <%= pkg.licenses[0].type %> <<%= pkg.licenses[0].url %>>\n" +
" * @license <%= pkg.license %>\n" +
" * @link <%= pkg.homepage %>\n" +
" * @module <%= pkg.name %>\n" +
" * @version <%= pkg.version %>\n" +
Expand Down
13 changes: 7 additions & 6 deletions lib/tenso.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
*
* @author Jason Mulligan <[email protected]>
* @copyright 2015 Jason Mulligan
* @license BSD-3 <https://raw.github.com/avoidwork/tenso/master/LICENSE>
* @license BSD-3-Clause
* @link http://avoidwork.github.io/tenso
* @module tenso
* @version 1.4.10
* @version 1.5.0
*/
const CONFIG = require( __dirname + "/../config.json" );
const VERSION = "1.4.10";
const VERSION = "1.5.0";
const SERVER = "tenso/" + VERSION;

let keigai = require( "keigai" ),
Expand Down Expand Up @@ -788,9 +788,10 @@ let bootstrap = ( obj, config ) => {

// Starting API server
obj.server.start( config, ( req, res, status, msg ) => {
var err = msg instanceof Error ? msg : new Error( msg || obj.messages[ status ] );
var stat = status instanceof Error ? parseInt ( status.message, 10 ) : status,
err = msg instanceof Error ? msg : new Error( msg || obj.messages[ stat ] );

error( obj, req, res, status, err, obj );
error( obj, req, res, stat, err, obj );
} );

if ( notify ) {
Expand Down Expand Up @@ -1144,7 +1145,7 @@ let renderers = {
} ).join( "\n" ) )
.replace( "{{body}}", JSON.stringify( arg, null, 2 ) )
.replace( "{{year}}", new Date().getFullYear() )
.replace( "{{version}}", "1.4.10" )
.replace( "{{version}}", "1.5.0" )
.replace( "{{allow}}", headers[ "allow" ] )
.replace( "{{methods}}", string.explode( headers[ "allow" ].replace( "GET, HEAD, OPTIONS", "" ) ).filter( function ( i ) {
return i !== "";
Expand Down
Loading

0 comments on commit e0fcbb2

Please sign in to comment.