From 4e34e0e6ada06532b17045cff16f9df9266a5741 Mon Sep 17 00:00:00 2001 From: Rob Ellis Date: Wed, 5 Feb 2014 17:03:23 -0800 Subject: [PATCH] Fixes failing test --- lib/middleware.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/middleware.js b/lib/middleware.js index cad02af9..c1d4bd0b 100644 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -54,7 +54,7 @@ exports.index = function(dirPath){ files.forEach(function(file){ var local = file.split('.'); - var appPart = local.shift(); + var appPart = local.join("_"); // DOT files are ignored. if (file[0] !== ".") { @@ -63,6 +63,7 @@ exports.index = function(dirPath){ "localUrl" : 'http://' + appPart + "." + host, "localPath" : path.resolve(dirPath, file) }); + } }); @@ -89,7 +90,9 @@ exports.hostProjectFinder = function(dirPath){ files.forEach(function(file){ var fp = file.split('.'); - if (appPart == fp[0]) { + var filePart = fp.join("_"); + + if (appPart == filePart) { matches.push(file); } });