smart_initializer 0.4.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/CHANGELOG.md +46 -4
  4. data/Gemfile.lock +46 -45
  5. data/LICENSE.txt +1 -1
  6. data/README.md +262 -45
  7. data/bin/console +2 -2
  8. data/gemfiles/with_external_deps.gemfile.lock +40 -40
  9. data/gemfiles/without_external_deps.gemfile.lock +30 -23
  10. data/lib/smart_core/initializer/attribute/factory/base.rb +145 -0
  11. data/lib/smart_core/initializer/attribute/factory/option.rb +107 -0
  12. data/lib/smart_core/initializer/attribute/factory/param.rb +63 -0
  13. data/lib/smart_core/initializer/attribute/factory.rb +5 -199
  14. data/lib/smart_core/initializer/attribute/finalizer/abstract.rb +2 -0
  15. data/lib/smart_core/initializer/attribute/finalizer/instance_method.rb +1 -1
  16. data/lib/smart_core/initializer/attribute/finalizer.rb +5 -5
  17. data/lib/smart_core/initializer/attribute/list.rb +20 -0
  18. data/lib/smart_core/initializer/attribute/{parameters.rb → value/base.rb} +35 -65
  19. data/lib/smart_core/initializer/attribute/value/option.rb +101 -0
  20. data/lib/smart_core/initializer/attribute/value/param.rb +24 -0
  21. data/lib/smart_core/initializer/attribute/value.rb +9 -0
  22. data/lib/smart_core/initializer/attribute.rb +3 -112
  23. data/lib/smart_core/initializer/configuration.rb +9 -0
  24. data/lib/smart_core/initializer/constructor/definer.rb +135 -46
  25. data/lib/smart_core/initializer/constructor.rb +31 -12
  26. data/lib/smart_core/initializer/dsl.rb +38 -24
  27. data/lib/smart_core/initializer/errors.rb +20 -0
  28. data/lib/smart_core/initializer/functionality.rb +7 -8
  29. data/lib/smart_core/initializer/plugins/thy_types/thy_types/abstract_factory.rb +13 -2
  30. data/lib/smart_core/initializer/settings/auto_cast.rb +40 -0
  31. data/lib/smart_core/initializer/settings/base.rb +49 -0
  32. data/lib/smart_core/initializer/settings/duplicator.rb +5 -0
  33. data/lib/smart_core/initializer/settings/strict_options.rb +40 -0
  34. data/lib/smart_core/initializer/settings/type_system.rb +10 -28
  35. data/lib/smart_core/initializer/settings.rb +40 -0
  36. data/lib/smart_core/initializer/type_system/interop/abstract_factory.rb +12 -2
  37. data/lib/smart_core/initializer/type_system/interop.rb +10 -1
  38. data/lib/smart_core/initializer/type_system/registry.rb +2 -1
  39. data/lib/smart_core/initializer/type_system/smart_types/abstract_factory.rb +13 -2
  40. data/lib/smart_core/initializer/type_system/smart_types.rb +2 -2
  41. data/lib/smart_core/initializer/version.rb +2 -2
  42. data/lib/smart_core/initializer.rb +14 -4
  43. data/smart_initializer.gemspec +4 -4
  44. metadata +20 -11
@@ -9,6 +9,14 @@ module SmartCore::Initializer
9
9
  # @since 0.1.0
10
10
  ArgumentError = Class.new(SmartCore::ArgumentError)
11
11
 
12
+ # @api public
13
+ # @since 0.8.0
14
+ AttributeError = Class.new(Error)
15
+
16
+ # @api public
17
+ # @since 0.8.0
18
+ UndefinedAttributeError = Class.new(AttributeError)
19
+
12
20
  # @api public
13
21
  # @since 0.1.0
14
22
  ParameterArgumentError = Class.new(ArgumentError)
@@ -17,6 +25,14 @@ module SmartCore::Initializer
17
25
  # @since 0.1.0
18
26
  OptionArgumentError = Class.new(ArgumentError)
19
27
 
28
+ # @api public
29
+ # @since 0.8.0
30
+ AliasArgumentError = Class.new(ArgumentError)
31
+
32
+ # @api public
33
+ # @since 0.8.0
34
+ SettingArgumentError = Class.new(ArgumentError)
35
+
20
36
  # @api public
21
37
  # @since 0.1.0
22
38
  NoDefaultValueError = Class.new(Error)
@@ -53,6 +69,10 @@ module SmartCore::Initializer
53
69
  # @since 0.1.0
54
70
  TypeSystemError = Class.new(Error)
55
71
 
72
+ # @api public
73
+ # @since 0.5.1
74
+ IncorrectTypeError = Class.new(TypeSystemError)
75
+
56
76
  # @api public
57
77
  # @since 0.1.0
58
78
  TypeAliasNotFoundError = Class.new(TypeSystemError)
@@ -3,23 +3,22 @@
3
3
  # @api private
4
4
  # @since 0.3.0
5
5
  module SmartCore::Initializer::Functionality
6
- # @return [NilClass]
7
- #
8
- # @api private
9
- # @since 0.3.0
10
- INITIAL_TYPE_SYSTEM = nil
11
-
12
6
  class << self
13
- # @option type_system [String, Symbol, NilClass]
7
+ # @option type_system [String, Symbol]
8
+ # @option strict_option [Boolean]
9
+ # @option auto_cast [Boolean]
14
10
  # @return [Module]
15
11
  #
16
12
  # @api private
17
13
  # @since 0.3.0
18
- def includable_module(type_system: INITIAL_TYPE_SYSTEM)
14
+ # @version 0.8.0
15
+ def includable_module(type_system:, strict_options:, auto_cast:)
19
16
  Module.new.tap do |extension|
20
17
  extension.singleton_class.define_method(:included) do |base_klass|
21
18
  base_klass.include(::SmartCore::Initializer)
22
19
  base_klass.__initializer_settings__.type_system = type_system
20
+ base_klass.__initializer_settings__.strict_options = strict_options
21
+ base_klass.__initializer_settings__.auto_cast = auto_cast
23
22
  end
24
23
  end
25
24
  end
@@ -28,6 +28,15 @@ module SmartCore::Initializer::TypeSystem
28
28
  end
29
29
  end
30
30
 
31
+ # @param type [Any]
32
+ # @return [String]
33
+ #
34
+ # @api private
35
+ # @since 0.5.1
36
+ def build_identifier(type)
37
+ type.name
38
+ end
39
+
31
40
  # @param type [Thy::Type, #check]
32
41
  # @return [SmartCore::Initializer::TypeSystem::ThyTypes::Operation::Valid]
33
42
  #
@@ -63,6 +72,7 @@ module SmartCore::Initializer::TypeSystem
63
72
  ThyTypes::Operation::Cast.new(type)
64
73
  end
65
74
 
75
+ # @param identifier [String]
66
76
  # @param valid_op [SmartCore::Initializer::TypeSystem::ThyTypes::Operation::Valid]
67
77
  # @param valid_op [SmartCore::Initializer::TypeSystem::ThyTypes::Operation::Validate]
68
78
  # @param valid_op [SmartCore::Initializer::TypeSystem::ThyTypes::Operation::Cast]
@@ -70,8 +80,9 @@ module SmartCore::Initializer::TypeSystem
70
80
  #
71
81
  # @api private
72
82
  # @since 0.1.0
73
- def build_interop(valid_op, validate_op, cast_op)
74
- ThyTypes.new(valid_op, validate_op, cast_op)
83
+ # @version 0.5.1
84
+ def build_interop(identifier, valid_op, validate_op, cast_op)
85
+ ThyTypes.new(identifier, valid_op, validate_op, cast_op)
75
86
  end
