capistrano-nomad 0.10.1 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/capistrano-nomad.gemspec +1 -1
- data/lib/capistrano/nomad/helpers/dsl.rb +6 -2
- data/lib/capistrano/nomad/helpers/nomad.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e53ea71739d8bf0e6a35acc8fc6cf53b38793e2cb84406eabcbcae39eb3c95a
|
4
|
+
data.tar.gz: 9acd6a38e395394f5b6fd2c29b7f79ff57ab4b5f03580b507131f4f14fa0e73c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b40e9dc02e6e447f20ba8f22c8c2916512b6d16204da16268f9156e5c48e77743adbacc51c06e0bb1df150bdf2d0fd2e9f6631ca1b2684830b76b72dfff06b9e
|
7
|
+
data.tar.gz: a3a36894b7296ada17af461c3f61874f17c72be48f9307fc25b7b5e7940b6292a636249442f189fc38a8b966501bc45482202a3e7d9a5ddcf45d5bdd0e3b8078
|
data/Gemfile.lock
CHANGED
data/capistrano-nomad.gemspec
CHANGED
@@ -16,6 +16,8 @@ def nomad_docker_image_type(image_type, attributes = {})
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def nomad_namespace(namespace, **options, &block)
|
19
|
+
raise ArgumentError, "cannot define default nomad namespace" if namespace == :default
|
20
|
+
|
19
21
|
nomad_namespaces = fetch(:nomad_namespaces) || {}
|
20
22
|
nomad_namespaces[namespace] = options
|
21
23
|
set(:nomad_namespaces, nomad_namespaces)
|
@@ -53,7 +55,7 @@ def nomad_job(name, attributes = {})
|
|
53
55
|
|
54
56
|
define_tasks = lambda do |namespace: nil|
|
55
57
|
description_name = ""
|
56
|
-
description_name << "#{namespace}/" if namespace
|
58
|
+
description_name << "#{namespace}/" if namespace != :default
|
57
59
|
description_name << name.to_s
|
58
60
|
|
59
61
|
namespace(name) do
|
@@ -164,8 +166,10 @@ def nomad_job(name, attributes = {})
|
|
164
166
|
end
|
165
167
|
|
166
168
|
namespace(:nomad) do
|
167
|
-
# Define tasks for service
|
168
169
|
if @nomad_namespace
|
170
|
+
# Also define tasks without namespace for default Nomad namespace
|
171
|
+
define_tasks.call(namespace: @nomad_namespace) if @nomad_namespace == :default
|
172
|
+
|
169
173
|
namespace(@nomad_namespace) do
|
170
174
|
define_tasks.call(namespace: @nomad_namespace)
|
171
175
|
end
|