Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outbound split and move into folder #1850

Merged
merged 10 commits into from
May 4, 2017
Merged
Next Next commit
Move outbound to its own sub-folder
Matt Sergeant authored and msimerson committed Apr 19, 2017
commit 826460de9260e4bc917387d2eb7639df65fafb49
22 changes: 12 additions & 10 deletions outbound.js → outbound/index.js
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ var events = require('events');
var fs = require('fs');
var path = require('path');
var net = require('net');
var util = require('util');
var generic_pool = require('generic-pool');

var async = require('async');
var Address = require('address-rfc2821').Address;
@@ -14,16 +16,16 @@ var net_utils = require('haraka-net-utils');
var utils = require('haraka-utils');
var ResultStore = require('haraka-results');

var sock = require('./line_socket');
var logger = require('./logger');
var config = require('./config');
var trans = require('./transaction');
var plugins = require('./plugins');
var TimerQueue = require('./timer_queue');
var Header = require('./mailheader').Header;
var DSN = require('./dsn');
var FsyncWriteStream = require('./outbound/fsync_writestream');
var server = require('./server');
var sock = require('../line_socket');
var logger = require('../logger');
var config = require('../config');
var trans = require('../transaction');
var plugins = require('../plugins');
var TimerQueue = require('../timer_queue');
var Header = require('../mailheader').Header;
var DSN = require('../dsn');
var FsyncWriteStream = require('../fsync_writestream');
var server = require('../server');

var core_consts = require('constants');
var WRITE_EXCL = core_consts.O_CREAT | core_consts.O_TRUNC | core_consts.O_WRONLY | core_consts.O_EXCL;
7 changes: 5 additions & 2 deletions tests/fixtures/vm_harness.js
Original file line number Diff line number Diff line change
@@ -6,16 +6,19 @@ function dot_files (element) {
}

exports.sandbox_require = function (id) {
if (id[0] == '.') {
if (id[0] == '.' && id[1] != '.') {
try {
var override = __dirname + '/' + id + '.js';
fs.statSync(override);
id = override;
}
catch (e) {
id = '../../' + id;
id = '../../' + id.replace(/^[./]*/, '');
}
}
else if (id[0] == '.' && id[1] == '.') {
id = '../../' + id.replace(/^[./]*/, '');
}
return require(id);
}

2 changes: 1 addition & 1 deletion tests/outbound_protocol.js
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ exports.outbound_protocol_tests = {
};

vm_harness.add_tests(
path.join(__dirname, '..', 'outbound.js'),
path.join(__dirname, '..', 'outbound', 'index.js'),
path.join(__dirname, 'outbound_protocol/'),
exports.outbound_protocol_tests,
{