blood_contracts-ext 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/blood_contracts-ext.gemspec +1 -1
- data/lib/blood_contracts/core/defineable_error.rb +2 -0
- data/lib/blood_contracts/core/exception_caught.rb +1 -1
- data/lib/blood_contracts/ext/refined.rb +12 -0
- data/spec/blood_contracts/ext/policy_spec.rb +0 -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: f6c41d868275bec56ce3e23362086fea4e6760367ed16b6a2df5edf45a0fb81a
|
4
|
+
data.tar.gz: 8876480c1475350dca5bfde8e66946259e1fd32bbe68757c45fa989e99ef59fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caa86fd2ae88b06a99017f7cef51a65a10f268ae53d885bdd34a24bdcdc7e83ea0ef7fe33ff62d83eb932ee60e29136e23107024148e8aa6f7ab63107d75e22f
|
7
|
+
data.tar.gz: 87831dc33a43ef69afa0a76e12e13e30aa63a222e39e0426360aef414610b649da9b1602a8b819a8d9026aa3b98d678c57b0b6210d0ae2995a2949a8e4c5adc8
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7
7
|
|
8
|
+
## [0.1.1] - [2018-07-10]
|
9
|
+
|
10
|
+
### Fixes:
|
11
|
+
Aliases for `#or_a` and `#and_then` didn't work well for BC::Ext::Refined
|
12
|
+
|
8
13
|
## [0.1.0] - [2019-07-04]
|
9
14
|
|
10
15
|
This is a first public release marked in change log with features extracted from production app.
|
data/blood_contracts-ext.gemspec
CHANGED
@@ -6,7 +6,7 @@ module BloodContracts::Core
|
|
6
6
|
# @param value [Exception] value which is wrapped inside the type
|
7
7
|
# @option context [Hash] shared context of types matching pipeline
|
8
8
|
#
|
9
|
-
def initialize(value = nil, context:
|
9
|
+
def initialize(value = nil, context: {}, **)
|
10
10
|
@errors = []
|
11
11
|
@context = context
|
12
12
|
@value = value
|
@@ -27,6 +27,14 @@ module BloodContracts::Core
|
|
27
27
|
BC::Ext::Sum.new(self, other_type)
|
28
28
|
end
|
29
29
|
|
30
|
+
# Alias for Sum compose
|
31
|
+
# See #or_a
|
32
|
+
alias or_an or_a
|
33
|
+
|
34
|
+
# Alias for Sum compose
|
35
|
+
# See #or_a
|
36
|
+
alias | or_a
|
37
|
+
|
30
38
|
# Compose types in a Pipe check
|
31
39
|
# Pipe passes data from type to type sequentially
|
32
40
|
#
|
@@ -36,6 +44,10 @@ module BloodContracts::Core
|
|
36
44
|
BC::Ext::Pipe.new(self, other_type)
|
37
45
|
end
|
38
46
|
|
47
|
+
# Alias for Pipe compose
|
48
|
+
# See #and_then
|
49
|
+
alias > and_then
|
50
|
+
|
39
51
|
# @private
|
40
52
|
def inherited(new_klass)
|
41
53
|
new_klass.failure_klass ||= failure_klass
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blood_contracts-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Dolganov (sclinede)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blood_contracts-core
|