dry-stack 0.1.1 → 0.1.3

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: 8e0189d36c23f0487d26004278fd73f0d8e94410d31a7a44237ca88521edd165
4
- data.tar.gz: a7e80baf8f3cec031ec0dcd863738301e3758ebea4dfc11c4101b3f9c1ba51a2
3
+ metadata.gz: 516984772a050079922f9bb5382f61562454fc49079b478cf4f6ac58ba86fcf7
4
+ data.tar.gz: 55213cc08e7512c0aab51362fa12c9758090c3d16c4a341fb212f9ea8a963ddd
5
5
  SHA512:
6
- metadata.gz: 0bacfd11de68b970264c5749cd38797b52ea83aa9a2b6b818232798d22e50bfc1c6a8ae243cff52af1a03a35b841165bbfd08053dfbb39e1d5cb193f20e985ac
7
- data.tar.gz: d3e124944972e6efaccba32322bff5edc5bf9ff9855e23981488f2ebe440cd4763781a6a9930c14b7c121ed38e5895f29e55ca54f5e017b272871d4b3e9a0812
6
+ metadata.gz: 90bbba8c4cdc86faf47b285ef2af1c071e4101c18f80ee25471fab603f03ddcfa988ebbfd8bffec248b3944c792e8a42db24e792f35a97e543455967cf0f5d4a
7
+ data.tar.gz: f672f19d5a13377aee80d23d513147adb11c4a9f5814aac1e45c55b97a40f7ab2470b02c643b035391bfe389ced0b08ccbec17708fca22f85c6d88ca10b78d8c
@@ -5,9 +5,6 @@ Dry::CommandLine::COMMANDS[:to_compose] = Class.new do
5
5
  _params = stack.options.merge params
6
6
  yaml = stack.to_compose(_params ).lines[1..].join
7
7
  $stdout.puts yaml
8
-
9
- # substitute ENV variables
10
- # _params[:'no-env'] ? $stdout.puts(yaml) : system("echo \"#{yaml.gsub("`", '\\\`')}\"")
11
8
  end
12
9
 
13
10
  def help = ['Print stack in docker compose format',
@@ -71,6 +71,7 @@ module Dry
71
71
  o.on('', '--ingress', 'Generate ingress labels') { true }
72
72
  o.on('', '--traefik', 'Generate traefik labels') { true }
73
73
  o.on('', '--traefik-tls', 'Generate traefik tls labels') { true }
74
+ o.on('', '--tls-domain domain', 'Domain for the traefik labels')
74
75
  o.on('', '--host-sed /from/to/', 'Sed ingress host /\\*/dev.*/')
75
76
  o.on('-n', '--no-env', 'Deprecated') { $stderr.puts 'warning: deprecated option: -n' } # TODO: remove
76
77
  o.on('-c', '--configuration name', 'Configuration name')
@@ -79,6 +80,9 @@ module Dry
79
80
  o.on('-h', '--help') { puts o; exit }
80
81
  o.parse! args, into: params
81
82
 
83
+ params.transform_keys!{_1.to_s.gsub('-','_').to_sym}
84
+ params[:traefik_tls] = true if params[:tls_domain]
85
+
82
86
  raise 'Stack file not defined' if $stdin.tty? && !params[:stack]
83
87
 
84
88
  command = args.shift || ''
@@ -382,11 +382,11 @@ module Dry
382
382
  yield if block_given?
383
383
  end
384
384
 
385
- def Configuration(name, opts = {}, &)
385
+ def Configuration(name, opts = {}, &b)
386
386
  configuration = @configurations[name.to_sym] ||= {}
387
387
  configuration.merge! opts
388
388
  configuration.merge! block_function: -> {
389
- instance_exec(&) if block_given? # https://rubyreferences.github.io/rubychanges/3.3.html#anonymous-parameters-forwarding-inside-blocks-are-disallowed
389
+ instance_exec(&b) if block_given? # https://rubyreferences.github.io/rubychanges/3.3.html#anonymous-parameters-forwarding-inside-blocks-are-disallowed
390
390
  }
391
391
  end
392
392
 
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.3'
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.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom B