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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cceeb633b3e3e6136ff03e886149d54d55e483256cfa591a8b47f5cedf832fb
4
- data.tar.gz: 67afc05d71891776a2f0f2897cfddd45e1741cf837c46c5d1a2c26740f98851a
3
+ metadata.gz: 5c6e93957923cb479747c4263d9d1d9299e850b6806f0b94282605d0561b0082
4
+ data.tar.gz: eea1dc19881188316b2bf6080a241ba55aeba36294f3c98e6ae81140b9356f9d
5
5
  SHA512:
6
- metadata.gz: 5f22821845ef6e4e22d23328870a577c2fc0e8861627a7f2718378f7938e00aed9bc106e0917390556efeebd56584bccd933f41f09f4496a99ee7eb28012257a
7
- data.tar.gz: 184881702b0e743cf991cee0a3e0fef9870da4775fdcd705647c83dd9a12afd844eb481b8a5eca636ec9b205989a8433156916d2c9bd2462d363736d3d23316b
6
+ metadata.gz: 21ddad90c151cc70f4df22378ee42fc6cecc9ffc117bb03282bdf83324f12aa376e65974e1d3f1d1f0a8bfdbadd3df943ed631707e099625123b01d1ceae6eba
7
+ data.tar.gz: 6826e3ff7d46f97328a5a5be8e019a9b90b5f09398f9fce8d82885b4474608078c2e7230da880ec9b7ab87ef0b348842755bf226af2e96afe91d9085e1a2eaea
@@ -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
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  class Matcher
5
- VERSION = '0.8.0'
5
+ VERSION = '0.8.1'
6
6
  end
7
7
  end
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.0
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-07-30 00:00:00.000000000 Z
12
+ date: 2019-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-core