morpher 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/morpher/transform.rb +8 -2
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0697df06da10720a25802c383e50cea61c7f7c86d24c46ad5e3e435fb00d8569'
|
4
|
+
data.tar.gz: 2f864673a64301e6827a35c1f6e570b253f40f475bc707c6bebd4004ed8f82b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 429cb71b2dffd2f59a584df47175986e7b9ab87ea1b69ef54e323506fa392d6ef8dea04325804e9ddd15e0ecd451ff81575e102c4bc6638229b173f3d0288b90
|
7
|
+
data.tar.gz: a0b532f79d366969453c9e9b62eb38bef741b8689f64b65b1e74562b70660f516a5afe4ddb8b674aa035166d4c10f4800af7ee1b2d198b414ebf8fd8a2bcf70f
|
data/lib/morpher/transform.rb
CHANGED
@@ -43,6 +43,13 @@ module Morpher
|
|
43
43
|
Maybe.new(self)
|
44
44
|
end
|
45
45
|
|
46
|
+
# Build Proc to transform input
|
47
|
+
#
|
48
|
+
# @return [Proc]
|
49
|
+
def to_proc
|
50
|
+
public_method(:call).to_proc
|
51
|
+
end
|
52
|
+
|
46
53
|
# Deep error data structure
|
47
54
|
class Error
|
48
55
|
include Anima.new(
|
@@ -389,7 +396,7 @@ module Morpher
|
|
389
396
|
def transform_keys(keys, input)
|
390
397
|
success(
|
391
398
|
keys
|
392
|
-
.
|
399
|
+
.to_h do |key|
|
393
400
|
[
|
394
401
|
key.value,
|
395
402
|
coerce_key(key, input).from_right do |error|
|
@@ -397,7 +404,6 @@ module Morpher
|
|
397
404
|
end
|
398
405
|
]
|
399
406
|
end
|
400
|
-
.to_h
|
401
407
|
)
|
402
408
|
end
|
403
409
|
# rubocop:enable Metrics/MethodLength
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morpher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abstract_type
|
@@ -207,7 +207,8 @@ files:
|
|
207
207
|
homepage: https://github.com/mbj/morpher
|
208
208
|
licenses:
|
209
209
|
- MIT
|
210
|
-
metadata:
|
210
|
+
metadata:
|
211
|
+
rubygems_mfa_required: 'true'
|
211
212
|
post_install_message:
|
212
213
|
rdoc_options: []
|
213
214
|
require_paths:
|
@@ -216,14 +217,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
216
217
|
requirements:
|
217
218
|
- - ">="
|
218
219
|
- !ruby/object:Gem::Version
|
219
|
-
version: '2.
|
220
|
+
version: '2.6'
|
220
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
222
|
requirements:
|
222
223
|
- - ">="
|
223
224
|
- !ruby/object:Gem::Version
|
224
225
|
version: '0'
|
225
226
|
requirements: []
|
226
|
-
rubygems_version: 3.
|
227
|
+
rubygems_version: 3.3.7
|
227
228
|
signing_key:
|
228
229
|
specification_version: 4
|
229
230
|
summary: Domain Transformation Algebra
|