dry-initializer 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +234 -242
  3. data/dry-initializer.gemspec +28 -15
  4. data/lib/dry/initializer/builders/attribute.rb +1 -1
  5. data/lib/dry/initializer/version.rb +1 -1
  6. metadata +24 -104
  7. data/.codeclimate.yml +0 -12
  8. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  9. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
  10. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  11. data/.github/workflows/custom_ci.yml +0 -58
  12. data/.github/workflows/docsite.yml +0 -34
  13. data/.github/workflows/sync_configs.yml +0 -56
  14. data/.gitignore +0 -12
  15. data/.rspec +0 -4
  16. data/.rubocop.yml +0 -102
  17. data/CODE_OF_CONDUCT.md +0 -13
  18. data/CONTRIBUTING.md +0 -29
  19. data/Gemfile +0 -36
  20. data/Gemfile.devtools +0 -16
  21. data/Guardfile +0 -5
  22. data/LICENSE.txt +0 -21
  23. data/Rakefile +0 -8
  24. data/benchmarks/compare_several_defaults.rb +0 -82
  25. data/benchmarks/plain_options.rb +0 -63
  26. data/benchmarks/plain_params.rb +0 -84
  27. data/benchmarks/with_coercion.rb +0 -71
  28. data/benchmarks/with_defaults.rb +0 -66
  29. data/benchmarks/with_defaults_and_coercion.rb +0 -59
  30. data/bin/.gitkeep +0 -0
  31. data/docsite/source/attributes.html.md +0 -106
  32. data/docsite/source/container-version.html.md +0 -39
  33. data/docsite/source/index.html.md +0 -43
  34. data/docsite/source/inheritance.html.md +0 -43
  35. data/docsite/source/optionals-and-defaults.html.md +0 -130
  36. data/docsite/source/options-tolerance.html.md +0 -27
  37. data/docsite/source/params-and-options.html.md +0 -74
  38. data/docsite/source/rails-support.html.md +0 -101
  39. data/docsite/source/readers.html.md +0 -43
  40. data/docsite/source/skip-undefined.html.md +0 -59
  41. data/docsite/source/type-constraints.html.md +0 -160
  42. data/project.yml +0 -2
  43. data/spec/attributes_spec.rb +0 -38
  44. data/spec/coercion_of_nil_spec.rb +0 -25
  45. data/spec/custom_dispatchers_spec.rb +0 -35
  46. data/spec/custom_initializer_spec.rb +0 -30
  47. data/spec/default_values_spec.rb +0 -83
  48. data/spec/definition_spec.rb +0 -111
  49. data/spec/invalid_default_spec.rb +0 -13
  50. data/spec/list_type_spec.rb +0 -32
  51. data/spec/missed_default_spec.rb +0 -14
  52. data/spec/nested_type_spec.rb +0 -48
  53. data/spec/optional_spec.rb +0 -71
  54. data/spec/options_tolerance_spec.rb +0 -11
  55. data/spec/public_attributes_utility_spec.rb +0 -22
  56. data/spec/reader_spec.rb +0 -87
  57. data/spec/repetitive_definitions_spec.rb +0 -69
  58. data/spec/several_assignments_spec.rb +0 -41
  59. data/spec/spec_helper.rb +0 -24
  60. data/spec/subclassing_spec.rb +0 -49
  61. data/spec/support/coverage.rb +0 -7
  62. data/spec/support/warnings.rb +0 -7
  63. data/spec/type_argument_spec.rb +0 -35
  64. data/spec/type_constraint_spec.rb +0 -96
  65. data/spec/value_coercion_via_dry_types_spec.rb +0 -29
@@ -1,29 +0,0 @@
1
- require 'dry-types'
2
-
3
- describe 'value coercion via dry-types' do
4
- before do
5
- module Test::Types
6
- include Dry.Types
7
- end
8
-
9
- class Test::Foo
10
- extend Dry::Initializer
11
-
12
- param :foo, type: Test::Types::Coercible::String
13
- option :bar, proc(&:to_i), default: proc { '16' }
14
- end
15
- end
16
-
17
- it 'coerces assigned values' do
18
- subject = Test::Foo.new :foo, bar: '13'
19
-
20
- expect(subject.foo).to eql 'foo'
21
- expect(subject.bar).to eql 13
22
- end
23
-
24
- it 'coerces defaults as well' do
25
- subject = Test::Foo.new :foo
26
-
27
- expect(subject.bar).to eql 16
28
- end
29
- end