dry-matcher 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/lib/dry/matcher.rb +9 -0
- data/lib/dry/matcher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c6e93957923cb479747c4263d9d1d9299e850b6806f0b94282605d0561b0082
|
4
|
+
data.tar.gz: eea1dc19881188316b2bf6080a241ba55aeba36294f3c98e6ae81140b9356f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21ddad90c151cc70f4df22378ee42fc6cecc9ffc117bb03282bdf83324f12aa376e65974e1d3f1d1f0a8bfdbadd3df943ed631707e099625123b01d1ceae6eba
|
7
|
+
data.tar.gz: 6826e3ff7d46f97328a5a5be8e019a9b90b5f09398f9fce8d82885b4474608078c2e7230da880ec9b7ab87ef0b348842755bf226af2e96afe91d9085e1a2eaea
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
# 0.8.1 / 2019-08-13
|
2
|
+
|
3
|
+
## Added
|
4
|
+
|
5
|
+
- `Dry::Matcher#for` is a shortcut for `Dry::Matcher.for(..., with: matcher)` (flash-gordon)
|
6
|
+
```ruby
|
7
|
+
require 'dry/matcher/result_matcher'
|
8
|
+
|
9
|
+
class CreateUser
|
10
|
+
include Dry::Matcher::ResultMatcher.for(:call)
|
11
|
+
|
12
|
+
def call(...)
|
13
|
+
# code returning an instance of Dry::Monads::Result
|
14
|
+
end
|
15
|
+
end
|
16
|
+
```
|
17
|
+
|
18
|
+
[Compare v0.8.0...v0.8.1](https://github.com/dry-rb/dry-matcher/compare/v0.8.0...v0.8.1)
|
19
|
+
|
1
20
|
# 0.8.0 / 2019-07-30
|
2
21
|
|
3
22
|
## Changed
|
data/lib/dry/matcher.rb
CHANGED
@@ -87,5 +87,14 @@ module Dry
|
|
87
87
|
def call(result, &block)
|
88
88
|
Evaluator.new(result, cases).call(&block)
|
89
89
|
end
|
90
|
+
|
91
|
+
# Shortcut for Dry::Matcher.for(..., with: matcher)
|
92
|
+
#
|
93
|
+
# @param [Array[Symbol]]
|
94
|
+
#
|
95
|
+
# @return [Module]
|
96
|
+
def for(*methods)
|
97
|
+
self.class.for(*methods, with: self)
|
98
|
+
end
|
90
99
|
end
|
91
100
|
end
|
data/lib/dry/matcher/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-matcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Riley
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-core
|