dry-stack 0.0.76 → 0.0.77

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: fc66cd52245000ece4ab555e7de7bebfb8bbc430fa874b7a193a98cb1b4252c7
4
- data.tar.gz: fca08f1524e5108238fa3ed1767caec60b9760a1c8b4c29fb0805cc29faa7645
3
+ metadata.gz: 2a44dfe7eace61d17fa137d2b2a78b9c2a5108dc6f9546d15720b12da71d0edf
4
+ data.tar.gz: 597f836d5ee46984566fc5e34c6ac5562203d5360d8d7554868ba11eaec0cace
5
5
  SHA512:
6
- metadata.gz: 4dc22324c06865377ab541b63793070395df81fd2df72b7f3957482b603b712392436f579f27dfcb776cef9571798a12829c04701c67e88071ab80ef03016984
7
- data.tar.gz: e339f2530b9529dbe94883bf8ef63757da1e66e05b23c7bbb90b1cb8ae694a4e00062563366ae083d00187c8fe038e432461b0822e4a21b28e7fffefd6bb05c4
6
+ metadata.gz: b5393cfb1d0a60401a43d4361a79b95e8fb45f968b05563dc295175af05c3331e5c4ea49d44c35f70a048b61c39da97d3c09429d06e4fc3666345755e85365df
7
+ data.tar.gz: 22a3f8ed7f8f6d1a8feb1d62b0a3e0e2400bfbb7f33a46f35230d4c6d4def543f2b0b514e618d753e2bd551060b127e8fc622903b260650c6eae606d9701c231
@@ -217,17 +217,18 @@ module Dry
217
217
 
218
218
  service[:volumes]&.map!&.with_index do |volume, index|
219
219
  if volume.is_a? Hash
220
- if (volume.key?(:name) && volume.key?(:source)) || (!volume.key?(:name) && !volume.key?(:source))
220
+ if volume.key?(:name) && volume.key?(:source)
221
221
  $stderr.puts 'Use either :name or :source in volume declaration as a Hash'
222
222
  $stderr.puts ':name will create Volume section automatically'
223
223
  raise 'invalid volume declaration'
224
224
  end
225
- if volume.key? :name
226
- v_name = "#{service_name}-volume-#{index}".to_sym
225
+ unless volume.key? :source
226
+ v_name = (volume[:local_name] || "#{service_name}-volume-#{index}").to_sym
227
227
  compose[:volumes][v_name] ||= {}
228
- compose[:volumes][v_name].merge! volume.slice(:name, :driver, :driver_opts)
228
+ compose[:volumes][v_name].merge! volume.slice(:name, :driver, :driver_opts, :labels)
229
+ compose[:volumes][v_name][:external] = false if compose[:volumes][v_name].empty?
229
230
  volume[:type] ||= 'volume'
230
- volume.except(:name, :driver, :driver_opts).merge source: v_name
231
+ volume.except(:name, :driver, :driver_opts, :local_name).merge source: v_name
231
232
  else
232
233
  volume
233
234
  end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.0.76'
3
+ VERSION = '0.0.77'
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.0.76
4
+ version: 0.0.77
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-08 00:00:00.000000000 Z
11
+ date: 2024-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake