From e5e46bb71e6893a54a147fad88f559e39fb59ee2 Mon Sep 17 00:00:00 2001 From: Julien 'Lta' BALLET Date: Fri, 7 Jun 2019 09:38:50 +0200 Subject: [PATCH] Remove use of remove NonEmptyArray property type Signed-off-by: Julien 'Lta' BALLET --- libraries/docker_swarm_service.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/docker_swarm_service.rb b/libraries/docker_swarm_service.rb index 2534f4d828..5324c6b190 100644 --- a/libraries/docker_swarm_service.rb +++ b/libraries/docker_swarm_service.rb @@ -13,7 +13,8 @@ class DockerSwarmService < DockerSwarmBase property :image, String, required: true property :user, String, required: true, default: 'root' - property :networks, NonEmptyArray, required: true + property :networks, [Array, nil], required: true, + coerce: proc { |v| Array(v).empty? ? nil : Array(v) } property :hostname, String property :environment, Hash, default: {}