capistrano-nomad 0.8.0 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3410efa72a3baf19cc0d7fa93f33af57c3e1c0c703685a7f21aa42ed41179d55
4
- data.tar.gz: '0971e538df8c3fc79c633423f4db322ea4629d1ec22c2a457fa2404ae32035cb'
3
+ metadata.gz: f0748cefe640533eb1e27bf32b49f399a59f481d9d6fc3a5526f32371bdaa49d
4
+ data.tar.gz: 2a440dc3cba7df056faba0aedc71ec9d3d5e089189697eb4d75a91a0636cc2e6
5
5
  SHA512:
6
- metadata.gz: 624793f5e75a00ac9de53a25a1ffa38a226d95f84850e38f9c82917865f0c5de66d7ac1e02bdda2e3b9cf01f3771aa154d1398fd3a70371e2c7bdb0e84fade09
7
- data.tar.gz: ec008b557f39991b002950cbbfecb1c11a038d9ef9a08e7d250a73201266a0c5c2503735ca7fe24fdc941b53a75f944edc5b6f80ab13a32675dea16bcb64a6f1
6
+ metadata.gz: 1741648c6769f84e8ed3f2c5ad3f14a4ea742bc07be4b27f3fdc3b68af684a9b9c7a7346cf060f477ca576a7fc6ce1e775e8d1cf9f6dfdb173c5ed9c8047671b
7
+ data.tar.gz: 6ddb34c43f24c92b86f1fb9055c15e45ad851ebad706a750187c09f1f454f8d5102ee82bbddf66857d201ccc91657e043f34cf24e0f1a407ccb406b42f629bca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-nomad (0.8.0)
4
+ capistrano-nomad (0.8.2)
5
5
  activesupport (<= 7.0.8)
6
6
  byebug
7
7
  capistrano (~> 3.0)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "capistrano-nomad"
5
- spec.version = "0.8.0"
5
+ spec.version = "0.8.2"
6
6
  spec.authors = ["James Hu"]
7
7
 
8
8
  spec.summary = "Capistrano plugin for deploying and managing Nomad jobs"
@@ -120,7 +120,7 @@ def nomad_job(name, attributes = {})
120
120
 
121
121
  desc "Open console to #{description_name} job. Specify task with TASK, command with CMD"
122
122
  task :console do
123
- command = ENV["CMD"].presence || "/bin/bash"
123
+ command = ENV["CMD"].presence || "/bin/sh"
124
124
 
125
125
  capistrano_nomad_exec_within_job(name, command, namespace: namespace, task: ENV["TASK"])
126
126
  end
@@ -12,7 +12,10 @@ namespace :nomad do
12
12
  task :modify_namespaces do
13
13
  output = capistrano_nomad_capture_nomad_command(:namespace, :list, t: "'{{range .}}{{ .Name }}|{{end}}'")
14
14
  current_namespaces = output.split("|").compact.map(&:to_sym)
15
- desired_namespaces = fetch(:nomad_jobs).keys
15
+
16
+ # If key is nil then it actually belongs to the default namespace
17
+ desired_namespaces = fetch(:nomad_jobs).keys.map { |n| n.nil? ? :default : n.to_sym }
18
+
16
19
  missing_namespaces = desired_namespaces - current_namespaces
17
20
  unused_namespaces = current_namespaces - desired_namespaces
18
21
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-nomad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Hu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-14 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport