dry-stack 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dry-stack/stack.rb +9 -7
- data/lib/version.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: 1fdde5aef97bb0e9cd381fe8fb9191b7a4dcb3fcbb2a93daa8dc92dc09b7d8cd
|
4
|
+
data.tar.gz: d8205d27f505739e7dd7316170b98f2924c7cf700910ad5c5cf2e92376f68015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '082bc6ed927bd5e5946c63faf531377fb3df998bafae31bd407a61256bf9a28166c78eb3b69a1e5988c6d1dec93405cc2c26a1feb6185f4d92b7261acad53748'
|
7
|
+
data.tar.gz: 7519e0d150a5dd434775ad88d249312d114c9229e3049c60d62f2cd8f9ba18f0889ad7929e6456bcf0851c207e80f37352f17cd36a1d0183d36eba72acc6b382
|
data/lib/dry-stack/stack.rb
CHANGED
@@ -231,13 +231,15 @@ module Dry
|
|
231
231
|
|
232
232
|
service[:deploy].deep_merge! @deploy[name] if @deploy[name]
|
233
233
|
|
234
|
-
hash = {'service-name': service_name, 'stack-name': @name}
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
234
|
+
# hash = {'service-name': service_name, 'stack-name': @name}
|
235
|
+
env_sub = ->(s) {
|
236
|
+
s = s.to_s.dup
|
237
|
+
s.gsub!('%{stack-name}', @name.to_s)
|
238
|
+
s.gsub!('%{service-name}', service_name)
|
239
|
+
s
|
240
|
+
}
|
241
|
+
service[:deploy][:labels] = service[:deploy][:labels].map{ env_sub[_1] }
|
242
|
+
service[:environment].transform_values!{ _1.is_a?(String) ? (env_sub[_1]) : _1 }
|
241
243
|
|
242
244
|
pp_i = @publish_ports[name]&.reject { _1.class == String }
|
243
245
|
pp_s = @publish_ports[name]&.select { _1.class == String }
|
data/lib/version.rb
CHANGED