dry-types 1.2.2 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +405 -225
  3. data/LICENSE +1 -1
  4. data/README.md +14 -12
  5. data/dry-types.gemspec +26 -31
  6. data/lib/dry-types.rb +1 -1
  7. data/lib/dry/types.rb +55 -40
  8. data/lib/dry/types/any.rb +2 -2
  9. data/lib/dry/types/array.rb +2 -2
  10. data/lib/dry/types/array/constructor.rb +1 -1
  11. data/lib/dry/types/array/member.rb +1 -1
  12. data/lib/dry/types/builder.rb +70 -18
  13. data/lib/dry/types/builder_methods.rb +1 -2
  14. data/lib/dry/types/coercions.rb +0 -17
  15. data/lib/dry/types/coercions/json.rb +22 -5
  16. data/lib/dry/types/coercions/params.rb +20 -3
  17. data/lib/dry/types/compiler.rb +10 -10
  18. data/lib/dry/types/constrained.rb +6 -9
  19. data/lib/dry/types/constraints.rb +3 -3
  20. data/lib/dry/types/constructor.rb +40 -6
  21. data/lib/dry/types/constructor/function.rb +48 -32
  22. data/lib/dry/types/constructor/wrapper.rb +94 -0
  23. data/lib/dry/types/container.rb +1 -1
  24. data/lib/dry/types/core.rb +15 -13
  25. data/lib/dry/types/decorator.rb +2 -9
  26. data/lib/dry/types/default.rb +14 -1
  27. data/lib/dry/types/enum.rb +4 -3
  28. data/lib/dry/types/errors.rb +1 -1
  29. data/lib/dry/types/extensions.rb +2 -2
  30. data/lib/dry/types/extensions/maybe.rb +18 -17
  31. data/lib/dry/types/extensions/monads.rb +1 -1
  32. data/lib/dry/types/fn_container.rb +1 -1
  33. data/lib/dry/types/hash.rb +9 -15
  34. data/lib/dry/types/hash/constructor.rb +1 -1
  35. data/lib/dry/types/inflector.rb +1 -1
  36. data/lib/dry/types/json.rb +15 -15
  37. data/lib/dry/types/lax.rb +3 -6
  38. data/lib/dry/types/map.rb +2 -2
  39. data/lib/dry/types/meta.rb +3 -3
  40. data/lib/dry/types/module.rb +6 -6
  41. data/lib/dry/types/nominal.rb +11 -11
  42. data/lib/dry/types/params.rb +31 -28
  43. data/lib/dry/types/predicate_inferrer.rb +52 -11
  44. data/lib/dry/types/predicate_registry.rb +1 -1
  45. data/lib/dry/types/primitive_inferrer.rb +1 -1
  46. data/lib/dry/types/printer.rb +25 -25
  47. data/lib/dry/types/result.rb +3 -3
  48. data/lib/dry/types/schema.rb +26 -13
  49. data/lib/dry/types/schema/key.rb +15 -6
  50. data/lib/dry/types/spec/types.rb +65 -42
  51. data/lib/dry/types/sum.rb +6 -5
  52. data/lib/dry/types/type.rb +1 -1
  53. data/lib/dry/types/version.rb +1 -1
  54. metadata +27 -78
  55. data/.codeclimate.yml +0 -12
  56. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  57. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
  58. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  59. data/.github/workflows/custom_ci.yml +0 -76
  60. data/.github/workflows/docsite.yml +0 -34
  61. data/.github/workflows/sync_configs.yml +0 -34
  62. data/.gitignore +0 -11
  63. data/.rspec +0 -4
  64. data/.rubocop.yml +0 -92
  65. data/.yardopts +0 -9
  66. data/CODE_OF_CONDUCT.md +0 -13
  67. data/CONTRIBUTING.md +0 -29
  68. data/Gemfile +0 -34
  69. data/Rakefile +0 -22
  70. data/benchmarks/hash_schemas.rb +0 -55
  71. data/benchmarks/lax_schema.rb +0 -15
  72. data/benchmarks/profile_invalid_input.rb +0 -15
  73. data/benchmarks/profile_lax_schema_valid.rb +0 -16
  74. data/benchmarks/profile_valid_input.rb +0 -15
  75. data/benchmarks/schema_valid_vs_invalid.rb +0 -21
  76. data/benchmarks/setup.rb +0 -17
  77. data/docsite/source/array-with-member.html.md +0 -13
  78. data/docsite/source/built-in-types.html.md +0 -116
  79. data/docsite/source/constraints.html.md +0 -31
  80. data/docsite/source/custom-types.html.md +0 -93
  81. data/docsite/source/default-values.html.md +0 -91
  82. data/docsite/source/enum.html.md +0 -69
  83. data/docsite/source/extensions.html.md +0 -15
  84. data/docsite/source/extensions/maybe.html.md +0 -57
  85. data/docsite/source/extensions/monads.html.md +0 -61
  86. data/docsite/source/getting-started.html.md +0 -57
  87. data/docsite/source/hash-schemas.html.md +0 -169
  88. data/docsite/source/index.html.md +0 -156
  89. data/docsite/source/map.html.md +0 -17
  90. data/docsite/source/optional-values.html.md +0 -35
  91. data/docsite/source/sum.html.md +0 -21
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/equalizer'
3
+ require "dry/core/equalizer"
4
4
 
5
5
  module Dry
6
6
  module Types
@@ -8,7 +8,7 @@ module Dry
8
8
  #
9
9
  # @api public
10
10
  class Result
11
- include Dry::Equalizer(:input, inspect: false, immutable: true)
11
+ include ::Dry::Equalizer(:input, immutable: true)
12
12
 
13
13
  # @return [Object]
14
14
  attr_reader :input
@@ -43,7 +43,7 @@ module Dry
43
43
  #
44
44
  # @api public
45
45
  class Failure < Result
46
- include Dry::Equalizer(:input, :error, inspect: false, immutable: true)
46
+ include ::Dry::Equalizer(:input, :error, immutable: true)
47
47
 
48
48
  # @return [#to_s]
49
49
  attr_reader :error
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/types/fn_container'
3
+ require "dry/types/fn_container"
4
4
 
5
5
  module Dry
6
6
  module Types
@@ -83,7 +83,7 @@ module Dry
83
83
  call_unsafe(hash, options)
84
84
  end
85
85
 
86
- # @param [Hash] hash
86
+ # @param input [Hash] hash
87
87
  #
88
88
  # @yieldparam [Failure] failure
89
89
  # @yieldreturn [Result]
@@ -145,18 +145,10 @@ module Dry
145
145
  #
146
146
  # @api public
147
147
  def to_ast(meta: true)
148
- if RUBY_VERSION >= "2.5"
149
- opts = options.slice(:key_transform_fn, :type_transform_fn, :strict)
150
- else
151
- opts = options.select { |k, _|
152
- k == :key_transform_fn || k == :type_transform_fn || k == :strict
153
- }
154
- end
155
-
156
148
  [
157
149
  :schema,
158
150
  [keys.map { |key| key.to_ast(meta: meta) },
159
- opts,
151
+ options.slice(:key_transform_fn, :type_transform_fn, :strict),
160
152
  meta ? self.meta : EMPTY_HASH]
161
153
  ]
162
154
  end
@@ -179,7 +171,7 @@ module Dry
179
171
  with(strict: strict)
180
172
  end
181
173
 
182
- # Injects a key transformation function
174
+ # Inject a key transformation function
183
175
  #
184
176
  # @param [#call,nil] proc
185
177
  # @param [#call,nil] block
@@ -190,7 +182,7 @@ module Dry
190
182
  def with_key_transform(proc = nil, &block)
191
183
  fn = proc || block
192
184
 
193
- raise ArgumentError, 'a block or callable argument is required' if fn.nil?
185
+ raise ArgumentError, "a block or callable argument is required" if fn.nil?
194
186
 
195
187
  handle = Dry::Types::FnContainer.register(fn)
196
188
  with(key_transform_fn: handle)
@@ -284,6 +276,27 @@ module Dry
284
276
  Lax.new(schema(keys.map(&:lax)))
285
277
  end
286
278
 
279
+ # Merge given schema keys into current schema
280
+ #
281
+ # A new instance is returned.
282
+ #
283
+ # @param other [Schema] schema
284
+ # @return [Schema]
285
+ #
286
+ # @api public
287
+ def merge(other)
288
+ schema(other.keys)
289
+ end
290
+
291
+ # Empty schema with the same options
292
+ #
293
+ # @return [Schema]
294
+ #
295
+ # @api public
296
+ def clear
297
+ with(keys: EMPTY_ARRAY)
298
+ end
299
+
287
300
  private
288
301
 
289
302
  # @param [Array<Dry::Types::Schema::Keys>] keys
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/equalizer'
4
- require 'dry/core/deprecations'
3
+ require "dry/core/equalizer"
4
+ require "dry/core/deprecations"
5
5
 
6
6
  module Dry
7
7
  module Types
@@ -103,6 +103,15 @@ module Dry
103
103
  __new__(type.lax).required(false)
104
104
  end
105
105
 
106
+ # Make wrapped type optional
107
+ #
108
+ # @return [Key]
109
+ #
110
+ # @api public
111
+ def optional
112
+ __new__(type.optional)
113
+ end
114
+
106
115
  # Dump to internal AST representation
107
116
  #
108
117
  # @return [Array]
@@ -122,13 +131,13 @@ module Dry
122
131
  # @see Dry::Types::Meta#meta
123
132
  #
124
133
  # @api public
125
- def meta(data = nil)
126
- if data.nil? || !data.key?(:omittable)
134
+ def meta(data = Undefined)
135
+ if Undefined.equal?(data) || !data.key?(:omittable)
127
136
  super
128
137
  else
129
138
  self.class.warn(
130
- 'Using meta for making schema keys is deprecated, ' \
131
- 'please use .omittable or .required(false) instead' \
139
+ "Using meta for making schema keys is deprecated, " \
140
+ "please use .omittable or .required(false) instead" \
132
141
  "\n" + Core::Deprecations::STACK.()
133
142
  )
134
143
  super.required(!data[:omittable])
@@ -1,79 +1,79 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.shared_examples_for 'Dry::Types::Nominal without primitive' do
3
+ RSpec.shared_examples_for "Dry::Types::Nominal without primitive" do
4
4
  def be_boolean
5
5
  satisfy { |x| x == true || x == false }
6
6
  end
7
7
 
8
- describe '#constrained?' do
9
- it 'returns a boolean value' do
8
+ describe "#constrained?" do
9
+ it "returns a boolean value" do
10
10
  expect(type.constrained?).to be_boolean
11
11
  end
12
12
  end
13
13
 
14
- describe '#default?' do
15
- it 'returns a boolean value' do
14
+ describe "#default?" do
15
+ it "returns a boolean value" do
16
16
  expect(type.default?).to be_boolean
17
17
  end
18
18
  end
19
19
 
20
- describe '#valid?' do
21
- it 'returns a boolean value' do
20
+ describe "#valid?" do
21
+ it "returns a boolean value" do
22
22
  expect(type.valid?(1)).to be_boolean
23
23
  end
24
24
  end
25
25
 
26
- describe '#eql?' do
27
- it 'has #eql? defined' do
26
+ describe "#eql?" do
27
+ it "has #eql? defined" do
28
28
  expect(type).to eql(type)
29
29
  end
30
30
  end
31
31
 
32
- describe '#==' do
33
- it 'has #== defined' do
32
+ describe "#==" do
33
+ it "has #== defined" do
34
34
  expect(type).to eq(type)
35
35
  end
36
36
  end
37
37
 
38
- describe '#optional?' do
39
- it 'returns a boolean value' do
38
+ describe "#optional?" do
39
+ it "returns a boolean value" do
40
40
  expect(type.optional?).to be_boolean
41
41
  end
42
42
  end
43
43
 
44
- describe '#to_s' do
45
- it 'returns a custom string representation' do
46
- expect(type.to_s).to start_with('#<Dry::Types') if type.class.name.start_with?('Dry::Types')
44
+ describe "#to_s" do
45
+ it "returns a custom string representation" do
46
+ expect(type.to_s).to start_with("#<Dry::Types") if type.class.name.start_with?("Dry::Types")
47
47
  end
48
48
  end
49
49
 
50
- describe '#to_proc' do
50
+ describe "#to_proc" do
51
51
  subject(:callable) { type.to_proc }
52
52
 
53
- it 'converts a type to a proc' do
53
+ it "converts a type to a proc" do
54
54
  expect(callable).to be_a(Proc)
55
55
  end
56
56
  end
57
57
  end
58
58
 
59
- RSpec.shared_examples_for 'Dry::Types::Nominal#meta' do
60
- describe '#meta' do
61
- it 'allows setting meta information' do
62
- with_meta = type.meta(foo: :bar).meta(baz: '1')
59
+ RSpec.shared_examples_for "Dry::Types::Nominal#meta" do
60
+ describe "#meta" do
61
+ it "allows setting meta information" do
62
+ with_meta = type.meta(foo: :bar).meta(baz: "1")
63
63
 
64
64
  expect(with_meta).to be_instance_of(type.class)
65
- expect(with_meta.meta).to eql(foo: :bar, baz: '1')
65
+ expect(with_meta.meta).to eql(foo: :bar, baz: "1")
66
66
  end
67
67
 
68
- it 'equalizes on empty meta' do
68
+ it "equalizes on empty meta" do
69
69
  expect(type).to eql(type.meta({}))
70
70
  end
71
71
 
72
- it 'equalizes on filled meta' do
73
- expect(type).to_not eql(type.meta(i_am: 'different'))
72
+ it "equalizes on filled meta" do
73
+ expect(type).to_not eql(type.meta(i_am: "different"))
74
74
  end
75
75
 
76
- it 'is locally immutable' do
76
+ it "is locally immutable" do
77
77
  expect(type.meta).to be_a ::Hash
78
78
  expect(type.meta).to be_frozen
79
79
  expect(type.meta).not_to have_key :immutable_test
@@ -84,24 +84,24 @@ RSpec.shared_examples_for 'Dry::Types::Nominal#meta' do
84
84
  end
85
85
  end
86
86
 
87
- describe '#pristine' do
88
- it 'erases meta' do
87
+ describe "#pristine" do
88
+ it "erases meta" do
89
89
  expect(type.meta(foo: :bar).pristine).to eql(type)
90
90
  end
91
91
  end
92
92
  end
93
93
 
94
94
  RSpec.shared_examples_for Dry::Types::Nominal do
95
- it_behaves_like 'Dry::Types::Nominal without primitive'
95
+ it_behaves_like "Dry::Types::Nominal without primitive"
96
96
 
97
- describe '#primitive' do
98
- it 'returns a class' do
97
+ describe "#primitive" do
98
+ it "returns a class" do
99
99
  expect(type.primitive).to be_instance_of(Class)
100
100
  end
101
101
  end
102
102
 
103
- describe '#constructor' do
104
- it 'returns a constructor' do
103
+ describe "#constructor" do
104
+ it "returns a constructor" do
105
105
  constructor = type.constructor(&:to_s)
106
106
 
107
107
  expect(constructor).to be_a(Dry::Types::Type)
@@ -109,33 +109,56 @@ RSpec.shared_examples_for Dry::Types::Nominal do
109
109
  end
110
110
  end
111
111
 
112
- RSpec.shared_examples_for 'a constrained type' do |options = { inputs: Object.new }|
112
+ RSpec.shared_examples_for "a constrained type" do |options = {inputs: Object.new}|
113
113
  inputs = options[:inputs]
114
114
 
115
115
  let(:fallback) { Object.new }
116
116
 
117
- describe '#call' do
118
- it 'yields a block on failure' do
117
+ describe "#call" do
118
+ it "yields a block on failure" do
119
119
  Array(inputs).each do |input|
120
120
  expect(type.(input) { fallback }).to be(fallback)
121
121
  end
122
122
  end
123
123
 
124
- it 'throws an error on invalid input' do
124
+ it "throws an error on invalid input" do
125
125
  Array(inputs).each do |input|
126
126
  expect { type.(input) }.to raise_error(Dry::Types::CoercionError)
127
127
  end
128
128
  end
129
129
  end
130
+
131
+ describe "#constructor" do
132
+ let(:wrapping_constructor) do
133
+ type.constructor { |input, type| type.(input) { fallback } }
134
+ end
135
+
136
+ it "can be wrapped" do
137
+ Array(inputs).each do |input|
138
+ expect(wrapping_constructor.(input)).to be(fallback)
139
+ end
140
+ end
141
+ end
130
142
  end
131
143
 
132
- RSpec.shared_examples_for 'a nominal type' do |inputs: Object.new|
133
- describe '#call' do
134
- it 'always returns the input back' do
144
+ RSpec.shared_examples_for "a nominal type" do |inputs: Object.new|
145
+ describe "#call" do
146
+ it "always returns the input back" do
135
147
  Array(inputs).each do |input|
136
- expect(type.(input) { fail }).to be(input)
148
+ expect(type.(input) { raise }).to be(input)
137
149
  expect(type.(input)).to be(input)
138
150
  end
139
151
  end
140
152
  end
141
153
  end
154
+
155
+ RSpec.shared_examples_for "a composable constructor" do
156
+ describe "#constructor" do
157
+ it "has aliases for composition" do
158
+ expect(type.method(:append)).to eql(type.method(:constructor))
159
+ expect(type.method(:prepend)).to eql(type.method(:constructor))
160
+ expect(type.method(:<<)).to eql(type.method(:constructor))
161
+ expect(type.method(:>>)).to eql(type.method(:constructor))
162
+ end
163
+ end
164
+ end
data/lib/dry/types/sum.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/types/options'
4
- require 'dry/types/meta'
3
+ require "dry/core/equalizer"
4
+ require "dry/types/options"
5
+ require "dry/types/meta"
5
6
 
6
7
  module Dry
7
8
  module Types
@@ -50,7 +51,7 @@ module Dry
50
51
  #
51
52
  # @api public
52
53
  def name
53
- [left, right].map(&:name).join(' | ')
54
+ [left, right].map(&:name).join(" | ")
54
55
  end
55
56
 
56
57
  # @return [false]
@@ -142,8 +143,8 @@ module Dry
142
143
  # @see [Meta#meta]
143
144
  #
144
145
  # @api public
145
- def meta(data = nil)
146
- if data.nil?
146
+ def meta(data = Undefined)
147
+ if Undefined.equal?(data)
147
148
  optional? ? right.meta : super
148
149
  elsif optional?
149
150
  self.class.new(left, right.meta(data), **options)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/core/deprecations'
3
+ require "dry/core/deprecations"
4
4
 
5
5
  module Dry
6
6
  module Types
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Types
5
- VERSION = '1.2.2'
5
+ VERSION = "1.5.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-types
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-14 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -44,34 +44,20 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.4'
47
+ version: '0.5'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 0.4.4
50
+ version: '0.5'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: '0.4'
57
+ version: '0.5'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 0.4.4
61
- - !ruby/object:Gem::Dependency
62
- name: dry-equalizer
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '0.3'
68
- type: :runtime
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '0.3'
60
+ version: '0.5'
75
61
  - !ruby/object:Gem::Dependency
76
62
  name: dry-inflector
77
63
  requirement: !ruby/object:Gem::Requirement
@@ -132,104 +118,67 @@ dependencies:
132
118
  requirements:
133
119
  - - "~>"
134
120
  - !ruby/object:Gem::Version
135
- version: '0.2'
121
+ version: '1.0'
136
122
  type: :development
137
123
  prerelease: false
138
124
  version_requirements: !ruby/object:Gem::Requirement
139
125
  requirements:
140
126
  - - "~>"
141
127
  - !ruby/object:Gem::Version
142
- version: '0.2'
128
+ version: '1.0'
143
129
  - !ruby/object:Gem::Dependency
144
130
  name: rake
145
131
  requirement: !ruby/object:Gem::Requirement
146
132
  requirements:
147
- - - "~>"
133
+ - - ">="
148
134
  - !ruby/object:Gem::Version
149
- version: '11.0'
135
+ version: '0'
150
136
  type: :development
151
137
  prerelease: false
152
138
  version_requirements: !ruby/object:Gem::Requirement
153
139
  requirements:
154
- - - "~>"
140
+ - - ">="
155
141
  - !ruby/object:Gem::Version
156
- version: '11.0'
142
+ version: '0'
157
143
  - !ruby/object:Gem::Dependency
158
144
  name: rspec
159
145
  requirement: !ruby/object:Gem::Requirement
160
146
  requirements:
161
- - - "~>"
147
+ - - ">="
162
148
  - !ruby/object:Gem::Version
163
- version: '3.3'
149
+ version: '0'
164
150
  type: :development
165
151
  prerelease: false
166
152
  version_requirements: !ruby/object:Gem::Requirement
167
153
  requirements:
168
- - - "~>"
154
+ - - ">="
169
155
  - !ruby/object:Gem::Version
170
- version: '3.3'
156
+ version: '0'
171
157
  - !ruby/object:Gem::Dependency
172
158
  name: yard
173
159
  requirement: !ruby/object:Gem::Requirement
174
160
  requirements:
175
- - - "~>"
161
+ - - ">="
176
162
  - !ruby/object:Gem::Version
177
- version: 0.9.5
163
+ version: '0'
178
164
  type: :development
179
165
  prerelease: false
180
166
  version_requirements: !ruby/object:Gem::Requirement
181
167
  requirements:
182
- - - "~>"
168
+ - - ">="
183
169
  - !ruby/object:Gem::Version
184
- version: 0.9.5
170
+ version: '0'
185
171
  description: Type system for Ruby supporting coercions, constraints and complex types
186
- like structs, value objects, enums etc.
172
+ like structs, value objects, enums etc
187
173
  email:
188
174
  - piotr.solnica@gmail.com
189
175
  executables: []
190
176
  extensions: []
191
177
  extra_rdoc_files: []
192
178
  files:
193
- - ".codeclimate.yml"
194
- - ".github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md"
195
- - ".github/ISSUE_TEMPLATE/---bug-report.md"
196
- - ".github/ISSUE_TEMPLATE/---feature-request.md"
197
- - ".github/workflows/custom_ci.yml"
198
- - ".github/workflows/docsite.yml"
199
- - ".github/workflows/sync_configs.yml"
200
- - ".gitignore"
201
- - ".rspec"
202
- - ".rubocop.yml"
203
- - ".yardopts"
204
179
  - CHANGELOG.md
205
- - CODE_OF_CONDUCT.md
206
- - CONTRIBUTING.md
207
- - Gemfile
208
180
  - LICENSE
209
181
  - README.md
210
- - Rakefile
211
- - benchmarks/hash_schemas.rb
212
- - benchmarks/lax_schema.rb
213
- - benchmarks/profile_invalid_input.rb
214
- - benchmarks/profile_lax_schema_valid.rb
215
- - benchmarks/profile_valid_input.rb
216
- - benchmarks/schema_valid_vs_invalid.rb
217
- - benchmarks/setup.rb
218
- - docsite/source/array-with-member.html.md
219
- - docsite/source/built-in-types.html.md
220
- - docsite/source/constraints.html.md
221
- - docsite/source/custom-types.html.md
222
- - docsite/source/default-values.html.md
223
- - docsite/source/enum.html.md
224
- - docsite/source/extensions.html.md
225
- - docsite/source/extensions/maybe.html.md
226
- - docsite/source/extensions/monads.html.md
227
- - docsite/source/getting-started.html.md
228
- - docsite/source/hash-schemas.html.md
229
- - docsite/source/index.html.md
230
- - docsite/source/map.html.md
231
- - docsite/source/optional-values.html.md
232
- - docsite/source/sum.html.md
233
182
  - dry-types.gemspec
234
183
  - lib/dry-types.rb
235
184
  - lib/dry/types.rb
@@ -249,6 +198,7 @@ files:
249
198
  - lib/dry/types/constraints.rb
250
199
  - lib/dry/types/constructor.rb
251
200
  - lib/dry/types/constructor/function.rb
201
+ - lib/dry/types/constructor/wrapper.rb
252
202
  - lib/dry/types/container.rb
253
203
  - lib/dry/types/core.rb
254
204
  - lib/dry/types/decorator.rb
@@ -282,8 +232,7 @@ files:
282
232
  - lib/dry/types/sum.rb
283
233
  - lib/dry/types/type.rb
284
234
  - lib/dry/types/version.rb
285
- - log/.gitkeep
286
- homepage: https://github.com/dry-rb/dry-types
235
+ homepage: https://dry-rb.org/gems/dry-types
287
236
  licenses:
288
237
  - MIT
289
238
  metadata:
@@ -299,16 +248,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
248
  requirements:
300
249
  - - ">="
301
250
  - !ruby/object:Gem::Version
302
- version: 2.4.0
251
+ version: 2.5.0
303
252
  required_rubygems_version: !ruby/object:Gem::Requirement
304
253
  requirements:
305
254
  - - ">="
306
255
  - !ruby/object:Gem::Version
307
256
  version: '0'
308
257
  requirements: []
309
- rubygems_version: 3.0.6
258
+ rubygems_version: 3.1.4
310
259
  signing_key:
311
260
  specification_version: 4
312
261
  summary: Type system for Ruby supporting coercions, constraints and complex types
313
- like structs, value objects, enums etc.
262
+ like structs, value objects, enums etc
314
263
  test_files: []