async-service 0.8.0 → 0.10.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: 9712448ebd0e8279fcc9820181ba9f72eb4799fc9735118fbbaea548b1650ff4
4
- data.tar.gz: c71431b601e6fc9d5f1635a47a865b028fc7bb6c6c893c4496fe46dd73c485bb
3
+ metadata.gz: b0b675712917a6e60c73eb1365551f672e2d64bd3f452803fbc260061be33043
4
+ data.tar.gz: fad370b868d9f4b66cc9a2f5c0ca24642a5888f927f5a1a4735505e7f5fc848c
5
5
  SHA512:
6
- metadata.gz: cfb98e0d17511c3b917bfd98ed278f79f643e94cfaf2f93002076974ca2ffa0621fa8dde402d845eb5c49ba63f6d96ce23e9f864dccd233c1e17c68c610a1c5b
7
- data.tar.gz: bcc17aa016c6b972f4155071ec819f2b54dae4c925c5bcad6a8132651dd6cc6a8f9bcbecc950a148190be7011ed80f12d2a0596958db60e78720a1f116fccaf4
6
+ metadata.gz: 3cbe624d6f4b5c3c754935b828ee5957aabe25fd72fb275d6eef7711b36c31a97c4276694a7b3e5280d93458435cff70d5cb7593b7a9fa6708a86c84b48cc033
7
+ data.tar.gz: edc1cc618ece20772be304b32cf86720c0d2607b45076808d04829a24d2eddbd6f4ead009b4d74fe965f60bb28af3101296af0574e45eeb42f6b5402fbf42362
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1 @@
1
- yioY�T�DV�+�B���r���6��y����=�\�s%'6DS)�,K��_��MWUR�Ӡ��dKsRi
2
- 'v�#̑e }�>:M�bM��4�7Z?��z҅7��da&j<;>+�c�̮>x�G<�6�+T-W����΅��4��Rh�����ʳn���x*L��dUX���'B�W���T�"Ӯ�%�J�II�\��w�v���f@+�E���dB3+(�ƯG.�����j�ɛy��%����A��E�Ņ=oϣ8���a�Й�Ri���Q�
1
+ ��*w�������fȌ��ĉ��W�~�2��Ÿ3qr���`��Ze��#�^ �8 [4�I�q �f>-F���R�8X�>���T�S�+� P�:�ȟ�Y��9ƽ�/�E[I �#�x��0˯g�v+~��p���.q�ؒz����\���<4ŀ��<�� ��7�5Z���1k:�٥ذvX,a�1�s��8��kڨ��L:�ZB�S�uTFي�d��N�/���}�n�R4�q�'� ���>��m\%�δ<W���(ȻN�� O]P���'��4���}'���e�+��5"���؃o�:{zy6F��r��e�gҪ�:�������&�NHAj��}Cʜ��?r��ӵ�X|���vX���k�h9�ن޽�&
@@ -23,9 +23,13 @@ module Async
23
23
  return configuration
24
24
  end
25
25
 
26
+ def self.for(*environments)
27
+ self.new(environments)
28
+ end
29
+
26
30
  # Initialize an empty configuration.
27
- def initialize
28
- @environments = []
31
+ def initialize(environments = [])
32
+ @environments = environments
29
33
  end
30
34
 
31
35
  attr :environments
@@ -7,20 +7,26 @@ module Async
7
7
  module Service
8
8
  class Environment
9
9
  class Builder < BasicObject
10
- def self.for(facet = ::Module.new, **values, &block)
11
- builder = self.new(facet)
10
+ def self.for(*facets, **values, &block)
11
+ top = ::Module.new
12
+
13
+ builder = self.new(top)
14
+
15
+ facets.each do |facet|
16
+ builder.include(facet)
17
+ end
12
18
 
13
19
  values.each do |key, value|
14
20
  if value.is_a?(::Proc)
15
- facet.define_method(key, &value)
21
+ builder.method_missing(key, &value)
16
22
  else
17
- facet.define_method(key){value}
23
+ builder.method_missing(key, value)
18
24
  end
19
25
  end
20
26
 
21
27
  builder.instance_exec(&block) if block_given?
22
28
 
23
- return facet
29
+ return top
24
30
  end
25
31
 
26
32
  def initialize(facet = ::Module.new)
@@ -127,6 +133,10 @@ module Async
127
133
  return @cache
128
134
  end
129
135
 
136
+ def to_json(...)
137
+ self.to_h.to_json(...)
138
+ end
139
+
130
140
  def [](key)
131
141
  self.__send__(key)
132
142
  end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Service
8
- VERSION = "0.8.0"
8
+ VERSION = "0.10.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.8.0
4
+ version: 0.10.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-22 00:00:00.000000000 Z
40
+ date: 2024-03-23 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: async
metadata.gz.sig CHANGED
Binary file