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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 794a5826cabaf01cb2ba1117381b4709b72aa871fa9bc5ca860bb965b52066ff
4
- data.tar.gz: ced212fc7bb3bdbe5ef5c4b965ece2bba2a260425b8a0d507bf490b480149cac
3
+ metadata.gz: a3f33a8eb48000ff021c1e0e9198de5a40bfa616ba99701ae1c824924e0daf48
4
+ data.tar.gz: e7f24eed93d44a0b840e9c6923c703363c8fed79617261127aa406336b0acd77
5
5
  SHA512:
6
- metadata.gz: 278873d553990a764065dec0090fd919b20d935064a003eafc0bd8fc1c022ccd196aa6c2b0514b3437a9165b420624ec6887eb80a3e5ea3068856c43c92df5e6
7
- data.tar.gz: a5fdd5645e326e8cbda139c09c358bb97d453103ed154b9221a29dcae4dd7e5f729cbfc7fd659169443479037c0488a62bd13bc8619940985f78f1e3bebd5ddf
6
+ metadata.gz: c36cb4049506ec6fcd8d42ecd39653ecfd3edf3a971f85837ff924dd69169f044bd846f1688c70694dc1d9050c03cd3667f926a0003195d9f1a90c54b56d5b39
7
+ data.tar.gz: 9f9c61a5a6db1d4093685f212634fe9265951cf23c9dccb2f30f3a7d088a3b38c3b05404443f35c8f45537178df2110b19d3533b6f7a58758c07f2126b1eaca3
checksums.yaml.gz.sig CHANGED
Binary file
data/infusible.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "infusible"
5
- spec.version = "2.0.1"
5
+ spec.version = "2.1.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/infusible"
@@ -42,7 +42,7 @@ module Infusible
42
42
  end
43
43
 
44
44
  def define_new
45
- class_module.class_exec container, dependencies.to_h do |container, collection|
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.class_exec dependencies.names, variablizer do |names, definer|
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.class_exec dependencies.names, variablizer do |names, definer|
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.class_eval <<-READERS, __FILE__, __LINE__ + 1
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.for_gem.then do |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.1
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-06-19 00:00:00.000000000 Z
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.14
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