dry-stack 0.0.75 → 0.0.76
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 +22 -3
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc66cd52245000ece4ab555e7de7bebfb8bbc430fa874b7a193a98cb1b4252c7
|
4
|
+
data.tar.gz: fca08f1524e5108238fa3ed1767caec60b9760a1c8b4c29fb0805cc29faa7645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dc22324c06865377ab541b63793070395df81fd2df72b7f3957482b603b712392436f579f27dfcb776cef9571798a12829c04701c67e88071ab80ef03016984
|
7
|
+
data.tar.gz: e339f2530b9529dbe94883bf8ef63757da1e66e05b23c7bbb90b1cb8ae694a4e00062563366ae083d00187c8fe038e432461b0822e4a21b28e7fffefd6bb05c4
|
data/lib/dry-stack/stack.rb
CHANGED
@@ -215,13 +215,32 @@ module Dry
|
|
215
215
|
|
216
216
|
service[:logging] ||= @logging[name.to_sym]
|
217
217
|
|
218
|
+
service[:volumes]&.map!&.with_index do |volume, index|
|
219
|
+
if volume.is_a? Hash
|
220
|
+
if (volume.key?(:name) && volume.key?(:source)) || (!volume.key?(:name) && !volume.key?(:source))
|
221
|
+
$stderr.puts 'Use either :name or :source in volume declaration as a Hash'
|
222
|
+
$stderr.puts ':name will create Volume section automatically'
|
223
|
+
raise 'invalid volume declaration'
|
224
|
+
end
|
225
|
+
if volume.key? :name
|
226
|
+
v_name = "#{service_name}-volume-#{index}".to_sym
|
227
|
+
compose[:volumes][v_name] ||= {}
|
228
|
+
compose[:volumes][v_name].merge! volume.slice(:name, :driver, :driver_opts)
|
229
|
+
volume[:type] ||= 'volume'
|
230
|
+
volume.except(:name, :driver, :driver_opts).merge source: v_name
|
231
|
+
else
|
232
|
+
volume
|
233
|
+
end
|
234
|
+
else
|
235
|
+
volume
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
218
239
|
service[:configs]&.each_with_index do |config, index|
|
219
240
|
config[:source] = "#{service_name}-config-#{index}" if config[:source].to_s.empty?
|
220
241
|
compose[:configs][config[:source].to_sym] ||= {}
|
221
242
|
compose[:configs][config[:source].to_sym].merge! config.except(:source, :target)
|
222
|
-
config.
|
223
|
-
config.delete :file
|
224
|
-
config.delete :name
|
243
|
+
config.replace config.except :file_content, :file, :name
|
225
244
|
end
|
226
245
|
end
|
227
246
|
|
data/lib/version.rb
CHANGED
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.0.
|
4
|
+
version: 0.0.76
|
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-06-
|
11
|
+
date: 2024-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|