smart_initializer 0.5.0 → 0.9.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 -1
  4. data/Gemfile.lock +45 -44
  5. data/LICENSE.txt +1 -1
  6. data/README.md +283 -40
  7. data/bin/console +2 -2
  8. data/gemfiles/with_external_deps.gemfile.lock +38 -38
  9. data/gemfiles/without_external_deps.gemfile.lock +50 -45
  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 +29 -14
  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 +3 -3
  44. metadata +18 -9
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_initializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rustam Ibragimov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-17 00:00:00.000000000 Z
11
+ date: 2021-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smart_engine
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '1.7'
103
+ version: '1.23'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '1.7'
110
+ version: '1.23'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0.13'
131
+ version: '0.14'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0.13'
138
+ version: '0.14'
139
139
  description: A simple and convenient way to declare complex constructors
140
140
  email:
141
141
  - iamdaiver@gmail.com
@@ -163,12 +163,18 @@ files:
163
163
  - lib/smart_core/initializer.rb
164
164
  - lib/smart_core/initializer/attribute.rb
165
165
  - lib/smart_core/initializer/attribute/factory.rb
166
+ - lib/smart_core/initializer/attribute/factory/base.rb
167
+ - lib/smart_core/initializer/attribute/factory/option.rb
168
+ - lib/smart_core/initializer/attribute/factory/param.rb
166
169
  - lib/smart_core/initializer/attribute/finalizer.rb
167
170
  - lib/smart_core/initializer/attribute/finalizer/abstract.rb
168
171
  - lib/smart_core/initializer/attribute/finalizer/anonymous_block.rb
169
172
  - lib/smart_core/initializer/attribute/finalizer/instance_method.rb
170
173
  - lib/smart_core/initializer/attribute/list.rb
171
- - lib/smart_core/initializer/attribute/parameters.rb
174
+ - lib/smart_core/initializer/attribute/value.rb
175
+ - lib/smart_core/initializer/attribute/value/base.rb
176
+ - lib/smart_core/initializer/attribute/value/option.rb
177
+ - lib/smart_core/initializer/attribute/value/param.rb
172
178
  - lib/smart_core/initializer/configuration.rb
173
179
  - lib/smart_core/initializer/constructor.rb
174
180
  - lib/smart_core/initializer/constructor/definer.rb
@@ -196,7 +202,10 @@ files:
196
202
  - lib/smart_core/initializer/plugins/thy_types/thy_types/operation/valid.rb
197
203
  - lib/smart_core/initializer/plugins/thy_types/thy_types/operation/validate.rb
198
204
  - lib/smart_core/initializer/settings.rb
205
+ - lib/smart_core/initializer/settings/auto_cast.rb
206
+ - lib/smart_core/initializer/settings/base.rb
199
207
  - lib/smart_core/initializer/settings/duplicator.rb
208
+ - lib/smart_core/initializer/settings/strict_options.rb
200
209
  - lib/smart_core/initializer/settings/type_system.rb
201
210
  - lib/smart_core/initializer/type_system.rb
202
211
  - lib/smart_core/initializer/type_system/interop.rb
@@ -230,14 +239,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
239
  requirements:
231
240
  - - ">="
232
241
  - !ruby/object:Gem::Version
233
- version: 2.4.10
242
+ version: '2.5'
234
243
  required_rubygems_version: !ruby/object:Gem::Requirement
235
244
  requirements:
236
245
  - - ">="
237
246
  - !ruby/object:Gem::Version
238
247
  version: '0'
239
248
  requirements: []
240
- rubygems_version: 3.2.3
249
+ rubygems_version: 3.2.32
241
250
  signing_key:
242
251
  specification_version: 4
243
252
  summary: Initializer DSL