Permalink
Browse files

merge

  • Loading branch information...
2 parents 06b2712 + 33d17ba commit ca735cf7e4de2a2d4f29f8216565e02b4af6657b @MiguelMadero committed Oct 5, 2012
View
@@ -27,9 +27,17 @@ build:
install:
@mkdir -p $(DESTDIR)$(PREFIX)/bin && \
- mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/geddy && \
- mkdir -p ./node_modules && \
- npm install jake utilities model barista && \
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/geddy && \
+ mkdir -p ./node_modules && \
+ npm install jake utilities model barista && \
+ cp -R ./* $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/ && \
+ ln -snf ../lib/node_modules/geddy/bin/cli.js $(DESTDIR)$(PREFIX)/bin/geddy && \
+ chmod 755 $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/bin/cli.js && \
+ echo 'Geddy installed.'
+
+quickinstall:
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin && \
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/geddy && \
cp -R ./* $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/ && \
ln -snf ../lib/node_modules/geddy/bin/cli.js $(DESTDIR)$(PREFIX)/bin/geddy && \
chmod 755 $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/bin/cli.js && \
View
@@ -20,6 +20,7 @@ var cwd = process.cwd()
, modelCmd
, filepath
, die
+ , jake
, start;
// Usage dialog
@@ -123,7 +124,7 @@ if (cmds.length) {
// Get templates Jake file
filepath = path.normalize(path.join(__dirname, '..', 'templates', 'Jakefile'));
- cmd = '-t -f ' + filepath + ' ';
+ cmd = '';
// Some commands take only one arg
if (!(cmds[0] == 'secret' ||
@@ -188,13 +189,14 @@ if (cmds.length) {
die(cmds[0] + ' is not a Geddy command.');
}
- if (!opts.debug) {
- cmd += ' --quiet';
- }
-
- cmd = cmd.split(' ');
- var jake = require('jake');
- jake.run.apply(jake, cmd);
+ jake = require('jake');
+ jake.program.init({
+ quiet: !opts.debug
+ , trace: true
+ });
+ jake.loader.loadFile(filepath);
+ jake.program.setTaskNames([cmd]);
+ jake.program.run();
}
// Just `geddy` -- start the server
else {
@@ -6,7 +6,7 @@ var Box = function () {
this.hasMany('Things');
- this.adapter = 'Mongo';
+ this.adapter = 'mongo';
};
Box = geddy.model.register('Box', Box);
@@ -7,7 +7,7 @@ var Thing = function () {
this.belongsTo('Box');
- this.adapter = 'Mongo';
+ this.adapter = 'mongo';
};
Thing = geddy.model.register('Thing', Thing);
@@ -6,7 +6,7 @@ var Widget = function () {
this.hasOne('Thing');
- this.adapter = 'Mongo';
+ this.adapter = 'mongo';
};
Widget = geddy.model.register('Widget', Widget);
@@ -16,6 +16,6 @@ Todo = ->
@validatesWithFunction 'status', (status) ->
status == 'open' || status == 'done'
- @adapter = 'Mongo'
+ @adapter = 'mongo'
Todo = geddy.model.register 'Todo', Todo
View
@@ -649,10 +649,9 @@ controller.BaseController.prototype = new (function () {
callback(content);
});
- // Mix in controller instance-vars -- don't overwrite
- // data properties, and don't use inherited props
+ // Mix in controller instance-vars -- don't overwrite data properties
for (var p in this) {
- if (this.hasOwnProperty(p) && !data[p]) {
+ if (!data[p]) {
data[p] = this[p];
}
};
View
@@ -10,7 +10,7 @@
"version": "0.5.0",
"author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
"dependencies": {
- "jake": "0.4.x",
+ "jake": "0.5.x",
"utilities": "0.0.x",
"model": "0.0.x",
"barista": "0.0.x"
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -21,6 +21,9 @@ var config = {
, debug: true
, hostname: null
, port: 4000
+, model: {
+ defaultAdapter: 'memory'
+ }
, sessions: {
store: 'memory'
, key: 'sid'
@@ -20,6 +20,16 @@ var config = {
detailedErrors: false
, hostname: null
, port: 4000
+/* TODO: Define a defaultAdapter. You can use postgresdb, memory, mongo or riak.
+, model: {
+ defaultAdapter: 'mongo'
+ }
+, db: {
+ mongo: {
+ dbname: 'local'
+ }
+ }
+ */
, sessions: {
store: 'cookie'
, key: 'sid'
@@ -13,8 +13,6 @@ var <%= names.constructor.singular %> = function () {
<% } -%>
});
- this.adapter = 'memory';
-
/*
this.property('login', 'string', {required: true});
this.property('password', 'string', {required: true});
@@ -13,7 +13,6 @@ var <%= names.constructor.singular %> = function () {
<% } -%>
});
- this.adapter = 'memory';
/*
this.property('login', 'string', {required: true});

0 comments on commit ca735cf

Please sign in to comment.