dry-schema 1.5.5 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 442f6c2c04925f14ec6f0230394ad8e009518e9a2d7c1db22ddf68416324d530
4
- data.tar.gz: 8f210323df91ba5ebf8a947b5888907b6f6f7cac504f93fbec80af8678dbdeb1
3
+ metadata.gz: 26cb433ca43bd564e72496a3662035e91cec686962c2c5a3ba9bad0a0c8da5a0
4
+ data.tar.gz: 8a2decf348bf29e1e2c38e27a0237a872ea78db8b19af32ccdb11adc4928c7dd
5
5
  SHA512:
6
- metadata.gz: 87c2dcc7e169f2ff4c474038a0821a77e9f71420d40d2a4fe59f1d0ab722bcbbc3b9a60dcb33107d34d77cd303a82c33ebb3d084c350a49fc13e7b4cd73666f8
7
- data.tar.gz: 59442e66361d9a1daf9de31480681bf0414875f22b9cdd440224db7b1a5fde818bdc479e2296cea558b00e9b698df56645aa65a55da59bb2bde2d67b4b979120
6
+ metadata.gz: 5d6b9d1a6cb3033aadfead9b2dac136cab561c2c0fd2cd97fbd58087168b42ee1cb9e5be34e745c9292d094c6ca2a621aa412b8126b7610d324fdd60f364a373
7
+ data.tar.gz: 97dc3d3283afbc0c996da01cc2ff566f409dce596a43b5f8158e9f44529e6a0f3427406c9b919bbfb4f9b2884ddb2567dbdb5379e8eb9d4fc49addccee41885c
@@ -1,3 +1,13 @@
1
+ ## 1.5.6 2020-10-21
2
+
3
+
4
+ ### Fixed
5
+
6
+ - Fixed stack error which was a regression introduced in 1.5.5 (issue #322 fixed via #323) (@flash-gordon)
7
+
8
+
9
+ [Compare v1.5.5...v1.5.6](https://github.com/dry-rb/dry-schema/compare/v1.5.5...v1.5.6)
10
+
1
11
  ## 1.5.5 2020-10-08
2
12
 
3
13
 
data/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
 
22
22
  This library officially supports the following Ruby versions:
23
23
 
24
- * MRI >= `2.4`
24
+ * MRI >= `2.5
25
25
  * jruby >= `9.2`
26
26
 
27
27
  ## License
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.metadata['source_code_uri'] = 'https://github.com/dry-rb/dry-schema'
30
30
  spec.metadata['bug_tracker_uri'] = 'https://github.com/dry-rb/dry-schema/issues'
31
31
 
32
- spec.required_ruby_version = ">= 2.4.0"
32
+ spec.required_ruby_version = ">= 2.5.0"
33
33
 
34
34
  # to update dependencies edit project.yml
35
35
  spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
@@ -91,28 +91,25 @@ module Dry
91
91
  end
92
92
 
93
93
  def without_index
94
- self.class.new([*to_a[0..-2]])
94
+ self.class.new(to_a[0..-2])
95
95
  end
96
96
 
97
97
  # @api private
98
- #
99
- # rubocop:disable Metrics/PerceivedComplexity
100
98
  def include?(other)
101
- return false unless same_root?(other)
102
- return last.equal?(other.last) if index? && other.index?
103
- return without_index.include?(other) if index?
104
-
105
- if !index? && other.index?
106
- path = key_matches(other, :select)
107
-
108
- return false unless path.size > 1
109
-
110
- self.class.new(path).include?(other)
99
+ if !same_root?(other)
100
+ false
101
+ elsif index?
102
+ if other.index?
103
+ last.equal?(other.last)
104
+ else
105
+ without_index.include?(other)
106
+ end
107
+ elsif other.index? && key_matches(other, :select).size < 2
108
+ false
109
+ else
110
+ self >= other && !other.key_matches(self).include?(nil)
111
111
  end
112
-
113
- self >= other && !other.key_matches(self).include?(nil)
114
112
  end
115
- # rubocop:enable Metrics/PerceivedComplexity
116
113
 
117
114
  # @api private
118
115
  def <=>(other)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Schema
5
- VERSION = "1.5.5"
5
+ VERSION = "1.5.6"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-08 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -253,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
253
  requirements:
254
254
  - - ">="
255
255
  - !ruby/object:Gem::Version
256
- version: 2.4.0
256
+ version: 2.5.0
257
257
  required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  requirements:
259
259
  - - ">="