<commit_before>'use strict';

const	Intercom	= require('larvitamintercom'),
	uuidLib	= require('uuid'),
	slugify	= require('larvitslugify'),
	assert	= require('assert'),
	async	= require('async'),
	log	= require('winston'),
	db	= require('larvitdb'),
	fs	= require('fs'),
	_	= require('lodash');

let	cmsLib;

// Set up winston
//log.remove(log.transports.Console);
///**/log.add(log.transports.Console, {
//	'level':	'warn',
//	'colorize':	true,
//	'timestamp':	true,
//	'json':	false
//});/**/

before(function (done) {
	const	tasks	= [];

	this.timeout(10000);

	// Run DB Setup
	tasks.push(function (cb) {
		let	confFile;

		if (process.argv[3] === undefined) {
			confFile = __dirname + '/../config/db_test.json';
		} else {
			confFile = process.argv[3].split('=')[1];
		}

		log.verbose('DB config file: "' + confFile + '"');

		// First look for absolute path
		fs.stat(confFile, function (err) {
			if (err) {

				// Then look for this string in the config folder
				confFile = __dirname + '/../config/' + confFile;
				fs.stat(confFile, function (err) {
					if (err) throw err;
					log.verbose('DB config: ' + JSON.stringify(require(confFile)));
					db.setup(require(confFile), cb);
				});

				return;
			}
<commit_msg>Fixed travis issues<commit_after>'use strict';

const	Intercom	= require('larvitamintercom'),
	uuidLib	= require('uuid'),
	slugify	= require('larvitslugify'),
	assert	= require('assert'),
	async	= require('async'),
	log	= require('winston'),
	db	= require('larvitdb'),
	fs	= require('fs'),
	_	= require('lodash');

let	cmsLib;

// Set up winston
//log.remove(log.transports.Console);
///**/log.add(log.transports.Console, {
//	'level':	'warn',
//	'colorize':	true,
//	'timestamp':	true,
//	'json':	false
//});/**/

before(function (done) {
	const	tasks	= [];

	this.timeout(10000);

	// Run DB Setup
	tasks.push(function (cb) {
		let	confFile;


		for (const args of process.argv) {
			if (args.startsWith('-confFile=')){
				confFile = args.split('=')[1];
			}
		}

		if ( ! confFile) confFile = __dirname + '/../config/db_test.json';

		log.verbose('DB config file: "' + confFile + '"');

		// First look for absolute path
		fs.stat(confFile, function (err) {
			if (err) {

				// Then look for this string in the config folder
				confFile = __dirname + '/../config/' + confFile;
				fs.stat(confFile, function (err) {
					if (err) throw err;
					log.verbose('DB config: ' + JSON.stringify(require(confFile)));
					db.setup(require(confFile), cb);
				});

				return;
			}

{'fraction_non_alphanumeric': 0.19547079856972585, 'fraction_numerical': 0.0055621771950735005, 'mean_word_length': 3.3791304347826085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1723523', 'n_tokens_mistral': 1023, 'n_tokens_neox': 908, 'n_words': 199}