aux 0.0.4 → 0.0.6

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: acf9da895d77d8ab39cc92765e586e69e0300e15cedc201fdd18a30a02221d4c
4
- data.tar.gz: c6aa3892d3a1691f2e0192a3094c33838a5e5b40121538b06862e1c7491c7190
3
+ metadata.gz: d0c47e51ed8f76e2c4b53518b0a37bf34f23a2a12efd94566305e5846631c7e8
4
+ data.tar.gz: 7d23cb0e9ff25b42ef6c133247935aeecb3bc9695c29af26eb3822f678a97d63
5
5
  SHA512:
6
- metadata.gz: c10a70b5b35a62161e4f6c48362fda7bc51e08a046c638ac3d8a8311fac53648fc1bdcd526e0c4d7302e1c9ce36c80d97f845dc0fa5d32f9e8ebc1332aad408d
7
- data.tar.gz: ae97078e7e7cc0d627711a1c147befecadcfa70e057376378402d59a8dda844ad63f4596a10fd1ee26c594f0db8f8189d0bfdb6e9a3962b557899747503b3c35
6
+ metadata.gz: af7b280395768002b12f8bb5219ccf51eae327650f095f5ebcd7cf6b4ae5b9421433feecc63f1cf1f6964df4532011651517ecdb8a71d35ad0f085d0ea7b72a6
7
+ data.tar.gz: 6fa52c6ab74433978848a9b89b49450fd321dcf1c32487c960505e487940bc32b07526b52b9bc253cd4442e4b4e4d3d8bc024cce1be31ab5d35118fd57921b3a
@@ -6,7 +6,7 @@ module Aux
6
6
  module ClassMethods
7
7
  # @param dependencies [Hash{Symbol => Object}]
8
8
  def new(**dependencies)
9
- instance = allocate
9
+ instance = super || allocate
10
10
 
11
11
  # Configure dependencies that come from the registry
12
12
  @_dependencies.each do |name, dependency|
@@ -18,9 +18,6 @@ module Aux
18
18
  instance.instance_variable_set("@#{name}", dependency) if @_dependencies.include?(name)
19
19
  end
20
20
 
21
- # Run the rest of customized initialization procedure
22
- instance.send(:initialize, **dependencies)
23
-
24
21
  instance
25
22
  end
26
23
 
@@ -73,6 +70,7 @@ module Aux
73
70
  private dependency_alias
74
71
  end
75
72
  end
73
+
76
74
  # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
77
75
  end
78
76
  end
data/lib/aux/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aux
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Boyko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-05 00:00:00.000000000 Z
11
+ date: 2023-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -64,7 +64,6 @@ files:
64
64
  - lib/aux.rb
65
65
  - lib/aux/pluggable.rb
66
66
  - lib/aux/pluggable/class_methods.rb
67
- - lib/aux/pluggable/registration.rb
68
67
  - lib/aux/pluggable/utilities.rb
69
68
  - lib/aux/validations.rb
70
69
  - lib/aux/validations/error.rb
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Aux
4
- module Pluggable
5
- # Describes a wrapper for registry data
6
- class Registration
7
- # @!attribute [r] name
8
- # @return [Symbol, String]
9
- # @!attribute [r] initialization_required
10
- # @return [TrueClass, FalseClass]
11
- # @!attribute [r] memoization_required
12
- # @return [TrueClass, FalseClass]
13
- attr_reader :name, :initialization_required, :memoization_required
14
-
15
- # @param name [Symbol, String]
16
- # @param initialization_required [TrueClass, FalseClass]
17
- # @param memoization_required [TrueClass, FalseClass]
18
- def initialize(name, initialization_required, memoization_required)
19
- @name = name
20
- @initialization_required = initialization_required
21
- @memoization_required = memoization_required
22
- end
23
- end
24
- end
25
- end