76
87
  end
77
88
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @api private
4
+ # @since 0.8.0
5
+ class SmartCore::Initializer::Settings::AutoCast < SmartCore::Initializer::Settings::Base
6
+ # @return [void]
7
+ #
8
+ # @api private
9
+ # @since 0.8.0
10
+ def initialize
11
+ @value = nil
12
+ @lock = SmartCore::Engine::Lock.new
13
+ end
14
+
15
+ # @return [Boolean]
16
+ #
17
+ # @api private
18
+ # @since 0.8.0
19
+ def resolve
20
+ thread_safe do
21
+ @value == nil ? SmartCore::Initializer::Configuration[:auto_cast] : @value
22
+ end
23
+ end
24
+
25
+ # @param value [Boolean]
26
+ # @return [void]
27
+ #
28
+ # @api private
29
+ # @since 0.8.0
30
+ def assign(value)
31
+ thread_safe do
32
+ raise(
33
+ SmartCore::Initializer::SettingArgumentError,
34
+ ":auto_cast setting should be a type of boolean (got: `#{value.class}`)"
35
+ ) unless value.is_a?(::TrueClass) || value.is_a?(::FalseClass)
36
+
37
+ @value = value
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @api private
4
+ # @since 0.8.0
5
+ class SmartCore::Initializer::Settings::Base
6
+ # @return [void]
7
+ #
8
+ # @api private
9
+ # @since 0.8.0
10
+ def initialize
11
+ @value = nil
12
+ @lock = SmartCore::Engine::Lock.new
13
+ end
14
+
15
+ # @!method resolve
16
+ # @return [Any]
17
+ # @api private
18
+ # @since 0.8.0
19
+
20
+ # @!method assign(value)
21
+ # @param value [Any]
22
+ # @return [void]
23
+ # @raise [SmartCore::Initializer::SettingArgumentError]
24
+ # @api private
25
+ # @since 0.8.0
26
+
27
+ # @return [SmartCore::Initializer::Settings::Base]
28
+ #
29
+ # @api private
30
+ # @since 0.8.0
31
+ def dup
32
+ thread_safe do
33
+ self.class.new.tap do |duplicate|
34
+ duplicate.instance_variable_set(:@value, @value)
35
+ end
36
+ end
37
+ end
38
+
39
+ private
40
+
41
+ # @param block [Block]
42
+ # @return [Any]
43
+ #
44
+ # @api private
45
+ # @since 0.8.0
46
+ def thread_safe(&block)
47
+ @lock.synchronize(&block)
48
+ end
49
+ end
@@ -9,11 +9,16 @@ module SmartCore::Initializer::Settings::Duplicator
9
9
  #
10
10
  # @api private
11
11
  # @since 0.1.0
12
+ # @version 0.8.0
12
13
  def duplicate(settings)
13
14
  SmartCore::Initializer::Settings.new.tap do |new_instance|
14
15
  type_system = settings.instance_variable_get(:@type_system).dup
16
+ strict_options = settings.instance_variable_get(:@strict_options).dup
17
+ auto_cast = settings.instance_variable_get(:@auto_cast).dup
15
18
 
16
19
  new_instance.instance_variable_set(:@type_system, type_system)
20
+ new_instance.instance_variable_set(:@strict_options, strict_options)
21
+ new_instance.instance_variable_set(:@auto_cast, auto_cast)
17
22
  end
18
23
  end
19
24
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @api private
4
+ # @since 0.8.0
5
+ class SmartCore::Initializer::Settings::StrictOptions < SmartCore::Initializer::Settings::Base
6
+ # @return [void]
7
+ #
8
+ # @api private
9
+ # @since 0.8.0
10
+ def initialize
11
+ @value = nil
12
+ @lock = SmartCore::Engine::Lock.new
13
+ end
14
+
15
+ # @return [Boolean]
16
+ #
17
+ # @api private
18
+ # @since 0.8.0
19
+ def resolve
20
+ thread_safe do
21
+ @value == nil ? SmartCore::Initializer::Configuration[:strict_options] : @value
22
+ end
23
+ end
24
+
25
+ # @param value [Boolean]
26
+ # @return [void]
27
+ #
28
+ # @api private
29
+ # @since 0.8.0
30
+ def assign(value)
31
+ thread_safe do
32
+ raise(
33
+ SmartCore::Initializer::SettingArgumentError,
34
+ ":strict_options setting should be a type of boolean (got: `#{value.class}`)"
35
+ ) unless value.is_a?(::TrueClass) || value.is_a?(::FalseClass)
36
+
37
+ @value = value
38
+ end
39
+ end
40
+ end
@@ -2,13 +2,15 @@
2
2
 
3
3
  # @api private
4
4
  # @since 0.1.0
5
- class SmartCore::Initializer::Settings::TypeSystem
5
+ # @version 0.8.0
6
+ class SmartCore::Initializer::Settings::TypeSystem < SmartCore::Initializer::Settings::Base
6
7
  # @return [void]
7
8
  #
8
9
  # @api private
9
10
  # @since 0.1.0
11
+ # @version 0.8.0
10
12
  def initialize
11
- @type_system = nil
13
+ @value = nil
12
14
  @lock = SmartCore::Engine::Lock.new
13
15
  end
14
16
 
@@ -26,9 +28,10 @@ class SmartCore::Initializer::Settings::TypeSystem
26
28
  #
27
29
  # @api private
28
30
  # @since 0.1.0
31
+ # @version 0.8.0
29
32
  def resolve
30
33
  thread_safe do
31
- @type_system || SmartCore::Initializer::Configuration.config[:default_type_system]
34
+ @value == nil ? SmartCore::Initializer::Configuration[:default_type_system] : @value
32
35
  end
33
36
  end
34
37
 
@@ -37,33 +40,12 @@ class SmartCore::Initializer::Settings::TypeSystem
37
40
  #
38
41
  # @api private
39
42
  # @since 0.1.0
43
+ # @version 0.8.0
40
44
  def assign(value)
41
45
  thread_safe do
42
- SmartCore::Initializer::TypeSystem.resolve(value) # NOTE: type system existence validation
43
- @type_system = value
46
+ # NOTE: type system existence validation
47
+ SmartCore::Initializer::TypeSystem.resolve(value)
48
+ @value = value
44
49
  end
45
50
  end
46
-
47
- # @return [SmartCore::Initializer::Settings::TypeSystem]
48
- #
49
- # @api private
50
- # @since 0.1.0
51
- def dup
52
- thread_safe do
53
- self.class.new.tap do |duplicate|
54
- duplicate.instance_variable_set(:@type_system, @type_system)
55
- end
56
- end
57
- end
58
-
59
- private
60
-
61
- # @param block [Block]
62
- # @return [Any]
63
- #
64
- # @api private
65
- # @since 0.1.0
66
- def thread_safe(&block)
67
- @lock.synchronize(&block)
68
- end
69
51
  end
@@ -3,15 +3,21 @@
3
3
  # @api private
4
4
  # @since 0.1.0
5
5
  class SmartCore::Initializer::Settings
6
+ require_relative 'settings/base'
6
7
  require_relative 'settings/type_system'
8
+ require_relative 'settings/strict_options'
9
+ require_relative 'settings/auto_cast'
7
10
  require_relative 'settings/duplicator'
8
11
 
9
12
  # @return [void]
10
13
  #
11
14
  # @api private
12
15
  # @since 0.1.0
16
+ # @version 0.8.0
13
17
  def initialize
14
18
  @type_system = TypeSystem.new
19
+ @strict_options = StrictOptions.new
20
+ @auto_cast = AutoCast.new
15
21
  end
16
22
 
17
23
  # @return [Any]
@@ -30,6 +36,22 @@ class SmartCore::Initializer::Settings
30
36
  @type_system.resolve
31
37
  end
32
38
 
39
+ # @return [Boolean]
40
+ #
41
+ # @api private
42
+ # @since 0.8.0
43
+ def strict_options
44
+ @strict_options.resolve
45
+ end
46
+
47
+ # @return [Boolean]
48
+ #
49
+ # @api private
50
+ # @since 0.8.0
51
+ def auto_cast
52
+ @auto_cast.resolve
53
+ end
54
+
33
55
  # @param value [String, System]
34
56
  # @return [void]
35
57
  #
@@ -39,6 +61,24 @@ class SmartCore::Initializer::Settings
39
61
  @type_system.assign(value)
40
62
  end
41
63
 
64
+ # @param value [Boolean]
65
+ # @return [void]
66
+ #
67
+ # @api private
68
+ # @since 0.8.0
69
+ def strict_options=(value)
70
+ @strict_options.assign(value)
71
+ end
72
+
73
+ # @param value [Boolean]
74
+ # @return [void]
75
+ #
76
+ # @api private
77
+ # @since 0.8.0
78
+ def auto_cast=(value)
79
+ @auto_cast.assign(value)
80
+ end
81
+
42
82
  # @return [SmartCore::Initializer::Settings]
43
83
  #
44
84
  # @api private
@@ -13,11 +13,12 @@ class SmartCore::Initializer::TypeSystem::Interop::AbstractFactory
13
13
  def create(type)
14
14
  prevent_incompatible_type!(type)
15
15
 
16
+ identifier = build_identifier(type)
16
17
  valid_op = build_valid_operation(type)
17
18
  validate_op = build_validate_operation(type)
18
19
  cast_op = build_cast_operation(type)
19
20
 
20
- build_interop(valid_op, validate_op, cast_op)
21
+ build_interop(identifier, valid_op, validate_op, cast_op)
21
22
  end
22
23
 
23
24
  # @return [Any]
@@ -26,6 +27,13 @@ class SmartCore::Initializer::TypeSystem::Interop::AbstractFactory
26
27
  # @since 0.1.0
27
28
  def generic_type_object; end
28
29
 
30
+ # @param type [Any]
31
+ # @return [String]
32
+ #
33
+ # @api private
34
+ # @since 0.5.1
35
+ def build_identifier(type); end
36
+
29
37
  # @param type [Any]
30
38
  # @return [void]
31
39
  #
@@ -58,6 +66,7 @@ class SmartCore::Initializer::TypeSystem::Interop::AbstractFactory
58
66
  # @since 0.1.0
59
67
  def build_cast_operation(type); end
60
68
 
69
+ # @param identifier [String]
61
70
  # @param valid_op [SmartCore::Initializer::TypeSystem::Interop::Operation]
62
71
  # @param validate_op [SmartCore::Initializer::TypeSystem::Interop::Operation]
63
72
  # @param cast_op [SmartCore::Initializer::TypeSystem::Interop::Operation]
@@ -65,6 +74,7 @@ class SmartCore::Initializer::TypeSystem::Interop::AbstractFactory
65
74
  #
66
75
  # @api private
67
76
  # @since 0.1.0
68
- def build_interop(valid_op, validate_op, cast_op); end
77
+ # @version 0.5.1
78
+ def build_interop(identifier, valid_op, validate_op, cast_op); end
69
79
  end
70
80
  end
@@ -41,6 +41,13 @@ class SmartCore::Initializer::TypeSystem::Interop
41
41
  end
42
42
  end
43
43
 
44
+ # @return [String]
45
+ #
46
+ # @api private
47
+ # @since 0.5.1
48
+ attr_reader :identifier
49
+
50
+ # @param identifier [String]
44
51
  # @param valid_op [SmartCore::Initializer::TypeSystem::Interop::Operation]
