async-service 0.8.0 → 0.9.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: d1e2ef9fcbc4732f3683889f55acfd02fa632aa95189c0767c04c8b24f64eb52
4
+ data.tar.gz: debef0f6bdc887b83dc8ebf1dfbf63bf9ab0591a4b99a52a8c1aa6ccd47a419c
5
5
  SHA512:
6
- metadata.gz: cfb98e0d17511c3b917bfd98ed278f79f643e94cfaf2f93002076974ca2ffa0621fa8dde402d845eb5c49ba63f6d96ce23e9f864dccd233c1e17c68c610a1c5b
7
- data.tar.gz: bcc17aa016c6b972f4155071ec819f2b54dae4c925c5bcad6a8132651dd6cc6a8f9bcbecc950a148190be7011ed80f12d2a0596958db60e78720a1f116fccaf4
6
+ metadata.gz: 0ec21ead9612856e07467c62d3d52fa3452ca7883455f9a67c78743f61a9db512063550356a2ca9b5e374313dfccc64dbe909205c8410b6efd8ccf2b52fc4cc4
7
+ data.tar.gz: 0aa73567ad8f19c62c5c630ae9c4bc02fa5c2ba253a4882326e08b9ce9090c14a4c73e29241320e280136aa23e5e783d6ff7f06b63a3806c2464717c067318db
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Service
8
- VERSION = "0.8.0"
8
+ VERSION = "0.9.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.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
@@ -1,4 +1,4 @@
1
- lUdfBL��k2G���� s����XS[�!@����[��g�%��]!Ex�;x�<�F����e�D^�xepz2�v��=��ɭ�~/\s��H��95�������})g`|b��Cgƻ���4Ï^��m��s�
2
- e~S��;dĬG]�d��)����"�wd��+U��$j.��!���g�d�8��a��ʗs�K� t���� �gzN�ΪU��Uc�S˟u�<�gX���јg뫁���5����� ���<2g�� ��I��l����Y�?�(���޸`�O������J}~)1�Rc��M�A�#�Xr�*
3
- ����Px>�,�
4
- ���5�&ـ��KZ�t���^����)
1
+ 7�-���c5�h���>B���-Y���Գ����9����U�3csrZd��q� �!���m��6
2
+ \�5f��s
3
+ zR7�exj��cz���J~Gĉ]���ᒆ�17=&N�F���WO��ci��ײg�}�H�#�Ḥ�}�b�-��IUR�9���s1� �����F�a^�:����P���)^Y�S��;��}
4
+ &���.ʢ����~7�^�M�}լ�0*������x��uD��=�K>ܵ������(!�$��+B5��1�»��0����+�Zؖ�9��ӏcU[(�V>����?>�J�[c� ��R�} �!��r�au�Ym5�*�n��\����Q!d����CQ���