dry-stack 0.1.12 → 0.1.14

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: cbaeac98b043b8dccbbd59e01fd5777b7e9f6a94a7020e560750ee537c283e83
4
- data.tar.gz: 7cb8549b37702848f761d7a56afb4baed6a73a419282415bd680aae2b76d7ebd
3
+ metadata.gz: 9b41f8af6bdca698d05c32a0d92a406473d6d6ccdc8b30cad42dff9545cde0f5
4
+ data.tar.gz: e5c3103939a0ab2b6a0205872f034d00ab60181d7e991127fa0b31adf8570cc9
5
5
  SHA512:
6
- metadata.gz: 20109696956962c30782c47495ffcf267e7c9360fd9793bff44e9dbd30cdec3efb2824b8ac729399f01b2abcc3544daa61c5b71c5ba31f6593af1ce34a41d5ea
7
- data.tar.gz: a14a9a310271f6dfa43059ad027dc6f8e3ac18d8e776d952af24ce9a4de11e365d58ce25de5b46914e454665ebed1d8c432604048947a5451667d5de74ff3ac2
6
+ metadata.gz: 2e8c41dc8516b11bf54f0470cf8cdedc105a0d6812567c59d06a98db5b22da64a7fec6111a47de1e135e1b65f49fdcca141e81effdb6e917001fdcd5a386f3a2
7
+ data.tar.gz: 6d74c7b2af40b3a36cdcddf9a1ff0546679b86cc4be3c50cb081db967170a7f7feafc576532e2bce8506d9872e7b03e541dfa0c0acec503757f30692481b1040
@@ -147,16 +147,16 @@ module Dry
147
147
  configs: YAML.load(@configs.to_yaml, aliases: true)
148
148
  }
149
149
 
150
- if @ingress.any?
151
- compose[:networks].merge! ingress_routing: {external: true, name: 'ingress-routing'}
152
- end
153
-
154
150
  compose[:services].each do |name, service|
155
151
 
156
152
  service[:image].gsub!(/:latest$/, '') if service[:image] # let docker swarm to create tag: :latest@sha265:0000...
157
153
 
158
154
  ingress = [@ingress[name], service[:ingress] || [] ].flatten.compact
159
155
 
156
+ if ingress.any?
157
+ compose[:networks].merge! ingress_routing: {external: true, name: 'ingress-routing'}
158
+ end
159
+
160
160
  service[:deploy] ||= {}
161
161
  service[:deploy][:labels] ||= []
162
162
  service[:deploy][:labels] += @labels.map { "#{_1}=#{_2}" }
@@ -305,6 +305,10 @@ module Dry
305
305
  end
306
306
  end
307
307
 
308
+ compose[:networks].transform_values! do |network|
309
+ network.empty? ? EMPTY_HASH : network
310
+ end
311
+
308
312
  prune = ->(o) {
309
313
  o.each { prune[_2] } if o.is_a? Hash
310
314
  o.delete_if { _2.nil? || ( _2.respond_to?(:empty?) && _2.empty?) } if o.is_a? Hash
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.1.12'
3
+ VERSION = '0.1.14'
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.12
4
+ version: 0.1.14
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-08-21 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake