<commit_before>/**
 * Runs Galleon Server.
 *
 * @param  {Config} Object
 */

/* -- Modules -- */
// Core
var incoming = require('./fleet/incoming/incoming');
var outgoing = require('./fleet/outgoing/outgoing');

var outbound = require('./fleet/outgoing/outbound');
var queue = require('./fleet/outgoing/queue');

var Server = require('./seascape/server');
var Database = require('./fleet/connection');

// Essential
var eventEmmiter = require('events').EventEmitter;
var util         = require("util");

// Utilities
var portscanner  = require('portscanner');
var colors = require('colors'); // Better looking error handling
var Spamc = require('spamc');
/* -- ------- -- */

var handlers = {};
var pass = true, fail = false;

colors.setTheme({
	silly: 'rainbow',
	input: 'grey',
	verbose: 'cyan',
	prompt: 'grey',
	success: 'green',
	data: 'grey',
	help: 'cyan',
	warn: 'yellow',
	debug: 'grey',
	bgWhite: 'bgWhite',
	bold: 'bold',
	error: 'red'
});

var Galleon = function(config, requirements){
	// Defaults
	//
	if(!config) config = new Object;
	if(!requirements) requirements = new Object;
	
	handlers.needs.databaseConnection(function(config, _this, requirements){
		console.log("test");
	}, config, [config, this], requirements);
	
	eventEmmiter.call(this);
}

util.inherits(Galleon, eventEmmiter);

Galleon.methods = {
	ready: function(){
		this.emit('ready', true, null);
	},
	dock: function(config, callback, requirements){
		var self = Galleon.prototype.dock;<commit_msg>Event test #7<commit_after>/**
 * Runs Galleon Server.
 *
 * @param  {Config} Object
 */

/* -- Modules -- */
// Core
var incoming = require('./fleet/incoming/incoming');
var outgoing = require('./fleet/outgoing/outgoing');

var outbound = require('./fleet/outgoing/outbound');
var queue = require('./fleet/outgoing/queue');

var Server = require('./seascape/server');
var Database = require('./fleet/connection');

// Essential
var eventEmmiter = require('events').EventEmitter;
var util         = require("util");

// Utilities
var portscanner  = require('portscanner');
var colors = require('colors'); // Better looking error handling
var Spamc = require('spamc');
/* -- ------- -- */

var handlers = {};
var pass = true, fail = false;

colors.setTheme({
	silly: 'rainbow',
	input: 'grey',
	verbose: 'cyan',
	prompt: 'grey',
	success: 'green',
	data: 'grey',
	help: 'cyan',
	warn: 'yellow',
	debug: 'grey',
	bgWhite: 'bgWhite',
	bold: 'bold',
	error: 'red'
});

var Galleon = function(config, requirements){
	// Defaults
	//
	if(!config) config = new Object;
	if(!requirements) requirements = new Object;
	
	handlers.needs.databaseConnection(function(config, _this, requirements){
		_this.emit('ready', true, null);
	}, config, [config, this], requirements);
	
	eventEmmiter.call(this);
}

util.inherits(Galleon, eventEmmiter);

Galleon.methods = {
	ready: function(){
		this.emit('ready', true, null);
	},
	dock: function(config, callback, requirements){
		var self = Galleon.prototype.dock;
{'fraction_non_alphanumeric': 0.18569509738079248, 'fraction_numerical': 0.000335795836131632, 'mean_word_length': 4.217162872154115, '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': '39874', 'n_tokens_mistral': 1031, 'n_tokens_neox': 981, 'n_words': 237}