dry-stack 0.1.5 → 0.1.7

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: 1cf8aa8cb9489eb7287cdf9c78c3c5c9da3f6d311ff6c949249af4e0f615a3b5
4
- data.tar.gz: a7d0e07feac23d18478c8890b9f9934e657b4964feae95bbd1da1d26e208a1ec
3
+ metadata.gz: dc0f9f938bdc24e2d8e73eb04f07cfdac69b8f3760710d776b2035b053d35d29
4
+ data.tar.gz: 4a6a239be0ce61d6d8bce5f1ba407a0958455f69f72760702e9afe21d0a0ba41
5
5
  SHA512:
6
- metadata.gz: a68af80fb155c93aadd9031ae0e16d94debff2926f71e6ff1f643069815ee8fa52823c84e7348699bde8a348fdeba76e203d9812d0982fecef40be9d1d7d4704
7
- data.tar.gz: fc170d04a11489ef3fc468f0621038909541de3a4187dfb9b3c55c3db895526e6b31c643a1c3879ec06c8db67483d244652c94b4e2f9886d01d725fce196f1be
6
+ metadata.gz: a0a6d7e2c5b36de834ae19b1c0e1191ccbdad60c79462299154a7ee51fc9b00bde26cefb6393d7ab5d989437f9613344270ef9d740bcc89d349b7fa9586d328b
7
+ data.tar.gz: 4e75eb748306e20fb0e4d21fab478c4bf5419e7c3c206aaa02c27380c3d4273ccfe2c01b02f382b06e4399654da4b46cedbc9d2eff01af28cdc62b77384aa414
@@ -85,6 +85,8 @@ module Dry
85
85
 
86
86
  params.transform_keys!{_1.to_s.gsub('-','_').to_sym}
87
87
  params[:traefik_tls] = true if params[:tls_domain]
88
+ params[:traefik] = true unless params.key? :traefik
89
+
88
90
  Dry.cmd_params = params
89
91
 
90
92
  raise 'Stack file not defined' if $stdin.tty? && !params[:stack]
@@ -262,6 +262,22 @@ module Dry
262
262
  end
263
263
  end
264
264
 
265
+ service[:networks]&.map! do |network|
266
+ if network.is_a? Hash
267
+ if network.key?(:name)
268
+ n_name= network[:name].gsub('-','_').to_sym
269
+ compose[:networks][n_name] ||= {}
270
+ compose[:networks][n_name].merge! network.slice(:name, :driver, :driver_opts, :attachable, :external, :labels)
271
+ n_name
272
+ else
273
+ $stderr.puts ':name must be specified in network declaration'
274
+ raise 'invalid network declaration'
275
+ end
276
+ else
277
+ network
278
+ end
279
+ end
280
+
265
281
  service[:configs]&.each_with_index do |config, index|
266
282
  config[:source] = "#{service_name}-config-#{index}" if config[:source].to_s.empty?
267
283
  compose[:configs][config[:source].to_sym] ||= {}
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.7'
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.5
4
+ version: 0.1.7
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-07-29 00:00:00.000000000 Z
11
+ date: 2024-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake