Skip to content

Commit 3f0b209

Browse files
Merge pull request #25 from saraf/master
Added jshint, fixed missing semicolon errors raised by jshint
2 parents efd8e96 + cb1ba0e commit 3f0b209

File tree

7 files changed

+19
-6
lines changed

7 files changed

+19
-6
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- "0.12"
4+
- "0.10"

lib/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function parseRepo(repo) {
6868
pull_requests: 'none',
6969
whitelist: []
7070
}
71-
}
71+
};
7272
}
7373

7474
function createHooks(config, repo_id, url, callback) {
@@ -142,7 +142,7 @@ function addDeployKey(config, repo_id, title, key, callback) {
142142
if (err) return callback(err);
143143
if (res && res.status !== 201) return callback(res.status);
144144

145-
return callback(null, true)
145+
return callback(null, true);
146146
});
147147
}
148148

lib/webapp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = {
6262
debug("We get the following as branches: " + JSON.stringify(branches));
6363

6464
done(err, _.map(branches || [], function (branch) {
65-
return branch.name
65+
return branch.name;
6666
}));
6767
});
6868
},

lib/webhooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function pushJob(payload) {
9191
trigger: trigger,
9292
deploy: true,
9393
ref: ref
94-
}
94+
};
9595
}
9696

9797
function receiveWebhook(emitter, req, res) {
@@ -108,6 +108,6 @@ function receiveWebhook(emitter, req, res) {
108108
}
109109

110110
function sendJob(job) {
111-
emitter.emit('job.prepare', job)
111+
emitter.emit('job.prepare', job);
112112
}
113113
}

lib/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
config: config,
77
account: account,
88
fetch: function (context, done) {
9-
module.exports.fetch(dirs.data, account, config, job, context, done)
9+
module.exports.fetch(dirs.data, account, config, job, context, done);
1010
}
1111
});
1212
},

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"name": "strider-gitlab",
33
"version": "1.1.1",
44
"description": "A gitlab provider for strider",
5+
"scripts": {
6+
"test": "npm run lint && npm run tests",
7+
"lint": "jshint --verbose lib/",
8+
"tests": "mocha -R spec test/"
9+
},
510
"repository": {
611
"type": "git",
712
"url": "https://github.com:meric426/strider-gitlab.git"

test/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
strider-gitlab tests
2+
====================
3+
4+
The tests use mocha for testing and nock for mocking responses from a gitlab server.

0 commit comments

Comments
 (0)