dry-stack 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dry-stack/stack.rb +6 -6
- 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: 2a4fed59cd07dcdeb1788798186be34846af81162c9c1b79671338b3a6846de7
|
|
4
|
+
data.tar.gz: 3aa8628ba5a4a367c96d5374d1bf1b410390f04ec7955e7640897bbe486d0c78
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be22124fb07f4086a0371bef1ff8aea337818b2810555ba51d8da7e966c828af09607f12ef8e53712f0ca3933fd65a7882b58914cfa9c653c7f04a7d43167073
|
|
7
|
+
data.tar.gz: b082153e1198e1ca4f6ae130ceef4763e938a8cff911e809d0bbb840341e1d40513c71556f356b2a7ad298aef97edc837cac114458565b8b1ac4e7d85ca1c4a7
|
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)
|
|
@@ -382,11 +382,11 @@ module Dry
|
|
|
382
382
|
yield if block_given?
|
|
383
383
|
end
|
|
384
384
|
|
|
385
|
-
def Configuration(name, opts = {}, &)
|
|
386
|
-
configuration = @configurations[name.to_sym] ||= {
|
|
385
|
+
def Configuration(name, opts = {}, &b)
|
|
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(&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
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.2
|
|
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
|