dry-initializer 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +259 -242
  3. data/LICENSE +20 -0
  4. data/README.md +18 -78
  5. data/dry-initializer.gemspec +34 -19
  6. data/lib/dry/initializer/builders/attribute.rb +84 -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/errors.rb +22 -0
  26. data/lib/dry/initializer/mixin/local.rb +19 -13
  27. data/lib/dry/initializer/mixin/root.rb +12 -6
  28. data/lib/dry/initializer/mixin.rb +17 -12
  29. data/lib/dry/initializer/struct.rb +34 -30
  30. data/lib/dry/initializer/undefined.rb +7 -1
  31. data/lib/dry/initializer/version.rb +7 -0
  32. data/lib/dry/initializer.rb +3 -0
  33. data/lib/dry-initializer.rb +2 -0
  34. data/lib/tasks/benchmark.rake +2 -0
  35. data/lib/tasks/profile.rake +4 -0
  36. metadata +27 -106
  37. data/.codeclimate.yml +0 -23
  38. data/.gitignore +0 -10
  39. data/.rspec +0 -4
  40. data/.rubocop.yml +0 -51
  41. data/.travis.yml +0 -28
  42. data/Gemfile +0 -29
  43. data/Guardfile +0 -5
  44. data/LICENSE.txt +0 -21
  45. data/Rakefile +0 -8
  46. data/benchmarks/compare_several_defaults.rb +0 -82
  47. data/benchmarks/plain_options.rb +0 -63
  48. data/benchmarks/plain_params.rb +0 -84
  49. data/benchmarks/with_coercion.rb +0 -71
  50. data/benchmarks/with_defaults.rb +0 -66
  51. data/benchmarks/with_defaults_and_coercion.rb +0 -59
  52. data/spec/attributes_spec.rb +0 -38
  53. data/spec/coercion_of_nil_spec.rb +0 -25
  54. data/spec/custom_dispatchers_spec.rb +0 -35
  55. data/spec/custom_initializer_spec.rb +0 -30
  56. data/spec/default_values_spec.rb +0 -83
  57. data/spec/definition_spec.rb +0 -111
  58. data/spec/invalid_default_spec.rb +0 -13
  59. data/spec/list_type_spec.rb +0 -32
  60. data/spec/missed_default_spec.rb +0 -14
  61. data/spec/nested_type_spec.rb +0 -44
  62. data/spec/optional_spec.rb +0 -71
  63. data/spec/options_tolerance_spec.rb +0 -11
  64. data/spec/public_attributes_utility_spec.rb +0 -22
  65. data/spec/reader_spec.rb +0 -87
  66. data/spec/repetitive_definitions_spec.rb +0 -69
  67. data/spec/several_assignments_spec.rb +0 -41
  68. data/spec/spec_helper.rb +0 -22
  69. data/spec/subclassing_spec.rb +0 -49
  70. data/spec/type_argument_spec.rb +0 -35
  71. data/spec/type_constraint_spec.rb +0 -78
  72. 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: e17a987f9500b55fd7bf3c60caa5e8ce5c4c26cb78b94f339b62a63bdeb5a9e3
4
- data.tar.gz: 362138efc7974312bf747f060c7af4d4117e6b8c7648849998c1aefb39d14b1e
3
+ metadata.gz: 49644712268c1c8896eb7b9d067d5f3abf65789330d465f0acad780a4f50644e
4
+ data.tar.gz: 102ef164a75b9d4849400753a21046d5753217806de6c8963476ef8fafeb780d
5
5
  SHA512:
6
- metadata.gz: fc4416e43fce6418f4708f5d7fc6753096009e9f2087f334bc11a2edeb44b3f9099d6d53ad9969d7e38ffefa524031c0e95fd4c7cb277ff7fed1a9ff63ebad5b
7
- data.tar.gz: a2745ea32279c9e6bd9a964b0cef5e876bf3f02afd604b4193e6223d629fc1ca6ee8fd22cf1543d652b9ff5548b3bb9a7fc28c7a06f4eeb04cf233b4ccf451de
6
+ metadata.gz: '07780a5de808586056b92a3b9a2f1169f5fea4d7879abd1080fc27a7e6123b22d2a07878e9ca9203995c9f01c3e5a47b030b5dc7004d67a4a540413aabdb5890'
7
+ data.tar.gz: e352bf6de1a4aae2cf183be62ef4f64a4c70daf0f329122b0d6cd00a7e6081767aa745e938ae4464e52d322bfb08ce943a3312b4f92e02d87c1b968edf0498c4