Fixes for issues 1196 and 1197 #199

merged 5 commits into from Sep 25, 2012


None yet

3 participants


No description provided.

MiguelMadero added some commits Sep 25, 2012
@MiguelMadero MiguelMadero Changed the execution of commands so it only adds the quite flag if w…
…e don't want debug info
@MiguelMadero MiguelMadero Changed the generator to create the directory in case it doesn't exis…
…t. GIT won't add empty folders (eg models) and the generator wasn't creating them
@larzconwell larzconwell commented on an outdated diff Sep 25, 2012
@@ -113,7 +114,10 @@ namespace('gen', function () {
templ.process({names: names, bare: bare, properties:});
// Write file
- filePath = path.join('app', dirname, names.filename[options.inflection] + '.js');
+ fileDir = path.join('app', dirname);
+ if (!fs.existsSync(fileDir)) fs.mkdirSync(fileDir);
larzconwell Sep 25, 2012 Contributor

fs.existsSync isn't available on Node 0.6, so use utils.file.existsSync it provides compatibility for 0.6 and 0.8.

Also could you include the brackets on the statement? and ensure the statement is on it's own line. That way changes later can be seen easier.
Note: Please update the changed if statement in bin/cli.js also.


Awesome! Just make the changes mentioned in the code discussion and I'll merge.


I pushed the requested changed.

Thanks for the feedback. I'm new to Node and I wasn't thinking about the compatibility issues. Did you just knew this from memory or is there an easy way to test for compatibility?


Well after a while you just get used to the differences, mostly from using 0.6. But you can check here for the list of changes between the two. We only support the two latest stable releases so all the 0.6.* and 0.8.* versions, stable Node releases are even, while unstable are odd.

Oh, can you change the first if statement also? It's still inline.


I noticed there're plenty of inlined if's. What's the difference or is it just old code that hasn't been changed?
In cli.js

    if( die(usage);

In Jakefile

    if (!type) type = 'string';
    if (type === 'integer') type = 'int';
    // a few more...

Yeah it's pretty much old code or code I've accidentally put in like that (;

Should probably fix all those when I push next time. I'll go ahead and merge this then I'll fix that if later.

@larzconwell larzconwell merged commit 8484f10 into geddy:master Sep 25, 2012
mde commented Sep 26, 2012


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment