Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mde/geddy
Browse files Browse the repository at this point in the history
  • Loading branch information
larzconwell committed Nov 10, 2012
2 parents 65fc7bf + b1d1eb1 commit d5c5054
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
5 changes: 5 additions & 0 deletions bin/cli.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ if (cmds.length) {
cmds[0] == 'secret' || cmds[0] == 'secret' ||
cmds[0] == 'db:init' || cmds[0] == 'db:init' ||
cmds[0] == 'auth' || cmds[0] == 'auth' ||
cmds[0] == 'auth:update' ||
cmds[0] == 'console') cmds[0] == 'console')
&& !cmds[1]) { && !cmds[1]) {
throw new Error(cmds[0] + ' command requires another argument.'); throw new Error(cmds[0] + ' command requires another argument.');
Expand Down Expand Up @@ -176,6 +177,10 @@ if (cmds.length) {
// Create DBs // Create DBs
cmd += 'auth:init'; cmd += 'auth:init';
break; break;
case 'auth:update':
// Create DBs
cmd += 'auth:update';
break;
case 'db:init': case 'db:init':
// Create DBs // Create DBs
cmd += 'db:init'; cmd += 'db:init';
Expand Down
5 changes: 3 additions & 2 deletions lib/sessions/stores/redis.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Config section should look like this:
'server' is your Redis server. 'server' is your Redis server.
*/ */
var file = require('utilities').file var utils = require('utilities')
, file = utils.file
, RedisServer = file.requireLocal('redis'); , RedisServer = file.requireLocal('redis');


var Redis = function (callback) { var Redis = function (callback) {
Expand All @@ -55,7 +56,7 @@ Redis.prototype = new (function () {
_ns = geddy.config.sessions.server.ns || ""; _ns = geddy.config.sessions.server.ns || "";
_client = RedisServer.createClient(port, host, opts); _client = RedisServer.createClient(port, host, opts);
_client.on("error", function (err) { _client.on("error", function (err) {
sys.error("Redis error " + _client.host + ":" + _client.port + " - " + err); utils.log.error("Redis error " + _client.host + ":" + _client.port + " - " + err);
}); });


if (geddy.config.sessions.server.auth) { if (geddy.config.sessions.server.auth) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"engines": { "engines": {
"node": "*" "node": "*"
} }
} }
22 changes: 22 additions & 0 deletions templates/Jakefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -739,6 +739,28 @@ namespace('gen', function () {


namespace('auth', function () { namespace('auth', function () {


task('update', {async: true}, function () {
// FIXME: Pull these version numbers out of geddy-passport's package.json
var cwd = process.cwd()
, packages = 'geddy-passport@0.0.x'
, updatePath = path.join('geddy-passport', 'app',
'helpers', 'passport');

console.log('Updating helper from ' + packages + '...');
jake.exec('npm uninstall ' + packages +
' && npm install ' + packages, function () {
var from = path.join(cwd, 'node_modules', updatePath)
, to = path.join(cwd, 'app', 'helpers');
jake.rmRf(path.join(to, 'passport'), {silent: true});
jake.cpR(from, to, {silent: true});
console.log('Updated helper from ' + packages);
console.log('Cleaning up...');
jake.exec('npm uninstall geddy-passport', function () {
complete();
});
}, {printStdout: true});
});

task('init', {async: true}, function () { task('init', {async: true}, function () {
var go = false var go = false
// FIXME: Pull these version numbers out of geddy-passport's package.json // FIXME: Pull these version numbers out of geddy-passport's package.json
Expand Down

0 comments on commit d5c5054

Please sign in to comment.