diff --git a/bin/gitopen b/bin/gitopen index 9ad3905..84be42a 100755 --- a/bin/gitopen +++ b/bin/gitopen @@ -181,6 +181,8 @@ function getConfig(uri) { var type = config[hostname].type; if (type === 'custom') { result.scheme = config[hostname].scheme || {}; + } else { + result.scheme = require('../lib/scheme/' + config[hostname].type); } return true; } diff --git a/lib/index.js b/lib/index.js index add8e08..d6e3e9d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,15 +1,6 @@ /* global module */ -function merge() { - var args = Array.prototype.slice.call(arguments); - var merged = {}; - args.forEach(function(object) { - Object.keys(object).forEach(function(key) { - merged[key] = object[key]; - }); - }); - return merged; -} +var merge = require('deepmerge'); var DEFAULT_OPTIONS = { hash: 'master', diff --git a/package.json b/package.json index 26d57e2..bb51ebe 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "homepage": "https://github.com/hotoo/gitopen", "dependencies": { "commander": "^2.8.1", + "deepmerge": "~0.2.10", "js-yaml": "^3.3.1" }, "devDependencies": {