dry-validation-matchers 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/CHANGELOG.md +4 -0
- data/dry-validation-matchers.gemspec +1 -1
- data/lib/dry/validation/matchers/validate_matcher.rb +2 -1
- data/lib/dry/validation/matchers/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c5fd64bd7d180697dc6d6618b349a71029ea939c52b446b4411c3b373cb7e43
|
4
|
+
data.tar.gz: f62e21ef82e36bf102092dff264be1931c664e048813c8784405436a4b6ceb11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c0144666861c44c01c0b9fab6e842f9be15a0eace36f8b5e300fb2b9272e49ea069c9a753018dad008a215891befc99e03c53f4ec66933ba90c98c588215d8b
|
7
|
+
data.tar.gz: 1bcf615053e306e858e7852486acb8ae53fe72120d802ea68cd689d24028727d0a1db8ae828dd8beb49b7908ea758e3c093b878b6cb3506670b37a25cc2f2413
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [1.1.1] - 2019-04-10
|
8
|
+
### Fixed
|
9
|
+
- when `min_size` is set to 1 (and 0 in tests)
|
10
|
+
|
7
11
|
## [1.1.0] - 2019-04-10
|
8
12
|
### Added
|
9
13
|
- `min_size` validation
|
@@ -32,6 +32,6 @@ Gem::Specification.new do |spec|
|
|
32
32
|
|
33
33
|
spec.add_runtime_dependency "dry-validation"
|
34
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
35
|
-
spec.add_development_dependency "bundler", "~>
|
35
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
36
36
|
spec.add_development_dependency "rake", "~> 10.0"
|
37
37
|
end
|
@@ -202,7 +202,8 @@ module Dry::Validation::Matchers
|
|
202
202
|
|
203
203
|
result = schema.(@attr => "a" * (min_size-1))
|
204
204
|
error_messages = result.errors[@attr]
|
205
|
-
error_when_below =
|
205
|
+
error_when_below = (min_size-1).zero? ||
|
206
|
+
!error_messages.nil? &&
|
206
207
|
error_messages.include?(expected_error_message)
|
207
208
|
|
208
209
|
no_error_when_over && no_error_when_exact && error_when_below
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-validation-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|