dry-logic 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/dry/logic/predicates.rb +1 -1
- data/lib/dry/logic/version.rb +1 -1
- data/spec/unit/predicates/format_spec.rb +10 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eaa5ac48636ac8735eb5acfd455b0a6cc23887730500a3738a0e6b79b105187
|
4
|
+
data.tar.gz: 98d6ba8d611d80f4a1eb0ef3aa52dfcf976ef46ceabe92040f9090caaa98a4cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9de80f29b7ee5b3d8303a6834a94f20442ac3c78d9c90b634c91a7d6d7e620a5c96eea6d7142fbe361561d5076261f8ec54d0cfd6ebbdd05926a4b59d77b1919
|
7
|
+
data.tar.gz: 56ed2dc66cd66fd80d7437c5f75adee53dcfbb8e721b1d83a87d1e6fca35fab3dd8bb04f7cdb00c35c64d70f8d0685bed2900b2835bc7f710cacda8e034aa0f0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# v1.0.5 2019-11-07
|
2
|
+
|
3
|
+
- Make `format?` tolerant to `nil` values. It already worked like that before, but starting Ruby 2.7 it would produce warnings. Now it won't. Don't rely on this behavior, it's only added to make tests pass in dry-schema. Use explicit type checks instead (@flash-gordon)
|
4
|
+
|
5
|
+
[Compare v1.0.4...v1.0.5](https://github.com/dry-rb/dry-logic/compare/v1.0.4...v1.0.5)
|
6
|
+
|
1
7
|
# v1.0.4 2019-11-06
|
2
8
|
|
3
9
|
- Fix keyword warnings (@flash-gordon)
|
data/lib/dry/logic/predicates.rb
CHANGED
data/lib/dry/logic/version.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe Dry::Logic::Predicates, '#format?' do
|
|
7
7
|
|
8
8
|
context 'when value matches provided regexp' do
|
9
9
|
let(:arguments_list) do
|
10
|
-
[['Foo'
|
10
|
+
[[/^F/, 'Foo']]
|
11
11
|
end
|
12
12
|
|
13
13
|
it_behaves_like 'a passing predicate'
|
@@ -15,7 +15,15 @@ RSpec.describe Dry::Logic::Predicates, '#format?' do
|
|
15
15
|
|
16
16
|
context 'when value does not match provided regexp' do
|
17
17
|
let(:arguments_list) do
|
18
|
-
[['Bar'
|
18
|
+
[[/^F/, 'Bar']]
|
19
|
+
end
|
20
|
+
|
21
|
+
it_behaves_like 'a failing predicate'
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'when input is nil' do
|
25
|
+
let(:arguments_list) do
|
26
|
+
[[/^F/, nil]]
|
19
27
|
end
|
20
28
|
|
21
29
|
it_behaves_like 'a failing predicate'
|