infusible 2.0.1 → 2.1.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/infusible.gemspec +1 -1
- data/lib/infusible/constructor.rb +4 -4
- data/lib/infusible.rb +5 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- 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: a3f33a8eb48000ff021c1e0e9198de5a40bfa616ba99701ae1c824924e0daf48
|
4
|
+
data.tar.gz: e7f24eed93d44a0b840e9c6923c703363c8fed79617261127aa406336b0acd77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c36cb4049506ec6fcd8d42ecd39653ecfd3edf3a971f85837ff924dd69169f044bd846f1688c70694dc1d9050c03cd3667f926a0003195d9f1a90c54b56d5b39
|
7
|
+
data.tar.gz: 9f9c61a5a6db1d4093685f212634fe9265951cf23c9dccb2f30f3a7d088a3b38c3b05404443f35c8f45537178df2110b19d3533b6f7a58758c07f2126b1eaca3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/infusible.gemspec
CHANGED
@@ -42,7 +42,7 @@ module Infusible
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def define_new
|
45
|
-
class_module.
|
45
|
+
class_module.module_exec container, dependencies.to_h do |container, collection|
|
46
46
|
define_method :new do |*positionals, **keywords, &block|
|
47
47
|
collection.each { |name, id| keywords[name] = container[id] unless keywords.key? name }
|
48
48
|
super(*positionals, **keywords, &block)
|
@@ -65,7 +65,7 @@ module Infusible
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def define_initialize_with_positionals super_parameters, variablizer
|
68
|
-
instance_module.
|
68
|
+
instance_module.module_exec dependencies.names, variablizer do |names, definer|
|
69
69
|
define_method :initialize do |*positionals, **keywords, &block|
|
70
70
|
definer.call self, names, keywords
|
71
71
|
|
@@ -79,7 +79,7 @@ module Infusible
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def define_initialize_with_keywords super_parameters, variablizer
|
82
|
-
instance_module.
|
82
|
+
instance_module.module_exec dependencies.names, variablizer do |names, definer|
|
83
83
|
define_method :initialize do |**keywords, &block|
|
84
84
|
definer.call self, names, keywords
|
85
85
|
super(**super_parameters.keyword_slice(keywords, keys: names), &block)
|
@@ -90,7 +90,7 @@ module Infusible
|
|
90
90
|
def define_readers
|
91
91
|
methods = dependencies.names.map { |name| ":#{name}" }
|
92
92
|
|
93
|
-
instance_module.
|
93
|
+
instance_module.module_eval <<-READERS, __FILE__, __LINE__ + 1
|
94
94
|
private attr_reader #{methods.join ", "}
|
95
95
|
READERS
|
96
96
|
end
|
data/lib/infusible.rb
CHANGED
@@ -2,12 +2,16 @@
|
|
2
2
|
|
3
3
|
require "zeitwerk"
|
4
4
|
|
5
|
-
Zeitwerk::Loader.
|
5
|
+
Zeitwerk::Loader.new.then do |loader|
|
6
|
+
loader.tag = File.basename __FILE__, ".rb"
|
6
7
|
loader.ignore "#{__dir__}/infusible/stub"
|
8
|
+
loader.push_dir __dir__
|
7
9
|
loader.setup
|
8
10
|
end
|
9
11
|
|
10
12
|
# Main namespace.
|
11
13
|
module Infusible
|
14
|
+
def self.loader(registry = Zeitwerk::Registry) = registry.loader_for __FILE__
|
15
|
+
|
12
16
|
def self.with(container) = Actuator.new container
|
13
17
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infusible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2023-
|
38
|
+
date: 2023-10-01 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: marameters
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
|
-
rubygems_version: 3.4.
|
113
|
+
rubygems_version: 3.4.20
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: An automated dependency manager and injector.
|
metadata.gz.sig
CHANGED
Binary file
|