app.get('/send-to-coveralls', function (req, res) { var start = Date.now(); var ok = '<script>{' + 'content' + '}\n' + 'window.callPhantom&&window.callPhantom(\\{' + 'type: "report",' + 'failedCount: 0' + '});\n' + '</script>'; var str = JSON.stringify(postData); if (!service_job_id) { //console.log(str); res.send(util.substitute(ok, { //content: 'var data=' + str + ';console.log(data);', time: (Date.now() - start) })); return; } var url = 'https://coveralls.io/api/v1/jobs'; request.post({url: url, form: { json: str}}, function () { res.send(util.substitute(ok, { //content: 'var data=' + str + ';console.log(data);', time: (Date.now() - start) })); }); });
function print_page(req, res, $subtitle, $body, $fragment) { var $uri = req.protocol + '://' + req.host + req.path; var $canonical = $uri + '#!' + $fragment; var $html = file_get_contents('print-template.html'); res.send(S.substitute($html, { subtitle: $subtitle, body: fix_links($body), canonical: $canonical })); }
pb.parse(function(o) { ts.substitute(o, function(so) { fs.writeFile(MANIFEST_FILE, so, function(err) { if(err) { Log.log('error 0', err); } else { Log.log('Kumquat has been built successfully.'); } }); }, true); });
app.get('/send-to-coveralls', function (req, res) { var start = Date.now(); var ok = '<script>{' + 'content' + '}\n' + 'console.log("0 specs, 0 failures in {time}ms.")</script>'; var str = JSON.stringify(postData); if (!service_job_id) { //console.log(str); res.send(S.substitute(ok, { //content: 'var data=' + str + ';console.log(data);', time: (Date.now() - start) })); return; } var url = 'https://coveralls.io/api/v1/jobs'; request.post({url: url, form: { json: str}}, function () { res.send(S.substitute(ok, { //content: 'var data=' + str + ';console.log(data);', time: (Date.now() - start) })); }); });
request.post({url: url, form: { json: str}}, function () { res.send(util.substitute(ok, { //content: 'var data=' + str + ';console.log(data);', time: (Date.now() - start) })); });