Skip to content

Commit

Permalink
Made _ accessible from views again for backwards compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Jul 7, 2013
1 parent 85a60de commit 418a8de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
9 changes: 5 additions & 4 deletions lib/hooks/request/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ module.exports = function (sails) {
function mixinLocals (req,res) {

res.locals({
session: req.session,
title: sails.config.appName + (req.param('action') ? (' | ' + _.str.capitalize(req.param('action'))) : ''),
req: req,
res: res
_ : _,
session : req.session,
title : sails.config.appName + (req.param('action') ? (' | ' + _.str.capitalize(req.param('action'))) : ''),
req : req,
res : res
});
}

Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@
"keywords": [
"mvc",
"web-framework",
"rails",
"ruby-on-rails",
"express",
"sails",
"sailsjs",
"sails.js",
"REST",
"API",
"orm",
"mysql",
"active-record",
"socket.io"
],
"main": "./lib/index",
Expand Down
16 changes: 4 additions & 12 deletions test/start.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
var sys = require('sys'),
exec = require('child_process').exec,
parley = require('parley'),
test_timeout = '60000',
$ = new parley();
test_timeout = '60000';

// Final exit code (for travis)
var result = 0;

// Build deferred log
var $log = function (msg) {
return $(function (msg, xcb) {
console.log(msg);
xcb();
// Exit with code based on result of tests
if (msg === 'Tests complete.') process.exit(result);
})(msg);
};

// Execute a cmd, then trigger callback when it finishes
function runTest(cmd, cb) {
Expand All @@ -32,6 +21,9 @@ var $runTest = function (cmd) {
return $(runTest)(cmd);
};

$log('Testing waterline (ORM)...');
$runTest('node ./node_modules/mocha/bin/mocha --ignore-leaks --recursive -R dot -t '+ test_timeout +' test/waterline');


$log('Running tests...');

Expand Down

0 comments on commit 418a8de

Please sign in to comment.