dry-stack 0.0.74 → 0.0.75

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: 1c09ec9f2621d4f04f4aa4578c6a523a88830721d10d3ec5582f92678fc728cf
4
- data.tar.gz: 9d8871217ff3e0dba94346c916a6f2764ed261c3fbeaae1df884e767bdd6b13c
3
+ metadata.gz: 8221d44d262648628af5b10e205e899b1975f42f8858d53454e2eb71574ad790
4
+ data.tar.gz: 13ef00456e8f06f4d16f8bfd2f2910a23d6a85d98f677e01af6842a64a41474d
5
5
  SHA512:
6
- metadata.gz: 86f2a7e6d7ef991952b4b3689ad7b112b27c759d181e357074439dab9f6946d2def17b0c9e95968f47ccb0377cfab7beedb0771b290e1c0855b276d6d138469b
7
- data.tar.gz: 6d3822249f9d87632da48600ced3cbaaabf317d0fe075a3ba3f7ec48163b1830811255a58a3d82fa423575a1a805c3d2a7eb584c7dc680118ae89105fb319d7a
6
+ metadata.gz: 8a8d2bc4f1d15191cec5a4958657f33f0ddfa850c1dfcf7e0bb7ffc7b4cd7306002852b89120a828a0a2392572fdf4d78f20cb9b27ebd39fae48917ed7988334
7
+ data.tar.gz: 6cbdad4504e7d3cb57344cd78e7057c4b88cef873f9b8187d0adec24b82947c8e1a367d8a62680543a45b07ff4cac0fba46447eb24f1c3571e5cfd6208366fc8
@@ -52,7 +52,7 @@ module Dry
52
52
  def command(cmd)= @service[:command] = cmd
53
53
  def entrypoint(cmd)= @service[:entrypoint] = cmd
54
54
  def deploy_label(str)= @service[:deploy][:labels] << str
55
- def config(name, opts)= (@service[:configs] ||= []) << {source: name.to_s }.merge(opts)
55
+ def config(name = nil, opts)= (@service[:configs] ||= []) << {source: name.to_s }.merge(opts)
56
56
  def logging(opts) = (@service[:logging] ||= {}).merge! opts
57
57
  def user(user) = @service[:user] = user # "${UID}:${GID}", "www-data:www-data"
58
58
  def network(names) = (@service[:networks] ||= []) << names
@@ -215,7 +215,8 @@ module Dry
215
215
 
216
216
  service[:logging] ||= @logging[name.to_sym]
217
217
 
218
- service[:configs]&.each do |config|
218
+ service[:configs]&.each_with_index do |config, index|
219
+ config[:source] = "#{service_name}-config-#{index}" if config[:source].to_s.empty?
219
220
  compose[:configs][config[:source].to_sym] ||= {}
220
221
  compose[:configs][config[:source].to_sym].merge! config.except(:source, :target)
221
222
  config.delete :file_content
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.0.74'
3
+ VERSION = '0.0.75'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-stack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.74
4
+ version: 0.0.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom B