clean-architecture 4.0.0 → 4.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b553e98f42ca8f4d8c248a3b4cd8193c139c6ec954f3a8f48159e55071ad3dd
|
4
|
+
data.tar.gz: 781afce831f62564aef291aa5f78a589dd0cbf3ad08a7d12c86f6eae7b3f2817
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2dd17013e0ca6ac9500cb202544f77aec084b9c1e964f21e9eea30df993a3e834bda44118d0340b694b3c52c21836c51e6a5559571fbff1ba95a3c1cc35cb79
|
7
|
+
data.tar.gz: e81fb39a065f1c993655e3de55d6e794f1f73e46a1deccee186de9ae116547291421eb92a9c488606d1cf41193d309cddc8acf131793078ce0cf97ff237b355e
|
data/CHANGELOG.md
CHANGED
@@ -12,11 +12,11 @@ module CleanArchitecture
|
|
12
12
|
class JsonResponseFromResult
|
13
13
|
extend T::Sig
|
14
14
|
|
15
|
-
sig { params(result: Dry::Monads::Result, http_method: String, success_payload_proc: T.proc.returns(T::Hash[T.untyped, T.untyped])).void }
|
15
|
+
sig { params(result: Dry::Monads::Result, http_method: String, success_payload_proc: T.proc.params(success_value: T.untyped).returns(T::Hash[T.untyped, T.untyped])).void }
|
16
16
|
def initialize(result, http_method, success_payload_proc)
|
17
17
|
@result = T.let(result, Dry::Monads::Result)
|
18
18
|
@http_method = T.let(http_method, String)
|
19
|
-
@success_payload_proc = T.let(success_payload_proc, T.proc.returns(T::Hash[T.untyped, T.untyped]))
|
19
|
+
@success_payload_proc = T.let(success_payload_proc, T.proc.params(success_value: T.untyped).returns(T::Hash[T.untyped, T.untyped]))
|
20
20
|
end
|
21
21
|
|
22
22
|
sig { returns(T::Hash[Symbol, T.untyped]) }
|
@@ -42,19 +42,12 @@ module CleanArchitecture
|
|
42
42
|
sig { returns(T::Hash[Symbol, T.untyped]) }
|
43
43
|
def json
|
44
44
|
Matchers::UseCaseResult.call(@result) do |matcher|
|
45
|
-
matcher.success {
|
45
|
+
matcher.success { |value| { data: @success_payload_proc.call(value) } }
|
46
46
|
matcher.failure do |failure_details|
|
47
47
|
{ errors: [failure_details.message] }
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
51
|
-
|
52
|
-
sig {returns(T::Hash[Symbol, T::Hash[T.untyped, T.untyped]])}
|
53
|
-
def success_payload_data
|
54
|
-
{
|
55
|
-
data: @success_payload_proc.call
|
56
|
-
}
|
57
|
-
end
|
58
51
|
end
|
59
52
|
end
|
60
53
|
end
|
@@ -195,7 +195,7 @@
|
|
195
195
|
# wrong constant name define_attribute_method
|
196
196
|
# wrong constant name define_attribute_methods
|
197
197
|
# wrong constant name undefine_attribute_methods
|
198
|
-
# undefined method `initialize<defaultArg>1' for class `#<Class:
|
198
|
+
# undefined method `initialize<defaultArg>1' for class `#<Class:0x00007fc1ce88af08>'
|
199
199
|
# wrong constant name <Class:AttributeMethodMatch>
|
200
200
|
# wrong constant name initialize<defaultArg>1
|
201
201
|
# wrong constant name initialize
|