Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] Fix whitespaces

  • Loading branch information...
commit 43bac7989236020c4da44d76d45712dcb4e511f7 1 parent 354e5c0
@pksunkara pksunkara authored
View
12 node.js/lib/client/apps.js
@@ -43,7 +43,7 @@ Apps.prototype.list = function (username, callback) {
// ### function create (app, callback)
// #### @app {Object} Package.json manifest for the application.
// #### @callback {function} Continuation to pass control to when complete
-// Creates an application with the specified package.json manifest in `app`.
+// Creates an application with the specified package.json manifest in `app`.
//
Apps.prototype.create = function (app, callback) {
var appName = defaultUser.call(this, app.name);
@@ -88,7 +88,7 @@ Apps.prototype.update = function (appName, attrs, callback) {
// ### function destroy (appName, callback)
// #### @appName {string} Name of the application to destroy
// #### @callback {function} Continuation to pass control to when complete
-// Destroys the application with `name` for the authenticated user.
+// Destroys the application with `name` for the authenticated user.
//
Apps.prototype.destroy = function (appName, callback) {
var appName = defaultUser.call(this, appName),
@@ -103,7 +103,7 @@ Apps.prototype.destroy = function (appName, callback) {
// ### function start (appName, callback)
// #### @appName {string} Name of the application to start
// #### @callback {function} Continuation to pass control to when complete
-// Starts the application with `name` for the authenticated user.
+// Starts the application with `name` for the authenticated user.
//
Apps.prototype.start = function (appName, callback) {
var appName = defaultUser.call(this, appName),
@@ -118,7 +118,7 @@ Apps.prototype.start = function (appName, callback) {
// ### function restart (appName, callback)
// #### @appName {string} Name of the application to start
// #### @callback {function} Continuation to pass control to when complete
-// Starts the application with `name` for the authenticated user.
+// Starts the application with `name` for the authenticated user.
//
Apps.prototype.restart = function (appName, callback) {
var appName = defaultUser.call(this, appName),
@@ -133,7 +133,7 @@ Apps.prototype.restart = function (appName, callback) {
// ### function stop (appName, callback)
// #### @appName {string} Name of the application to stop.
// #### @callback {function} Continuation to pass control to when complete
-// Stops the application with `name` for the authenticated user.
+// Stops the application with `name` for the authenticated user.
//
Apps.prototype.stop = function (appName, callback) {
var appName = defaultUser.call(this, appName),
@@ -148,7 +148,7 @@ Apps.prototype.stop = function (appName, callback) {
// ### function available (app, callback)
// #### @app {Object} Application to check availability against.
// #### @callback {function} Continuation to respond to when complete.
-// Checks the availability of the `app.name` / `app.subdomain` combo
+// Checks the availability of the `app.name` / `app.subdomain` combo
// in the current Nodejitsu environment.
//
Apps.prototype.available = function (app, callback) {
View
16 node.js/lib/client/client.js
@@ -54,9 +54,9 @@ util.inherits(Client, EventEmitter);
// #### @body {Object} **optional** JSON Request Body
// #### @callback {function} Continuation to call if errors occur.
// #### @success {function} Continuation to call upon successful transactions
-// Makes a request to `this.remoteUri + uri` using `method` and any
+// Makes a request to `this.remoteUri + uri` using `method` and any
// `body` (JSON-only) if supplied. Short circuits to `callback` if the response
-// code from Nodejitsu matches `failCodes`.
+// code from Nodejitsu matches `failCodes`.
//
Client.prototype.request = function (method, uri /* variable arguments */) {
var options, args = Array.prototype.slice.call(arguments),
@@ -74,14 +74,14 @@ Client.prototype.request = function (method, uri /* variable arguments */) {
'Content-Type': 'application/json'
}
};
-
+
if (body) {
options.body = JSON.stringify(body);
- }
+ }
else if (method !== 'GET') {
options.body = '{}';
}
-
+
if (proxy) {
options.proxy = proxy;
}
@@ -127,13 +127,13 @@ Client.prototype.request = function (method, uri /* variable arguments */) {
};
//
-// ### function upload (uri, contentType, file, callback, success)
+// ### function upload (uri, contentType, file, callback, success)
// #### @uri {Array} Locator for the Remote Resource
// #### @contentType {string} Content-Type header to use for the upload.
-// #### @file {string} Path of the local file to upload.
+// #### @file {string} Path of the local file to upload.
// #### @success {function} Continuation to call upon successful transactions
// #### @callback {function} Continuation to call if errors occur.
-// Makes a `POST` request to `this.remoteUri + uri` with the data in `file`
+// Makes a `POST` request to `this.remoteUri + uri` with the data in `file`
// as the request body. Short circuits to `callback` if the response
// code from Nodejitsu matches `failCodes`.
//
View
8 node.js/lib/client/keys.js
@@ -4,11 +4,11 @@
* (C) 2010, Nodejitsu Inc.
*
*/
-
+
var util = require('util'),
Client = require('./client').Client,
defaultUser = require('./helpers').defaultUser;
-
+
//
// ### function Keys (options)
// #### @options {Object} Options for this instance
@@ -38,7 +38,7 @@ Keys.prototype.list = function (username, callback) {
};
//
-// ### function create (key, callback)
+// ### function create (key, callback)
// #### @key {Object} Properties for the new key.
// #### @callback {function} Continuation to pass control to when complete
// Creates a new key with the properties specified by `key`.
@@ -55,7 +55,7 @@ Keys.prototype.create = function (id, key, callback) {
//
-// ### function destroy (key, callback)
+// ### function destroy (key, callback)
// #### @key {Object} Properties for the new key.
// #### @callback {function} Continuation to pass control to when complete
// Creates a new key with the properties specified by `key`.
View
8 node.js/lib/client/snapshots.js
@@ -82,7 +82,7 @@ Snapshots.prototype.fetch = function (appName, snapshotName, callback) {
// #### @appName {string} Name of the application to destroy a snapshot for.
// #### @snapshotName {string} Name of the snapshot to destroy.
// #### @callback {function} Continuation to pass control to when complete
-// Destroys a snapshot for the application with `app.name = name` and
+// Destroys a snapshot for the application with `app.name = name` and
// `snapshot.id === snapshotName`.
//
Snapshots.prototype.destroy = function (appName, snapshotName, callback) {
@@ -90,7 +90,7 @@ Snapshots.prototype.destroy = function (appName, snapshotName, callback) {
argv = ['apps']
.concat(appName.split('/'))
.concat(['snapshots', snapshotName]);
-
+
this.request('DELETE', argv, callback, function (res, body) {
callback(null, body || res.statusCode);
});
@@ -101,7 +101,7 @@ Snapshots.prototype.destroy = function (appName, snapshotName, callback) {
// #### @appName {string} Name of the application to activate a snapshot for.
// #### @snapshotName {string} Name of the snapshot to activate.
// #### @callback {function} Continuation to pass control to when complete
-// Activates a snapshot for the application with `app.name = name` and
+// Activates a snapshot for the application with `app.name = name` and
// `snapshot.id === snapshotName`.
//
Snapshots.prototype.activate = function (appName, snapshotName, callback) {
@@ -109,7 +109,7 @@ Snapshots.prototype.activate = function (appName, snapshotName, callback) {
argv = ['apps']
.concat(appName.split('/'))
.concat(['snapshots', snapshotName, 'activate']);
-
+
this.request('POST', argv, callback, function (res, body) {
callback(null, body || res.statusCode);
});
View
10 node.js/lib/client/users.js
@@ -4,11 +4,11 @@
* (C) 2010, Nodejitsu Inc.
*
*/
-
+
var util = require('util'),
Client = require('./client').Client,
defaultUser = require('./helpers').defaultUser;
-
+
//
// ### function Users (options)
// #### @options {Object} Options for this instance
@@ -34,7 +34,7 @@ Users.prototype.auth = function (callback) {
};
//
-// ### function create (user, callback)
+// ### function create (user, callback)
// #### @user {Object} Properties for the new user.
// #### @callback {function} Continuation to pass control to when complete
// Creates a new user with the properties specified by `user`.
@@ -46,7 +46,7 @@ Users.prototype.create = function (user, callback) {
};
//
-// ### function available (username, callback)
+// ### function available (username, callback)
// #### @username {string} Username to check availability for.
// #### @callback {function} Continuation to pass control to when complete
// Checks the availability of the specified `username`.
@@ -82,7 +82,7 @@ Users.prototype.confirm = function (user, callback) {
};
//
-// ### function forgot (username, callback)
+// ### function forgot (username, callback)
// #### @username {Object} username requesting password reset.
// #### @params {Object} Object containing shake and new password, if applicable.
// #### @callback {function} Continuation to pass control to when complete
Please sign in to comment.
Something went wrong with that request. Please try again.