kind 5.5.0 → 5.6.0

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: 9e91ad1bc49fe0ca0e32f62bf55da4c6fa6aa8a54372aeeda0894cc76ac93c18
4
- data.tar.gz: 241a52a87f1492c6b952687e3105f3b95c90f3ac30c2810da3911414737861cd
3
+ metadata.gz: b72fec7c07a6b3178717f30c81ecdbb6375cc1fc625c1a3fa1d39611e4dc3960
4
+ data.tar.gz: efec52f15083b538c99546f8d5e1c6b095c6c5c243379fc21365bae99a176e60
5
5
  SHA512:
6
- metadata.gz: 7b2ba35383908bac2542bb93afabb2cc0385a06556a184101dd7da21983bb55ee548ab539f609e8604dcbceecdea6d6b67f26dd8323f1404dee5eca308951bcb
7
- data.tar.gz: 9500bf6cc0484ae417ddea388ca670a4f615931c32ca24f82ae6798ac57bae9e9e80e663aca9c19d837a1f82529c2127a96effc546d13b175fdb3f12456854fe
6
+ metadata.gz: fad78e10047e8fdd21e4c56ddcc5c8620b1ad6018f3fdfb7af097b84be23bb73c3c549cd519bec3af7980c4df89fbc5b9db2796510c518a4ad9d9b9165ef6e02
7
+ data.tar.gz: 3d0fa5b46405e4a766285c6e3fd95e3568c5bb1875e310941a3dd592cd99372893c7aab6cfe91a321fc6a843c966ab5fb7414e726e903021b16b92dfc03bac1e
data/CHANGELOG.md CHANGED
@@ -3,81 +3,83 @@
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)
6
+ - [5.6.0 (2021-05-14)](#560-2021-05-14)
7
7
  - [Added](#added)
8
+ - [5.5.0 (2021-04-05)](#550-2021-04-05)
9
+ - [Added](#added-1)
8
10
  - [5.4.1 (2021-03-26)](#541-2021-03-26)
9
11
  - [Fixed](#fixed)
10
12
  - [5.4.0 (2021-03-25)](#540-2021-03-25)
11
- - [Added](#added-1)
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)
14
+ - [5.3.0 (2021-03-23)](#530-2021-03-23)
15
15
  - [Added](#added-3)
16
+ - [5.2.0 (2021-03-17)](#520-2021-03-17)
17
+ - [Added](#added-4)
16
18
  - [Deprecated](#deprecated)
17
19
  - [Changes](#changes)
18
20
  - [5.1.0 (2021-02-23)](#510-2021-02-23)
19
- - [Added](#added-4)
21
+ - [Added](#added-5)
20
22
  - [Deprecated](#deprecated-1)
21
23
  - [5.0.0 (2021-02-22)](#500-2021-02-22)
22
24
  - [Breaking Changes](#breaking-changes)
23
25
  - [Removed](#removed)
24
26
  - [4.1.0 (2021-02-22)](#410-2021-02-22)
25
- - [Added](#added-5)
26
- - [4.0.0 (2021-02-22)](#400-2021-02-22)
27
27
  - [Added](#added-6)
28
+ - [4.0.0 (2021-02-22)](#400-2021-02-22)
29
+ - [Added](#added-7)
28
30
  - [Deprecated](#deprecated-2)
29
31
  - [Fixed](#fixed-1)
30
32
  - [3.1.0 (2020-07-08)](#310-2020-07-08)
31
- - [Added](#added-7)
33
+ - [Added](#added-8)
32
34
  - [3.0.0 (2020-06-25)](#300-2020-06-25)
33
35
  - [Breaking Changes](#breaking-changes-1)
34
- - [Added](#added-8)
35
- - [2.3.0 (2020-06-24)](#230-2020-06-24)
36
36
  - [Added](#added-9)
37
- - [2.2.0 (2020-06-23)](#220-2020-06-23)
37
+ - [2.3.0 (2020-06-24)](#230-2020-06-24)
38
38
  - [Added](#added-10)
39
- - [2.1.0 (2020-05-12)](#210-2020-05-12)
39
+ - [2.2.0 (2020-06-23)](#220-2020-06-23)
40
40
  - [Added](#added-11)
41
+ - [2.1.0 (2020-05-12)](#210-2020-05-12)
42
+ - [Added](#added-12)
41
43
  - [Breaking Changes](#breaking-changes-2)
42
44
  - [2.0.0 (2020-05-07)](#200-2020-05-07)
43
- - [Added](#added-12)
45
+ - [Added](#added-13)
44
46
  - [Breaking Changes](#breaking-changes-3)
45
47
  - [Removed](#removed-1)
46
48
  - [1.9.0 (2020-05-06)](#190-2020-05-06)
47
- - [Added](#added-13)
48
- - [1.8.0 (2020-05-03)](#180-2020-05-03)
49
49
  - [Added](#added-14)
50
+ - [1.8.0 (2020-05-03)](#180-2020-05-03)
51
+ - [Added](#added-15)
50
52
  - [1.7.0 (2020-05-03)](#170-2020-05-03)
51
53
  - [Fixed](#fixed-2)
52
54
  - [1.6.0 (2020-04-17)](#160-2020-04-17)
53
- - [Added](#added-15)
55
+ - [Added](#added-16)
54
56
  - [Changes](#changes-1)
55
57
  - [1.5.0 (2020-04-12)](#150-2020-04-12)
56
- - [Added](#added-16)
57
- - [1.4.0 (2020-04-12)](#140-2020-04-12)
58
58
  - [Added](#added-17)
59
- - [1.3.0 (2020-04-12)](#130-2020-04-12)
59
+ - [1.4.0 (2020-04-12)](#140-2020-04-12)
60
60
  - [Added](#added-18)
61
- - [1.2.0 (2020-04-12)](#120-2020-04-12)
61
+ - [1.3.0 (2020-04-12)](#130-2020-04-12)
62
62
  - [Added](#added-19)
63
- - [1.1.0 (2020-04-09)](#110-2020-04-09)
63
+ - [1.2.0 (2020-04-12)](#120-2020-04-12)
64
64
  - [Added](#added-20)
65
+ - [1.1.0 (2020-04-09)](#110-2020-04-09)
66
+ - [Added](#added-21)
65
67
  - [Fixed](#fixed-3)
66
68
  - [1.0.0 (2020-03-16)](#100-2020-03-16)
67
- - [Added](#added-21)
68
- - [0.6.0 (2020-01-06)](#060-2020-01-06)
69
69
  - [Added](#added-22)
70
- - [0.5.0 (2020-01-04)](#050-2020-01-04)
70
+ - [0.6.0 (2020-01-06)](#060-2020-01-06)
71
71
  - [Added](#added-23)
72
- - [0.4.0 (2020-01-03)](#040-2020-01-03)
72
+ - [0.5.0 (2020-01-04)](#050-2020-01-04)
73
73
  - [Added](#added-24)
74
- - [0.3.0 (2020-01-03)](#030-2020-01-03)
74
+ - [0.4.0 (2020-01-03)](#040-2020-01-03)
75
75
  - [Added](#added-25)
76
+ - [0.3.0 (2020-01-03)](#030-2020-01-03)
77
+ - [Added](#added-26)
76
78
  - [Breaking Changes](#breaking-changes-4)
77
79
  - [0.2.0 (2020-01-02)](#020-2020-01-02)
78
- - [Added](#added-26)
79
- - [0.1.0 (2019-12-26)](#010-2019-12-26)
80
80
  - [Added](#added-27)
81
+ - [0.1.0 (2019-12-26)](#010-2019-12-26)
82
+ - [Added](#added-28)
81
83
 
82
84
  ## Unreleased
83
85
 
@@ -89,6 +91,21 @@ This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
89
91
  ### Fixed
90
92
  -->
91
93
 
94
+ 5.6.0 (2021-05-14)
95
+ ------------------
96
+
97
+ ### Added
98
+
99
+ * [#57](https://github.com/serradura/kind/pull/57) - Allow the usage of `nil` to define union types.
100
+ ```ruby
101
+ (Kind::String | nil) === '' # true
102
+ (Kind::String | nil) === nil # true
103
+
104
+ (Kind::String | nil) === {} # false
105
+ ```
106
+
107
+ [⬆️  Back to Top](#changelog-)
108
+
92
109
  5.5.0 (2021-04-05)
93
110
  ------------------
94
111
 
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.5.0 | https://github.com/serradura/kind/blob/v5.x/README.md
45
+ 5.6.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.5.0 | v5.x | >= 2.1.0, <= 3.0.0 | >= 3.2, < 7.0 |
128
+ | 5.6.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 |
@@ -16,7 +16,7 @@ module Kind
16
16
  end
17
17
 
18
18
  def |(kind)
19
- self.class.new(@kinds + [Interface[kind]])
19
+ self.class.new(@kinds + [Interface[kind.nil? ? Kind::Nil : kind]])
20
20
  end
21
21
 
22
22
  def ===(value)
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.5.0'
4
+ VERSION = '5.6.0'
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.5.0
4
+ version: 5.6.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-04-06 00:00:00.000000000 Z
11
+ date: 2021-05-14 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