docker-host
Advanced tools
Comparing version 2.2.0 to 2.3.0
module.exports = function(remote) { | ||
if (remote && (remote.host || remote.socketPath)) return remote | ||
if (!remote) remote = process.env.DOCKER_HOST || 'unix:///var/run/docker.sock' | ||
@@ -3,0 +5,0 @@ if (typeof remote === 'number') return {host:'localhost', port:remote} |
{ | ||
"name": "docker-host", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Tiny module that converts a host to docker (usually $DOCKER_HOST) to a standard http url", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -36,2 +36,7 @@ var tape = require('tape') | ||
t.end() | ||
}) | ||
tape('support object shorthand', function(t) { | ||
t.same(host(host(':2375')), {host:'localhost', port:2375, protocol:'http:'}) | ||
t.end() | ||
}) |
3239
48