async-service 0.10.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/service/configuration.rb +9 -0
- data/lib/async/service/environment.rb +18 -1
- data/lib/async/service/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0a40d50b41d2ddb7691daa0b3911559150853ea1c060be2bd3dad1c75d6f549
|
4
|
+
data.tar.gz: 5d24dc0724bf6cb013ed68072a6579368f50233b4e54ebffc1615fe300683fd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68a1fb24248fba49149e69e209e452b5de54b250e03160164bc6447f16831d0081297dcfd4e849b85aef32aac3432520f9d7e4eb86fd0ddd08f1c3d225dcd942
|
7
|
+
data.tar.gz: 3678501569e9b53da6540fe2d24fcbeffbe415acf779f8ca6c943ac67c627899d1a25ef488df8c65c348b54f20315c8faea44459f993ffaa771f590be63cdccc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -13,6 +13,15 @@ module Async
|
|
13
13
|
#
|
14
14
|
# Environments are key-value maps with lazy value resolution. An environment can inherit from a parent environment, which can provide defaults
|
15
15
|
class Configuration
|
16
|
+
def self.build(root: Dir.pwd, &block)
|
17
|
+
configuration = self.new
|
18
|
+
|
19
|
+
loader = Loader.new(configuration, root)
|
20
|
+
loader.instance_eval(&block)
|
21
|
+
|
22
|
+
return configuration
|
23
|
+
end
|
24
|
+
|
16
25
|
def self.load(paths = ARGV)
|
17
26
|
configuration = self.new
|
18
27
|
|
@@ -24,7 +24,24 @@ module Async
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
# This allows for a convenient syntax, e.g.:
|
28
|
+
#
|
29
|
+
# Builder.for do
|
30
|
+
# foo 42
|
31
|
+
# end
|
32
|
+
#
|
33
|
+
# or:
|
34
|
+
#
|
35
|
+
# Builder.for do |builder|
|
36
|
+
# builder.foo 42
|
37
|
+
# end
|
38
|
+
if block_given?
|
39
|
+
if block.arity == 0
|
40
|
+
builder.instance_exec(&block)
|
41
|
+
else
|
42
|
+
yield builder
|
43
|
+
end
|
44
|
+
end
|
28
45
|
|
29
46
|
return top
|
30
47
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2024-
|
40
|
+
date: 2024-04-07 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: async
|
metadata.gz.sig
CHANGED
Binary file
|