dry-stack 0.1.20 → 0.1.22

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: 5ab436bec3dbf1350bfb81b1593fe002a3e5b59e9684320386bb6f2233955277
4
- data.tar.gz: 5e04bf7862264a5b61c9638ac348dc3b882239104ca053c1532bf459881faef8
3
+ metadata.gz: bc36a4ac71daadd170966e113e368abcfbf9b48ffb6426e95930998d2be5dceb
4
+ data.tar.gz: d6eb7c94d22cfc9856220de70323dfebadab317f9406b949460e228f801f0e46
5
5
  SHA512:
6
- metadata.gz: efb9473eeedb34f7786935baecd2660021c1c3e0e6012fb9c14e2c6e366e3398da9958cde7a18f2ebdd9848538dc3fe8f15759415f09bfc329735c96860496e0
7
- data.tar.gz: 06c5e16805ca23f4681ad0be7a505c60778764044da8d415e567058e336df64743227fb522334d3b8010d63f770dbfc94da976d910dc5a56dc966efffc0d4690
6
+ metadata.gz: 9cc038e43d49094fdf0b8b622992b35de088dd9412808eb5ad188ce7998fcb7869f42924a607516907bf67fa8fa9c2ec6ecedda016785ace90470bab9636bffd
7
+ data.tar.gz: dfd3c29783f27f0877a5ccefb6d72e01217610a1fa9e4d557dac2cced99a07fb21974d6253e273cd33f9c47d0a344eb8357b67a8f64c98eb78e532d28bee9357
@@ -35,8 +35,10 @@ Dry::CommandLine::COMMANDS[:swarm_deploy] = Class.new do
35
35
  # system " echo \"#{yaml.gsub("`", '\\\`')}\" | docker stack deploy -c - #{stack.name} --prune --resolve-image changed"
36
36
 
37
37
  # --prune --resolve-image changed
38
- exec_i "docker stack deploy -c - --with-registry-auth #{extra} #{stack.name}" , yaml
39
- system "docker config rm $(docker config ls --filter label=com.docker.stack.namespace=#{stack.name} --format \"{{.ID}}\")"
38
+ exec_i "docker stack deploy -c - --with-registry-auth #{extra} #{stack.name}", yaml
39
+ # Hide messages like:
40
+ # Error response from daemon: rpc error: code = InvalidArgument desc = config 'grafana_dashboards_yaml-206a34dc77dc394d78a207c7abde327d' is in use by the following service: grafana_grafana
41
+ system "docker config rm $(docker config ls --filter label=com.docker.stack.namespace=#{stack.name} --format \"{{.ID}}\") 2>&1 | grep -v \"is in use\""
40
42
 
41
43
  exec_i "docker config rm #{stack.name}_readme || echo 'failed to remove config #{stack.name}_readme'"
42
44
  puts "stack description: #{stack.description}"
@@ -276,6 +276,8 @@ module Dry
276
276
  end
277
277
 
278
278
  service[:networks]&.each do |name, network|
279
+ # raise "network name is invalid: #{name}" unless name.is_a? String, Symbol # https://bugs.ruby-lang.org/issues/20793
280
+ raise "network name is invalid: #{name}" unless name in String | Symbol
279
281
  next unless network.is_a? Hash
280
282
 
281
283
  (compose[:networks][name] ||= {}).merge! network.except(:aliases)
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.1.20'
3
+ VERSION = '0.1.22'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-stack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom B
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-09 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake