<commit_before>/*******************************************************************************
 * Copyright (c) 2016 IBM Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
whisk = {
	'async' : function() {
		console.log("Called async");
	},
	'done' : function(output) {
		console.log("Called done " + JSON.stringify(output));
	}
}

var fs = require("fs")
var vm = require('vm')
eval(fs.readFileSync(__dirname + '/checkSite.js') + '');
var basement = {
	"id" : "<KEY>",
	"name" : "Basement",
	"connectionLocation" : "ws://127.0.0.1:9080/rooms/ws/Basement",
	"connectionType" : "websocket"
};
var recRoom = {
	"id" : "<KEY>",
	"name" : "RecRoom",
	"connectionLocation" : "ws://127.0.0.1:9080/rooms/ws/RecRoom",
	"connectionType" : "websocket",
	"connectionSecret" : "kayleigh"
};
var mugRoom = {
	"id" : "<KEY>",
	"name" : "MugRoom",
	"connectionLocation" : "ws://127.0.0.1:9080/rooms/ws/MugRoom",
	"connectionType" : "websocket"
};
//console.log('Calling main for basement');
//main(basement);
console.log('Calling main for rec room');
main(recRoom);
//console.log('Calling main for mug room');
//main(recRoom);<commit_msg>Run tests on all standard rooms<commit_after>/*******************************************************************************
 * Copyright (c) 2016 IBM Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
var doneCalled = false;
whisk = {
	'async' : function() {
		console.log("Called async");
	},
	'done' : function(output) {
		console.log("Called done " + JSON.stringify(output));
		doneCalled = true;
	}
}

var fs = require("fs")
var vm = require('vm')
eval(fs.readFileSync(__dirname + '/checkSite.js') + '');
var basement = {
	"id" : "<KEY>",
	"name" : "Basement",
	"connectionLocation" : "ws://127.0.0.1:9080/rooms/ws/Basement",
	"connectionType" : "websocket"
};
var recRoom = {
	"id" : "df99a72468db3c9b03f5c85f05001d29",
	"name" : "RecRoom",
	"connectionLocation" : "ws://127.0.0.1:9080/rooms/ws/RecRoom",
	"connectionType" : "websocket",
	"connectionSecret" : "kayleigh"
};
var mugRoom = {
	"id" : "<KEY>",
	"name" : "MugRoom",
	"connectionLocation" : "ws://127.0.0.1:9080/rooms/ws/MugRoom",
	"connectionType" : "websocket"
};
var createTimerFunctionToWaitBeforeCheckingRoom = function(rooms) {
    setTimeout(function() {
        if (doneCalled) {
            if (rooms.length > 0) {
                var room = rooms.pop();
                console.log('Calling main for room ' + room.name);
                doneCalled = false;
                main(room);
                createTimerFunctionToWaitBeforeCheckingRoom(rooms);
            }
        } else {
            createTimerFunctionToWaitBeforeCheckingRoom(rooms);
        }
    }, 1000);
}

main(basement);
createTimerFunctionToWaitBeforeCheckingRoom([recRoom, mugRoom]);

{'fraction_non_alphanumeric': 0.2187579214195184, 'fraction_numerical': 0.02585551330798479, 'mean_word_length': 4.071979434447301, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '504420', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1180, 'n_words': 321}