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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0b675712917a6e60c73eb1365551f672e2d64bd3f452803fbc260061be33043
4
- data.tar.gz: fad370b868d9f4b66cc9a2f5c0ca24642a5888f927f5a1a4735505e7f5fc848c
3
+ metadata.gz: a0a40d50b41d2ddb7691daa0b3911559150853ea1c060be2bd3dad1c75d6f549
4
+ data.tar.gz: 5d24dc0724bf6cb013ed68072a6579368f50233b4e54ebffc1615fe300683fd0
5
5
  SHA512:
6
- metadata.gz: 3cbe624d6f4b5c3c754935b828ee5957aabe25fd72fb275d6eef7711b36c31a97c4276694a7b3e5280d93458435cff70d5cb7593b7a9fa6708a86c84b48cc033
7
- data.tar.gz: edc1cc618ece20772be304b32cf86720c0d2607b45076808d04829a24d2eddbd6f4ead009b4d74fe965f60bb28af3101296af0574e45eeb42f6b5402fbf42362
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
- builder.instance_exec(&block) if block_given?
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
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Service
8
- VERSION = "0.10.0"
8
+ VERSION = "0.12.0"
9
9
  end
10
10
  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.10.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-03-23 00:00:00.000000000 Z
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