45
52
  # @param validate_op [SmartCore::Initializer::TypeSystem::Interop::Operation]
46
53
  # @param cast_op [SmartCore::Initializer::TypeSystem::Interop::Operation]
@@ -48,7 +55,9 @@ class SmartCore::Initializer::TypeSystem::Interop
48
55
  #
49
56
  # @api private
50
57
  # @since 0.1.0
51
- def initialize(valid_op, validate_op, cast_op)
58
+ # @version 0.5.1
59
+ def initialize(identifier, valid_op, validate_op, cast_op)
60
+ @identifier = identifier
52
61
  @valid_op = valid_op
53
62
  @validate_op = validate_op
54
63
  @cast_op = cast_op
@@ -126,6 +126,7 @@ class SmartCore::Initializer::TypeSystem::Registry
126
126
  #
127
127
  # @api private
128
128
  # @since 0.1.0
129
+ # @version 0.8.0
129
130
  def fetch(system_identifier)
130
131
  identifier = indifferently_accessible_identifier(system_identifier)
131
132
 
@@ -133,7 +134,7 @@ class SmartCore::Initializer::TypeSystem::Registry
133
134
  systems.fetch(identifier)
134
135
  rescue ::KeyError
135
136
  raise(SmartCore::Initializer::UnsupportedTypeSystemError, <<~ERROR_MESSAGE)
136
- "#{identifier}" type system is not supported.
137
+ `#{identifier}` type system is not supported.
137
138
  ERROR_MESSAGE
138
139
  end
139
140
  end
@@ -22,6 +22,15 @@ module SmartCore::Initializer::TypeSystem
22
22
  end
23
23
  end
24
24
 
25
+ # @param type [Any]
26
+ # @return [String]
27
+ #
28
+ # @api private
29
+ # @since 0.5.1
30
+ def build_identifier(type)
31
+ type.name
32
+ end
33
+
25
34
  # @param type [SmartCore::Types::Primitive]
26
35
  # @return [SmartCore::Initializer::TypeSystem::SmartTypes::Operation::Valid]
27
36
  #
@@ -57,6 +66,7 @@ module SmartCore::Initializer::TypeSystem
57
66
  SmartTypes::Operation::Cast.new(type)
58
67
  end
59
68
 
69
+ # @param identifier [String]
60
70
  # @param valid_op [SmartCore::Initializer::TypeSystem::SmartTypes::Operation::Valid]
61
71
  # @param valid_op [SmartCore::Initializer::TypeSystem::SmartTypes::Operation::Validate]
62
72
  # @param valid_op [SmartCore::Initializer::TypeSystem::SmartTypes::Operation::Cast]
@@ -64,8 +74,9 @@ module SmartCore::Initializer::TypeSystem
64
74
  #
65
75
  # @api private
66
76
  # @since 0.1.0
67
- def build_interop(valid_op, validate_op, cast_op)
68
- SmartTypes.new(valid_op, validate_op, cast_op)
77
+ # @version 0.5.1
78
+ def build_interop(identifier, valid_op, validate_op, cast_op)
79
+ SmartTypes.new(identifier, valid_op, validate_op, cast_op)
69
80
  end
70
81
  end
71
82
  end
@@ -21,7 +21,7 @@ class SmartCore::Initializer::TypeSystem::SmartTypes < SmartCore::Initializer::T
21
21
  type_alias('value.proc', SmartCore::Types::Value::Proc)
22
22
  type_alias('value.class', SmartCore::Types::Value::Class)
23
23
  type_alias('value.module', SmartCore::Types::Value::Module)
24
- type_alias('value.tme', SmartCore::Types::Value::Time)
24
+ type_alias('value.time', SmartCore::Types::Value::Time)
25
25
  type_alias('value.date_time', SmartCore::Types::Value::DateTime)
26
26
  type_alias('value.date', SmartCore::Types::Value::Date)
