nodejitsu/jitsu — pull request #286 by blakmatrix (2012-07-21 03:09:57+00:00)
Title: Arg currying congruity jul 2012

Adresses issue #281 (added a todo comment for #285)

Normalizes argument currying all throughout the jitsu cli tool using utile, so no more errors like the following from too many arguments, which results in an argument getting mistaken as a callback.

```shell
blakmatrix@redmorpheus: ~/projects/jitsu arg_currying_congruity_jul_2012
$ jitsu list some_user _i_should_be_ignored [20:04:11]
info: Welcome to Nodejitsu blakmatrix
info: It worked if it ends with Nodejitsu ok
info: Executing command list some_user _i_should_be_ignored
info: Listing all apps for some_user
error: blakmatrix is not authorized to list applications for user: some_user

/usr/local/lib/node_modules/jitsu/lib/jitsu/commands/apps.js:290
return callback(err);
^
TypeError: string is not a function
at String.CALL_NON_FUNCTION (native)
at /usr/local/lib/node_modules/jitsu/lib/jitsu/commands/apps.js:290:14
at Request._callback (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/lib/client/client.js:106:14)
at Request.callback (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/node_modules/request/main.js:104:22)
at Request. (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/node_modules/request/main.js:458:18)
at Request.emit (events.js:67:17)
at IncomingMessage. (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/node_modules/request/main.js:423:16)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:130:23)
at CleartextStream.socketOnData [as ondata] (http.js:1288:20)
FAIL: 1

```

also fixed some jshint, missing semicolons, and unnecessary white-space along the way.