Skip to content

Commit

Permalink
v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lisaac committed Feb 27, 2020
1 parent 41ba677 commit 9d59a6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-lib-docker
PKG_VERSION:=v0.3.0
PKG_VERSION:=v0.3.1
PKG_RELEASE:=beta
PKG_MAINTAINER:=lisaac <https://github.com/lisaac/luci-lib-docker>
PKG_LICENSE:=AGPL-3.0
Expand Down
6 changes: 2 additions & 4 deletions luasrc/docker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ end

local gen_header = function(options, http_method, api_group, api_action, name_or_id, request)
local header, query, path
options = options or {}
options.protocol = options.protocol or "HTTP/1.1"
name_or_id = (name_or_id ~= "") and name_or_id or nil

if request and type(request.query) == "table" then
Expand Down Expand Up @@ -372,8 +370,8 @@ function _docker.new(options)
local _options = options or {}
docker.options = {
socket_path = _options.socket_path or nil,
host = _options.host or "localhost",
port = _options.port or "2375",
host = _options.socket_path and "localhost" or _options.host,
port = not _options.socket_path and _options.port or nil,
tls = _options.tls or nil,
tls_cacert = _options.tls and _options.tls_cacert or nil,
tls_cert = _options.tls and _options.tls_cert or nil,
Expand Down

0 comments on commit 9d59a6b

Please sign in to comment.