Minor tweaks.

This commit is contained in:
André Cruz
2013-04-14 17:18:59 +01:00
parent 643f4fddf9
commit 85d2a33620
7 changed files with 22 additions and 65 deletions

View File

@@ -6,18 +6,19 @@ var UrlResolver = require('./resolvers/UrlResolver');
function createResolver(endpoint, options) {
var split = endpoint.split('#'),
source,
target;
// Extract the range from the endpoint
endpoint = split[0];
// Extract the source and target from the endpoint
source = split[0];
target = split[1];
// Ensure options
options = options || {};
options.target = options.target || target;
// TODO: analyze endpoint and create appropriate package
return Q.fcall(new GitRemoteResolver(endpoint, options));
// TODO: analyze source and create appropriate package
return Q.fcall(new GitRemoteResolver(source, options));
}
module.exports = createResolver;