Test ruby subprocess in heroku

This commit is contained in:
Chris Blanchard 2015-09-15 13:04:28 +01:00
parent b6a7190b51
commit edf4301557

View file

@ -8,6 +8,7 @@ var Marshal = require("marsha");
var querystring = require('querystring');
var config = require(path.join(__dirname, "../../config/config"));
const SECRET_TOKEN = config.secret_token;
var childProcess = require("child_process").exec;
const MAP_CATEGORY = 45;
const SERVER_CATEGORY = 45;
@ -91,6 +92,10 @@ EnslClient.decodeSession = sessionCookie => {
// Verify signature
if (crypto.createHmac("sha1", SECRET_TOKEN).update(text).digest('hex') !== signature) return null;
childProcess('ruby -e "puts \'Hello World!\'"', function (err, stdout, stderr) {
console.log(stdout);
});
var parsedSession;
try {
parsedSession = Marshal.load(text, 'base64');