dry-initializer 3.0.2 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +260 -241
  3. data/LICENSE +1 -1
  4. data/README.md +18 -77
  5. data/dry-initializer.gemspec +34 -19
  6. data/lib/dry/initializer/builders/attribute.rb +78 -69
  7. data/lib/dry/initializer/builders/initializer.rb +56 -58
  8. data/lib/dry/initializer/builders/reader.rb +55 -47
  9. data/lib/dry/initializer/builders/signature.rb +29 -23
  10. data/lib/dry/initializer/builders.rb +9 -5
  11. data/lib/dry/initializer/config.rb +162 -158
  12. data/lib/dry/initializer/definition.rb +58 -54
  13. data/lib/dry/initializer/dispatchers/build_nested_type.rb +54 -40
  14. data/lib/dry/initializer/dispatchers/check_type.rb +45 -39
  15. data/lib/dry/initializer/dispatchers/prepare_default.rb +32 -25
  16. data/lib/dry/initializer/dispatchers/prepare_ivar.rb +13 -6
  17. data/lib/dry/initializer/dispatchers/prepare_optional.rb +14 -7
  18. data/lib/dry/initializer/dispatchers/prepare_reader.rb +29 -22
  19. data/lib/dry/initializer/dispatchers/prepare_source.rb +12 -5
  20. data/lib/dry/initializer/dispatchers/prepare_target.rb +44 -37
  21. data/lib/dry/initializer/dispatchers/unwrap_type.rb +21 -10
  22. data/lib/dry/initializer/dispatchers/wrap_type.rb +25 -17
  23. data/lib/dry/initializer/dispatchers.rb +48 -43
  24. data/lib/dry/initializer/dsl.rb +42 -34
  25. data/lib/dry/initializer/mixin/local.rb +19 -13
  26. data/lib/dry/initializer/mixin/root.rb +12 -7
  27. data/lib/dry/initializer/mixin.rb +17 -12
  28. data/lib/dry/initializer/struct.rb +34 -29
  29. data/lib/dry/initializer/undefined.rb +7 -1
  30. data/lib/dry/initializer/version.rb +7 -0
  31. data/lib/dry/initializer.rb +2 -0
  32. data/lib/dry-initializer.rb +2 -0
  33. data/lib/tasks/benchmark.rake +2 -0
  34. data/lib/tasks/profile.rake +4 -0
  35. metadata +25 -125
  36. data/.codeclimate.yml +0 -12
  37. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  38. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -34
  39. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  40. data/.github/workflows/custom_ci.yml +0 -74
  41. data/.github/workflows/docsite.yml +0 -34
  42. data/.github/workflows/sync_configs.yml +0 -34
  43. data/.gitignore +0 -12
  44. data/.rspec +0 -4
  45. data/.rubocop.yml +0 -89
  46. data/CODE_OF_CONDUCT.md +0 -13
  47. data/CONTRIBUTING.md +0 -29
  48. data/Gemfile +0 -38
  49. data/Guardfile +0 -5
  50. data/LICENSE.txt +0 -21
  51. data/Rakefile +0 -8
  52. data/benchmarks/compare_several_defaults.rb +0 -82
  53. data/benchmarks/plain_options.rb +0 -63
  54. data/benchmarks/plain_params.rb +0 -84
  55. data/benchmarks/with_coercion.rb +0 -71
  56. data/benchmarks/with_defaults.rb +0 -66
  57. data/benchmarks/with_defaults_and_coercion.rb +0 -59
  58. data/docsite/source/attributes.html.md +0 -106
  59. data/docsite/source/container-version.html.md +0 -39
  60. data/docsite/source/index.html.md +0 -43
  61. data/docsite/source/inheritance.html.md +0 -43
  62. data/docsite/source/optionals-and-defaults.html.md +0 -130
  63. data/docsite/source/options-tolerance.html.md +0 -27
  64. data/docsite/source/params-and-options.html.md +0 -74
  65. data/docsite/source/rails-support.html.md +0 -101
  66. data/docsite/source/readers.html.md +0 -43
  67. data/docsite/source/skip-undefined.html.md +0 -59
  68. data/docsite/source/type-constraints.html.md +0 -160
  69. data/spec/attributes_spec.rb +0 -38
  70. data/spec/coercion_of_nil_spec.rb +0 -25
  71. data/spec/custom_dispatchers_spec.rb +0 -35
  72. data/spec/custom_initializer_spec.rb +0 -30
  73. data/spec/default_values_spec.rb +0 -83
  74. data/spec/definition_spec.rb +0 -111
  75. data/spec/invalid_default_spec.rb +0 -13
  76. data/spec/list_type_spec.rb +0 -32
  77. data/spec/missed_default_spec.rb +0 -14
  78. data/spec/nested_type_spec.rb +0 -48
  79. data/spec/optional_spec.rb +0 -71
  80. data/spec/options_tolerance_spec.rb +0 -11
  81. data/spec/public_attributes_utility_spec.rb +0 -22
  82. data/spec/reader_spec.rb +0 -87
  83. data/spec/repetitive_definitions_spec.rb +0 -69
  84. data/spec/several_assignments_spec.rb +0 -41
  85. data/spec/spec_helper.rb +0 -29
  86. data/spec/subclassing_spec.rb +0 -49
  87. data/spec/type_argument_spec.rb +0 -35
  88. data/spec/type_constraint_spec.rb +0 -78
  89. data/spec/value_coercion_via_dry_types_spec.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5d079daa17830b65177c99533e1b7f280bb4aee14dbcba097ba8c40de273abd
4
- data.tar.gz: a59b00abe9c741b764152a6213ff40c29adbdf27094ecebbaaf766b2e056aa99
3
+ metadata.gz: 6f8c224268e3e35d66bade7dde3eaa5cf3423d931e0755930f5086c2151ccfc1
4
+ data.tar.gz: 07275ac52d641a42609e47472c47b2f2e643e97e41a338ca4365ee2074ef8356
5
5
  SHA512:
6
- metadata.gz: 4fee1158d5ddd7bfca050f61788ee7012bf0a0f424239095ea649c6dd34ba47b157627efe7261f9e5fdaef405654b589addd26990a912b72cd0f76e339003754
7
- data.tar.gz: 64a5e73606be0a238d0dba9173d32f90d8366d0aae64edf378dd851705a07d4ede0906ed241cc85ff9cb9b5c5f3fe9734bfb77d53fb6fc71bf29565b8607c388
6
+ metadata.gz: 7e1275ca3ad8bec808814d88c3217ba8dd81e70a1c6de0a089560737edc2531f9aa9180fef77be430501ede727e414b9addc0cf4fd1345705923a7d729a0c6cb
7
+ data.tar.gz: afb4438bb4a9e26ea815166764a12c34309c1bbe53322a948dae9851c983d74f6e5e0696715ab2a7108552e1e3436123c4bb652aad74ba1a441aba4728cd970f