27
27
  type_alias('value.time_based', SmartCore::Types::Value::TimeBased)
@@ -41,7 +41,7 @@ class SmartCore::Initializer::TypeSystem::SmartTypes < SmartCore::Initializer::T
41
41
  type_alias(:proc, SmartCore::Types::Value::Proc)
42
42
  type_alias(:class, SmartCore::Types::Value::Class)
43
43
  type_alias(:module, SmartCore::Types::Value::Module)
44
- type_alias(:tme, SmartCore::Types::Value::Time)
44
+ type_alias(:time, SmartCore::Types::Value::Time)
45
45
  type_alias(:date_time, SmartCore::Types::Value::DateTime)
46
46
  type_alias(:date, SmartCore::Types::Value::Date)
47
47
  type_alias(:time_based, SmartCore::Types::Value::TimeBased)
@@ -6,7 +6,7 @@ module SmartCore
6
6
  #
7
7
  # @api public
8
8
  # @since 0.1.0
9
- # @version 0.4.0
10
- VERSION = '0.4.0'
9
+ # @version 0.8.0
10
+ VERSION = '0.8.0'
11
11
  end
12
12
  end
@@ -43,15 +43,25 @@ module SmartCore
43
43
  end
44
44
 
45
45
  class << self
46
- # @option type_system [String, Symbol, NilSymbol]
46
+ # @option type_system [String, Symbol]
47
+ # @option strict_options [Boolean]
48
+ # @option auto_cast [Boolean]
47
49
  # @return [Module]
48
50
  #
49
51
  # @api public
50
52
  # @since 0.1.0
51
- # @version 0.3.0
53
+ # @version 0.8.0
52
54
  # rubocop:disable Naming/MethodName
53
- def Initializer(type_system: SmartCore::Initializer::Functionality::INITIAL_TYPE_SYSTEM)
54
- SmartCore::Initializer::Functionality.includable_module(type_system: type_system)
55
+ def Initializer(
56
+ type_system: SmartCore::Initializer::Configuration[:default_type_system],
57
+ strict_options: SmartCore::Initializer::Configuration[:strict_options],
58
+ auto_cast: SmartCore::Initializer::Configuration[:auto_cast]
59
+ )
60
+ SmartCore::Initializer::Functionality.includable_module(
61
+ type_system: type_system,
62
+ strict_options: strict_options,
63
+ auto_cast: auto_cast
64
+ )
55
65
  end
56
66
  # rubocop:enable Naming/MethodName
57
67
  end
@@ -3,7 +3,7 @@
3
3
  require_relative 'lib/smart_core/initializer/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = Gem::Requirement.new('>= 2.4.10')
6
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5')
7
7
 
8
8
  spec.name = 'smart_initializer'
9
9
  spec.version = SmartCore::Initializer::VERSION
@@ -31,13 +31,13 @@ Gem::Specification.new do |spec|
31
31
  spec.require_paths = ['lib']
32
32
 
33
33
  spec.add_dependency 'smart_engine', '~> 0.11'
34
- spec.add_dependency 'smart_types', '~> 0.1'
34
+ spec.add_dependency 'smart_types', '~> 0.4'
35
35
  spec.add_dependency 'qonfig', '~> 0.24'
36
36
 
37
37
  spec.add_development_dependency 'bundler', '~> 2.2'
38
38
  spec.add_development_dependency 'rake', '~> 13.0'
39
39
  spec.add_development_dependency 'rspec', '~> 3.10'
40
- spec.add_development_dependency 'armitage-rubocop', '~> 1.7'
40
+ spec.add_development_dependency 'armitage-rubocop', '~> 1.23'
41
41
  spec.add_development_dependency 'simplecov', '~> 0.21'
42
- spec.add_development_dependency 'pry', '~> 0.13'
42
+ spec.add_development_dependency 'pry', '~> 0.14'
43
43
  end