dry-stack 0.1.0 → 0.1.1
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 +5 -5
- 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: 8e0189d36c23f0487d26004278fd73f0d8e94410d31a7a44237ca88521edd165
|
4
|
+
data.tar.gz: a7e80baf8f3cec031ec0dcd863738301e3758ebea4dfc11c4101b3f9c1ba51a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bacfd11de68b970264c5749cd38797b52ea83aa9a2b6b818232798d22e50bfc1c6a8ae243cff52af1a03a35b841165bbfd08053dfbb39e1d5cb193f20e985ac
|
7
|
+
data.tar.gz: d3e124944972e6efaccba32322bff5edc5bf9ff9855e23981488f2ebe440cd4763781a6a9930c14b7c121ed38e5895f29e55ca54f5e017b272871d4b3e9a0812
|
data/lib/dry-stack/stack.rb
CHANGED
@@ -55,7 +55,7 @@ module Dry
|
|
55
55
|
def command(cmd)= @service[:command] = cmd
|
56
56
|
def entrypoint(cmd)= @service[:entrypoint] = cmd
|
57
57
|
def deploy_label(str)= @service[:deploy][:labels] << str
|
58
|
-
def config(name = nil, opts)= (@service[:configs] ||= []) << {source: name.to_s
|
58
|
+
def config(name = nil, opts)= (@service[:configs] ||= []) << {source: name.to_s}.merge(opts)
|
59
59
|
def logging(opts) = (@service[:logging] ||= {}).merge! opts
|
60
60
|
def user(user) = @service[:user] = user # "${UID}:${GID}", "www-data:www-data"
|
61
61
|
def network(names) = (@service[:networks] ||= []) << names
|
@@ -122,7 +122,7 @@ module Dry
|
|
122
122
|
|
123
123
|
def apply_configuration(configuration)
|
124
124
|
raise "Configuration not found: #{configuration}" unless @configurations[configuration.to_sym]
|
125
|
-
@configurations[configuration.to_sym][:block_function].call
|
125
|
+
@configurations[configuration.to_sym][:block_function].call
|
126
126
|
end
|
127
127
|
|
128
128
|
def to_compose(opts = @options)
|
@@ -383,10 +383,10 @@ module Dry
|
|
383
383
|
end
|
384
384
|
|
385
385
|
def Configuration(name, opts = {}, &)
|
386
|
-
configuration = @configurations[name.to_sym] ||= {
|
386
|
+
configuration = @configurations[name.to_sym] ||= {}
|
387
387
|
configuration.merge! opts
|
388
|
-
configuration.merge! block_function: ->
|
389
|
-
|
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
|
390
390
|
}
|
391
391
|
end
|
392
392
|
|
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.1.
|
4
|
+
version: 0.1.1
|
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-
|
11
|
+
date: 2024-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|