Skip to content

Commit a81f328

Browse files
committed
code style fixes
1 parent 15b8b5b commit a81f328

File tree

14 files changed

+23
-30
lines changed

14 files changed

+23
-30
lines changed

gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ gulp.task('jscs', function() {
1414
return gulp
1515
.src([
1616
'./lib/**/*.js',
17-
'./spec/**/*.js'
17+
//'./spec/**/*.js'
1818
])
1919
.pipe(jscs())
20-
//.pipe(jscs.reporter())
21-
//.pipe(jscs.reporter('fail'));
20+
.pipe(jscs.reporter())
21+
.pipe(jscs.reporter('fail'));
2222
});
2323

2424
gulp.task('jasmine', function() {

lib/client.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ module.exports = ElasticIO;
33
ElasticIO.API_DEFAULT_BASE_URL = 'https://api.elastic.io';
44
ElasticIO.API_VERSION = 'v1';
55

6-
76
var resources = {
87
accounts: require('./resources/accounts'),
98
components: require('./resources/components'),
109
exec: require('./resources/exec'),
1110
recipes: require('./resources/recipes'),
12-
resources : {
11+
resources: {
1312
s3: require('./resources/s3')
1413
},
1514
repos: require('./resources/repos'),
@@ -46,7 +45,5 @@ function prepareResources(container, resources) {
4645
} else {
4746
container[name] = new resources[next](self);
4847
}
49-
5048
}
51-
52-
}
49+
}

lib/resource.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ ApiResource.prototype.request = function request(method, path) {
3737
var hasOwn = {}.hasOwnProperty;
3838

3939
ApiResource.extend = function extend(sub) {
40-
var Super = this;
40+
var self = this;
4141

4242
function Constructor() {
43-
Super.apply(this, arguments);
43+
self.apply(this, arguments);
4444
}
4545

46-
Constructor.prototype = Object.create(Super.prototype);
46+
Constructor.prototype = Object.create(self.prototype);
4747

4848
for (var i in sub) {
4949
if (hasOwn.call(sub, i)) {
5050
Constructor.prototype[i] = sub[i];
5151
}
5252
}
53-
for (i in Super) {
54-
if (hasOwn.call(Super, i)) {
55-
Constructor[i] = Super[i];
53+
for (i in self) {
54+
if (hasOwn.call(self, i)) {
55+
Constructor[i] = self[i];
5656
}
5757
}
5858

lib/resources/accounts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ module.exports = Resource.extend({
2020
method: Resource.PUT,
2121
path: '/{id}'
2222
})
23-
});
23+
});

lib/resources/components.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ module.exports = Resource.extend({
1414
retrieve: Resource.method({
1515
path: '/{id}'
1616
})
17-
18-
});
17+
});

lib/resources/exec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var _ = require("lodash");
21
var Resource = require("../resource.js");
32

43
module.exports = Resource.extend({
@@ -10,7 +9,6 @@ module.exports = Resource.extend({
109
prepareResponse: prepareScheduleResponse
1110
}),
1211

13-
1412
pollResult: Resource.method({
1513
path: '/poll/{id}',
1614
prepareResponse: preparePollingResponse
@@ -46,4 +44,4 @@ function preparePollingResponse(response, body) {
4644
return {
4745
ready: false
4846
};
49-
}
47+
}

lib/resources/recipes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ module.exports = Resource.extend({
1515
method: Resource.POST,
1616
path: '/{id}'
1717
})
18-
});
18+
});

lib/resources/repos.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ module.exports = Resource.extend({
2121
path: '/{id}'
2222
}),
2323

24-
2524
retrieveEnvVars: Resource.method({
2625
path: '/{id}/env/'
2726
}),
2827

29-
3028
updateEnvVars: Resource.method({
3129
method: Resource.PUT,
3230
path: '/{id}/env/'
3331
})
34-
});
32+
});

lib/resources/s3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ module.exports = Resource.extend({
77
method: Resource.POST,
88
path: '/signed-url'
99
})
10-
});
10+
});

lib/resources/sshkeys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ module.exports = Resource.extend({
1616
method: Resource.DELETE,
1717
path: '/{id}'
1818
})
19-
});
19+
});

0 commit comments

Comments
 (0)