kind 5.4.1 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +52 -27
- data/README.md +2 -2
- data/lib/kind/basic.rb +4 -0
- data/lib/kind/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: 9e91ad1bc49fe0ca0e32f62bf55da4c6fa6aa8a54372aeeda0894cc76ac93c18
|
4
|
+
data.tar.gz: 241a52a87f1492c6b952687e3105f3b95c90f3ac30c2810da3911414737861cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b2ba35383908bac2542bb93afabb2cc0385a06556a184101dd7da21983bb55ee548ab539f609e8604dcbceecdea6d6b67f26dd8323f1404dee5eca308951bcb
|
7
|
+
data.tar.gz: 9500bf6cc0484ae417ddea388ca670a4f615931c32ca24f82ae6798ac57bae9e9e80e663aca9c19d837a1f82529c2127a96effc546d13b175fdb3f12456854fe
|
data/CHANGELOG.md
CHANGED
@@ -3,79 +3,81 @@
|
|
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.5.0 (2021-04-05)](#550-2021-04-05)
|
7
|
+
- [Added](#added)
|
6
8
|
- [5.4.1 (2021-03-26)](#541-2021-03-26)
|
7
9
|
- [Fixed](#fixed)
|
8
10
|
- [5.4.0 (2021-03-25)](#540-2021-03-25)
|
9
|
-
- [Added](#added)
|
10
|
-
- [5.3.0 (2021-03-23)](#530-2021-03-23)
|
11
11
|
- [Added](#added-1)
|
12
|
-
- [5.
|
12
|
+
- [5.3.0 (2021-03-23)](#530-2021-03-23)
|
13
13
|
- [Added](#added-2)
|
14
|
+
- [5.2.0 (2021-03-17)](#520-2021-03-17)
|
15
|
+
- [Added](#added-3)
|
14
16
|
- [Deprecated](#deprecated)
|
15
17
|
- [Changes](#changes)
|
16
18
|
- [5.1.0 (2021-02-23)](#510-2021-02-23)
|
17
|
-
- [Added](#added-
|
19
|
+
- [Added](#added-4)
|
18
20
|
- [Deprecated](#deprecated-1)
|
19
21
|
- [5.0.0 (2021-02-22)](#500-2021-02-22)
|
20
22
|
- [Breaking Changes](#breaking-changes)
|
21
23
|
- [Removed](#removed)
|
22
24
|
- [4.1.0 (2021-02-22)](#410-2021-02-22)
|
23
|
-
- [Added](#added-4)
|
24
|
-
- [4.0.0 (2021-02-22)](#400-2021-02-22)
|
25
25
|
- [Added](#added-5)
|
26
|
+
- [4.0.0 (2021-02-22)](#400-2021-02-22)
|
27
|
+
- [Added](#added-6)
|
26
28
|
- [Deprecated](#deprecated-2)
|
27
29
|
- [Fixed](#fixed-1)
|
28
30
|
- [3.1.0 (2020-07-08)](#310-2020-07-08)
|
29
|
-
- [Added](#added-
|
31
|
+
- [Added](#added-7)
|
30
32
|
- [3.0.0 (2020-06-25)](#300-2020-06-25)
|
31
33
|
- [Breaking Changes](#breaking-changes-1)
|
32
|
-
- [Added](#added-7)
|
33
|
-
- [2.3.0 (2020-06-24)](#230-2020-06-24)
|
34
34
|
- [Added](#added-8)
|
35
|
-
- [2.
|
35
|
+
- [2.3.0 (2020-06-24)](#230-2020-06-24)
|
36
36
|
- [Added](#added-9)
|
37
|
-
- [2.
|
37
|
+
- [2.2.0 (2020-06-23)](#220-2020-06-23)
|
38
38
|
- [Added](#added-10)
|
39
|
+
- [2.1.0 (2020-05-12)](#210-2020-05-12)
|
40
|
+
- [Added](#added-11)
|
39
41
|
- [Breaking Changes](#breaking-changes-2)
|
40
42
|
- [2.0.0 (2020-05-07)](#200-2020-05-07)
|
41
|
-
- [Added](#added-
|
43
|
+
- [Added](#added-12)
|
42
44
|
- [Breaking Changes](#breaking-changes-3)
|
43
45
|
- [Removed](#removed-1)
|
44
46
|
- [1.9.0 (2020-05-06)](#190-2020-05-06)
|
45
|
-
- [Added](#added-12)
|
46
|
-
- [1.8.0 (2020-05-03)](#180-2020-05-03)
|
47
47
|
- [Added](#added-13)
|
48
|
+
- [1.8.0 (2020-05-03)](#180-2020-05-03)
|
49
|
+
- [Added](#added-14)
|
48
50
|
- [1.7.0 (2020-05-03)](#170-2020-05-03)
|
49
51
|
- [Fixed](#fixed-2)
|
50
52
|
- [1.6.0 (2020-04-17)](#160-2020-04-17)
|
51
|
-
- [Added](#added-
|
53
|
+
- [Added](#added-15)
|
52
54
|
- [Changes](#changes-1)
|
53
55
|
- [1.5.0 (2020-04-12)](#150-2020-04-12)
|
54
|
-
- [Added](#added-15)
|
55
|
-
- [1.4.0 (2020-04-12)](#140-2020-04-12)
|
56
56
|
- [Added](#added-16)
|
57
|
-
- [1.
|
57
|
+
- [1.4.0 (2020-04-12)](#140-2020-04-12)
|
58
58
|
- [Added](#added-17)
|
59
|
-
- [1.
|
59
|
+
- [1.3.0 (2020-04-12)](#130-2020-04-12)
|
60
60
|
- [Added](#added-18)
|
61
|
-
- [1.
|
61
|
+
- [1.2.0 (2020-04-12)](#120-2020-04-12)
|
62
62
|
- [Added](#added-19)
|
63
|
+
- [1.1.0 (2020-04-09)](#110-2020-04-09)
|
64
|
+
- [Added](#added-20)
|
63
65
|
- [Fixed](#fixed-3)
|
64
66
|
- [1.0.0 (2020-03-16)](#100-2020-03-16)
|
65
|
-
- [Added](#added-20)
|
66
|
-
- [0.6.0 (2020-01-06)](#060-2020-01-06)
|
67
67
|
- [Added](#added-21)
|
68
|
-
- [0.
|
68
|
+
- [0.6.0 (2020-01-06)](#060-2020-01-06)
|
69
69
|
- [Added](#added-22)
|
70
|
-
- [0.
|
70
|
+
- [0.5.0 (2020-01-04)](#050-2020-01-04)
|
71
71
|
- [Added](#added-23)
|
72
|
-
- [0.
|
72
|
+
- [0.4.0 (2020-01-03)](#040-2020-01-03)
|
73
73
|
- [Added](#added-24)
|
74
|
+
- [0.3.0 (2020-01-03)](#030-2020-01-03)
|
75
|
+
- [Added](#added-25)
|
74
76
|
- [Breaking Changes](#breaking-changes-4)
|
75
77
|
- [0.2.0 (2020-01-02)](#020-2020-01-02)
|
76
|
-
- [Added](#added-25)
|
77
|
-
- [0.1.0 (2019-12-26)](#010-2019-12-26)
|
78
78
|
- [Added](#added-26)
|
79
|
+
- [0.1.0 (2019-12-26)](#010-2019-12-26)
|
80
|
+
- [Added](#added-27)
|
79
81
|
|
80
82
|
## Unreleased
|
81
83
|
|
@@ -87,6 +89,29 @@ This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
|
|
87
89
|
### Fixed
|
88
90
|
-->
|
89
91
|
|
92
|
+
5.5.0 (2021-04-05)
|
93
|
+
------------------
|
94
|
+
|
95
|
+
### Added
|
96
|
+
|
97
|
+
* [#56](https://github.com/serradura/kind/pull/56) - Add `Kind.or_nil()`.
|
98
|
+
```ruby
|
99
|
+
Kind.or_nil(String, 1) # nil
|
100
|
+
|
101
|
+
Kind.or_nil(String, '') # ""
|
102
|
+
|
103
|
+
# --
|
104
|
+
|
105
|
+
filled_string = ->(value) { value.is_a?(String) && !value.empty? }
|
106
|
+
|
107
|
+
Kind.or_nil(filled_string, 1) # nil
|
108
|
+
Kind.or_nil(filled_string, '') # nil
|
109
|
+
|
110
|
+
Kind.or_nil(filled_string, '1') # "1"
|
111
|
+
```
|
112
|
+
|
113
|
+
[⬆️ Back to Top](#changelog-)
|
114
|
+
|
90
115
|
5.4.1 (2021-03-26)
|
91
116
|
------------------
|
92
117
|
|
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.
|
45
|
+
5.5.0 | 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.
|
128
|
+
| 5.5.0 | 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 |
|
data/lib/kind/basic.rb
CHANGED
data/lib/kind/version.rb
CHANGED
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
|
+
version: 5.5.0
|
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-
|
11
|
+
date: 2021-04-06 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
|