kind 5.4.0 → 5.4.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: e9a47a1176ad4b10eaad08e63af26b3067fd6d058c16e592b34f01c0f540bcbb
4
- data.tar.gz: ef1859a67157e0e515213cf2e544d959df292eba3bb7371595de4df76d035379
3
+ metadata.gz: 4b29ece70180bb5064e2d1c598ce81d09dabfe11492a14e4f97efe4f47154565
4
+ data.tar.gz: 927a414846defd4e53430fbb6d5a36b26dbc51b1de6bb81b8bb797f266dca8c8
5
5
  SHA512:
6
- metadata.gz: 3004e273ebd8aaa9807cbfe87e728d13f5a01792ab1206480618ff49bf1405938b8e62d5da10a3dbbcd81b49382eb0b684f55dd3e00f27ee7de97200c9496984
7
- data.tar.gz: b42bc24083b5edb01409449f0222a525ba0106fca3afed8f43b2a21c10f597b9be6d8fcf8e4e0e4f5a73b706e8439affae3c14ef330258e4ef5adb630c1a9863
6
+ metadata.gz: '018246a93c971ba79591b6a6f6e18417d5c67f8574865a38fa617782ce2419a3941851303b99a90ad31ab5e4362a0465c8b13222096cc17521693a775248b8ae'
7
+ data.tar.gz: dcd4c0ac25fe19b63039d92cd40d006b133cbc662b662933b5ec6b3d95b3fcbbd5767f842a2402a1e28e4f2c831a3c058aa69cac7614964a03df0da2d8a9ba3f
data/CHANGELOG.md CHANGED
@@ -3,6 +3,8 @@
3
3
  This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the recommendations of [keepachangelog.com](http://keepachangelog.com/).
4
4
 
5
5
  - [Unreleased](#unreleased)
6
+ - [5.4.1 (2021-03-26)](#541-2021-03-26)
7
+ - [Fixed](#fixed)
6
8
  - [5.4.0 (2021-03-25)](#540-2021-03-25)
7
9
  - [Added](#added)
8
10
  - [5.3.0 (2021-03-23)](#530-2021-03-23)
@@ -22,7 +24,7 @@ This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
22
24
  - [4.0.0 (2021-02-22)](#400-2021-02-22)
23
25
  - [Added](#added-5)
24
26
  - [Deprecated](#deprecated-2)
25
- - [Fixed](#fixed)
27
+ - [Fixed](#fixed-1)
26
28
  - [3.1.0 (2020-07-08)](#310-2020-07-08)
27
29
  - [Added](#added-6)
28
30
  - [3.0.0 (2020-06-25)](#300-2020-06-25)
@@ -44,7 +46,7 @@ This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
44
46
  - [1.8.0 (2020-05-03)](#180-2020-05-03)
45
47
  - [Added](#added-13)
46
48
  - [1.7.0 (2020-05-03)](#170-2020-05-03)
47
- - [Fixed](#fixed-1)
49
+ - [Fixed](#fixed-2)
48
50
  - [1.6.0 (2020-04-17)](#160-2020-04-17)
49
51
  - [Added](#added-14)
50
52
  - [Changes](#changes-1)
@@ -58,7 +60,7 @@ This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
58
60
  - [Added](#added-18)
59
61
  - [1.1.0 (2020-04-09)](#110-2020-04-09)
60
62
  - [Added](#added-19)
61
- - [Fixed](#fixed-2)
63
+ - [Fixed](#fixed-3)
62
64
  - [1.0.0 (2020-03-16)](#100-2020-03-16)
63
65
  - [Added](#added-20)
64
66
  - [0.6.0 (2020-01-06)](#060-2020-01-06)
@@ -85,9 +87,20 @@ This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
85
87
  ### Fixed
86
88
  -->
87
89
 
90
+ 5.4.1 (2021-03-26)
91
+ ------------------
92
+
93
+ ### Fixed
94
+
95
+ * [#55](https://github.com/serradura/kind/pull/55) - Fix `Kind::Either::Left#value_or` and `Kind::Result::Failure#value_or` by allowing them to receive the value of the monad in a call using a block.
96
+
97
+ [⬆️  Back to Top](#changelog-)
98
+
88
99
  5.4.0 (2021-03-25)
89
100
  ------------------
90
101
 
102
+ ### Added
103
+
91
104
  * [#54](https://github.com/serradura/kind/pull/54) - Add `Kind::Functional::Steps` to allow the usage of `Step`, `Map`, `Try`, `Tee`, `Check`, `Success` and `Failure` in any kind of object.
92
105
  ```ruby
93
106
  # Usage in classes' instances
@@ -151,8 +164,6 @@ This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
151
164
 
152
165
  [⬆️  Back to Top](#changelog-)
153
166
 
154
- ### Added
155
-
156
167
  5.3.0 (2021-03-23)
157
168
  ------------------
158
169
 
data/README.md CHANGED
@@ -42,7 +42,7 @@ So, I invite you to check out these features to see how they could be useful for
42
42
  Version | Documentation
43
43
  ---------- | -------------
44
44
  unreleased | https://github.com/serradura/kind/blob/main/README.md
45
- 5.4.0 | https://github.com/serradura/kind/blob/v5.x/README.md
45
+ 5.4.1 | https://github.com/serradura/kind/blob/v5.x/README.md
46
46
  4.1.0 | https://github.com/serradura/kind/blob/v4.x/README.md
47
47
  3.1.0 | https://github.com/serradura/kind/blob/v3.x/README.md
48
48
  2.3.0 | https://github.com/serradura/kind/blob/v2.x/README.md
@@ -125,7 +125,7 @@ unreleased | https://github.com/serradura/kind/blob/main/README.md
125
125
  | kind | branch | ruby | activemodel |
126
126
  | -------------- | ------- | ------------------ | -------------- |
127
127
  | unreleased | main | >= 2.1.0, <= 3.0.0 | >= 3.2, < 7.0 |
128
- | 5.4.0 | v5.x | >= 2.1.0, <= 3.0.0 | >= 3.2, < 7.0 |
128
+ | 5.4.1 | v5.x | >= 2.1.0, <= 3.0.0 | >= 3.2, < 7.0 |
129
129
  | 4.1.0 | v4.x | >= 2.2.0, <= 3.0.0 | >= 3.2, < 7.0 |
130
130
  | 3.1.0 | v3.x | >= 2.2.0, <= 2.7 | >= 3.2, < 7.0 |
131
131
  | 2.3.0 | v2.x | >= 2.2.0, <= 2.7 | >= 3.2, <= 6.0 |
@@ -9,7 +9,7 @@ module Kind
9
9
  def value_or(default = UNDEFINED, &block)
10
10
  Error.invalid_default_arg! if UNDEFINED == default && !block
11
11
 
12
- UNDEFINED != default ? default : block.call
12
+ UNDEFINED != default ? default : block.call(value)
13
13
  end
14
14
 
15
15
  def map(&_)
@@ -11,7 +11,7 @@ module Kind
11
11
  def value_or(default = UNDEFINED, &block)
12
12
  Error.invalid_default_arg! if UNDEFINED == default && !block
13
13
 
14
- UNDEFINED != default ? default : block.call
14
+ UNDEFINED != default ? default : block.call(value)
15
15
  end
16
16
 
17
17
  def map(_ = UNDEFINED, &_fn)
data/lib/kind/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kind
4
- VERSION = '5.4.0'
4
+ VERSION = '5.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kind
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-25 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A development toolkit for Ruby with several small/cohesive abstractions
14
14
  (monads, enums, business logic, data validation...) to empower your development