Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] Fix some whitespaces

  • Loading branch information...
commit 29c6eaf8e22de7284aff54a88105f0effcc92270 1 parent 873ec1a
@pksunkara pksunkara authored
View
2  .gitignore
@@ -0,0 +1,2 @@
+node_modules
+npm-debug.log
View
2  examples/client.js
@@ -45,7 +45,7 @@ client.users(callback);
client.users.create({ id: "bob" }, callback);
//
-// Get bob
+// Get bob
//
client.users("bob", callback);
View
16 examples/server.js
@@ -15,10 +15,10 @@ var n = function(){
//
// Create a response that echos back parsed HTTP information
//
- var rsp = {
- url: req.url,
+ var rsp = {
+ url: req.url,
data: req.body,
- method: req.method,
+ method: req.method,
headers: req.headers
};
@@ -51,15 +51,15 @@ router.path('/users', function(){
/*
this.post(n);
- this.get(n);
+ this.get(n);
*/
this.path('/:id', function(){
- this.post(n);
- this.get(n);
- this.delete(n);
+ this.post(n);
+ this.get(n);
+ this.delete(n);
this.put(n);
this.post('/eat', n);
-
+
this.path('/dongles/:id', function(){
this.get(n);
this.post(n);
View
10 lib/director-reflector.js
@@ -21,7 +21,7 @@ client.Client = function (options) {
client.createClient = function (router, options) {
//
- // Intialize a new base Client class
+ // Intialize a new base Client class
//
var _client = new client.Client(options);
@@ -51,7 +51,7 @@ client.createClient = function (router, options) {
//
if (path.length > 0) {
var _path = [];
-
+
//
// iterate through every part of the route,
// replacing params regex back with slugs
@@ -124,8 +124,8 @@ client.Client.prototype.request = function (path, verbs, args) {
if(typeof mappings[verb] === 'undefined') {
verb = verbs[0];
}
-
-
+
+
//
// Merge any :params with curried arguments
//
@@ -152,7 +152,7 @@ client.Client.prototype.request = function (path, verbs, args) {
sent.push(args[i].id);
}
}
-
+
//
// Replace all parameters with matched IDs
//
View
4 tests/macros/index.js
@@ -3,7 +3,7 @@ var assert = require('assert');
var macros = exports;
macros.executeAPICalls = function (mappings) {
-
+
var suite = {};
Object.keys(mappings).forEach(function(key){
var args = mappings[key].args,
@@ -39,5 +39,5 @@ macros.executeAPICalls = function (mappings) {
};
});
return suite;
-
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.