Comparing version 1.1.0 to 1.1.2
module.exports = { | ||
registrar: function(app, verb, route, handlers) { | ||
var args = [route]; | ||
args.push(handlers); | ||
Array.prototype.push.apply(args, handlers); | ||
@@ -9,3 +9,3 @@ if(!app[verb]) | ||
app[verb].apply(this, args); | ||
app[verb].apply(app, args); | ||
}, | ||
@@ -12,0 +12,0 @@ identifierPreprocessor: function(identifier) { |
{ | ||
"name": "canal", | ||
"version": "1.1.0", | ||
"version": "1.1.2", | ||
"author": "Benjamin Pannell <admin@sierrasoftworks.com>", | ||
@@ -13,3 +13,3 @@ "description": "A powerful route design helper for Express.js web applications", | ||
"scripts": { | ||
"test": "mocha --require should" | ||
"test": "mocha" | ||
}, | ||
@@ -16,0 +16,0 @@ |
var should = require('should'), | ||
Canal = require('../index'), | ||
Canal = require('../'), | ||
compiler = require('../lib/Compiler.js'); | ||
@@ -4,0 +4,0 @@ |
var should = require('should'), | ||
Canal = require('../index'); | ||
Canal = require('../'); | ||
describe('integration', function() { | ||
Canal.options.registrar = function(app, verb, path, handlers) { | ||
app[verb].push({ path: path, handlers: handlers }); | ||
}; | ||
function newApp() { | ||
@@ -38,3 +34,7 @@ return { | ||
Canal(app, routes); | ||
Canal(app, routes, { | ||
registrar: function(app, verb, path, handlers) { | ||
app[verb].push({ path: path, handlers: handlers }); | ||
} | ||
}); | ||
should.exist(app); | ||
@@ -41,0 +41,0 @@ app.should.eql(expected); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18476
13
353