forked from enviPath/enviPy
Current Dev State
This commit is contained in:
23
static/js/ketcher2/node_modules/coveralls/lib/sendToCoveralls.js
generated
vendored
Normal file
23
static/js/ketcher2/node_modules/coveralls/lib/sendToCoveralls.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
var request = require('request');
|
||||
var index = require('../index');
|
||||
|
||||
var sendToCoveralls = function(obj, cb){
|
||||
var urlBase = 'https://coveralls.io';
|
||||
if (process.env.COVERALLS_ENDPOINT) {
|
||||
urlBase = process.env.COVERALLS_ENDPOINT;
|
||||
}
|
||||
|
||||
var str = JSON.stringify(obj);
|
||||
var url = urlBase + '/api/v1/jobs';
|
||||
|
||||
if (index.options.stdout) {
|
||||
process.stdout.write(str);
|
||||
cb(null, { statusCode: 200 }, '');
|
||||
} else {
|
||||
request.post({url : url, form : { json : str}}, function(err, response, body){
|
||||
cb(err, response, body);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = sendToCoveralls;
|
||||
Reference in New Issue
Block a user