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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35a38376af841c7d015abcb6e090f75ba674dfbda295dc301711faffd972deb1
4
- data.tar.gz: 776bf667f8b1fa977983d1f772e872f1333f126f9212626302e473e5fd11c37c
3
+ metadata.gz: 7c5fd64bd7d180697dc6d6618b349a71029ea939c52b446b4411c3b373cb7e43
4
+ data.tar.gz: f62e21ef82e36bf102092dff264be1931c664e048813c8784405436a4b6ceb11
5
5
  SHA512:
6
- metadata.gz: 24fe6ecfae92c01c94fefa2d46fbaaad56d82208ecd77de4006e576ec3220e280a00263f5158a3c82ab682d319f1b3b89e33b574123ac9b26f769ba8fff24ad8
7
- data.tar.gz: f938e1ca0860d6b85675ccf3a25eceaa9d55081a6e1893de8b5f4b4688862d514c7511c9a0cbacc9f7bd31eae33ca5a044d33d11caaa0b453c5ff2096210d2ce
6
+ metadata.gz: 3c0144666861c44c01c0b9fab6e842f9be15a0eace36f8b5e300fb2b9272e49ea069c9a753018dad008a215891befc99e03c53f4ec66933ba90c98c588215d8b
7
+ data.tar.gz: 1bcf615053e306e858e7852486acb8ae53fe72120d802ea68cd689d24028727d0a1db8ae828dd8beb49b7908ea758e3c093b878b6cb3506670b37a25cc2f2413
@@ -2,4 +2,6 @@ sudo: false
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.6.2
5
- before_install: gem install bundler -v 1.16.2
5
+ before_install:
6
+ - gem update --system
7
+ - gem install bundler -v 2.0.1
@@ -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", "~> 1.13"
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 = !error_messages.nil? &&
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
@@ -1,7 +1,7 @@
1
1
  module Dry
2
2
  module Validation
3
3
  module Matchers
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
6
6
  end
7
7
  end
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.0
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: '1.13'
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: '1.13'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement