sorbet_operation 0.1.2 → 0.1.3
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/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.yardopts +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +163 -77
- data/README.md +1 -1
- data/lib/sorbet_operation/base.rb +3 -3
- data/lib/sorbet_operation/failure.rb +1 -1
- data/lib/sorbet_operation/result.rb +2 -0
- data/lib/sorbet_operation/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd65b55fe7c00f797ad22f793cf45ad864660c7c6c2467ef04b718ed2996b20d
|
|
4
|
+
data.tar.gz: 8fd8de850c5bd11efbd30f18ec3d824ee49ec1e19ceb7423e9882996820a60cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03d97302dcbb44319b6f9041aa8483e8edf6d3ca90780c595deadddd71a75537827a681ef6b5c4cf5db777f1bcdcd7b2715495843c6743eeb140635f75662794
|
|
7
|
+
data.tar.gz: 67c86bfec1cb58446bc7c9609ecfd0ae39ed9b700b1b74e55d9c815b96e9958f47857294e0ecc4039b0848b3acc8da879f9554410c3abd4ef588c95a7e2c3319
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.6
|
data/.yardopts
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,131 +1,154 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sorbet_operation (0.1.
|
|
4
|
+
sorbet_operation (0.1.3)
|
|
5
5
|
sorbet-runtime (~> 0.5.10741)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
10
|
ansi (1.5.0)
|
|
11
|
-
ast (2.4.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
ast (2.4.3)
|
|
12
|
+
benchmark (0.4.1)
|
|
13
|
+
bigdecimal (3.2.3)
|
|
14
|
+
builder (3.3.0)
|
|
15
|
+
bundler-audit (0.9.2)
|
|
15
16
|
bundler (>= 1.2.0, < 3)
|
|
16
17
|
thor (~> 1.0)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
date (3.4.1)
|
|
19
|
+
docile (1.4.1)
|
|
20
|
+
erb (5.0.2)
|
|
21
|
+
erubi (1.13.1)
|
|
22
|
+
io-console (0.8.1)
|
|
23
|
+
irb (1.15.2)
|
|
24
|
+
pp (>= 0.6.0)
|
|
25
|
+
rdoc (>= 4.0.0)
|
|
22
26
|
reline (>= 0.4.2)
|
|
23
|
-
json (2.
|
|
24
|
-
language_server-protocol (3.17.0.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
json (2.15.0)
|
|
28
|
+
language_server-protocol (3.17.0.5)
|
|
29
|
+
lint_roller (1.1.0)
|
|
30
|
+
logger (1.7.0)
|
|
31
|
+
minitest (5.25.5)
|
|
32
|
+
minitest-reporters (1.7.1)
|
|
27
33
|
ansi
|
|
28
34
|
builder
|
|
29
35
|
minitest (>= 5.0)
|
|
30
36
|
ruby-progressbar
|
|
31
37
|
netrc (0.11.0)
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
ostruct (0.6.3)
|
|
39
|
+
parallel (1.27.0)
|
|
40
|
+
parser (3.3.9.0)
|
|
34
41
|
ast (~> 2.4.1)
|
|
35
42
|
racc
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
pp (0.6.2)
|
|
44
|
+
prettyprint
|
|
45
|
+
prettyprint (0.2.0)
|
|
46
|
+
prism (1.5.1)
|
|
47
|
+
psych (5.2.6)
|
|
48
|
+
date
|
|
39
49
|
stringio
|
|
40
|
-
racc (1.
|
|
50
|
+
racc (1.8.1)
|
|
41
51
|
rainbow (3.1.1)
|
|
42
|
-
rake (13.
|
|
43
|
-
rbi (0.
|
|
44
|
-
prism (
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
rake (13.3.0)
|
|
53
|
+
rbi (0.3.6)
|
|
54
|
+
prism (~> 1.0)
|
|
55
|
+
rbs (>= 3.4.4)
|
|
56
|
+
rbs (3.9.5)
|
|
57
|
+
logger
|
|
58
|
+
rdoc (6.14.2)
|
|
59
|
+
erb
|
|
47
60
|
psych (>= 4.0.0)
|
|
48
|
-
regexp_parser (2.
|
|
49
|
-
reline (0.
|
|
61
|
+
regexp_parser (2.11.3)
|
|
62
|
+
reline (0.6.2)
|
|
50
63
|
io-console (~> 0.5)
|
|
51
|
-
rexml (3.
|
|
52
|
-
|
|
53
|
-
rubocop (1.60.2)
|
|
64
|
+
rexml (3.4.4)
|
|
65
|
+
rubocop (1.80.2)
|
|
54
66
|
json (~> 2.3)
|
|
55
|
-
language_server-protocol (
|
|
67
|
+
language_server-protocol (~> 3.17.0.2)
|
|
68
|
+
lint_roller (~> 1.1.0)
|
|
56
69
|
parallel (~> 1.10)
|
|
57
70
|
parser (>= 3.3.0.2)
|
|
58
71
|
rainbow (>= 2.2.2, < 4.0)
|
|
59
|
-
regexp_parser (>=
|
|
60
|
-
|
|
61
|
-
rubocop-ast (>= 1.30.0, < 2.0)
|
|
72
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
73
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
|
62
74
|
ruby-progressbar (~> 1.7)
|
|
63
|
-
unicode-display_width (>= 2.4.0, <
|
|
64
|
-
rubocop-ast (1.
|
|
65
|
-
parser (>= 3.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
rubocop (>= 1.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
rubocop (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
rubocop (>=
|
|
75
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
76
|
+
rubocop-ast (1.47.1)
|
|
77
|
+
parser (>= 3.3.7.2)
|
|
78
|
+
prism (~> 1.4)
|
|
79
|
+
rubocop-minitest (0.38.2)
|
|
80
|
+
lint_roller (~> 1.1)
|
|
81
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
82
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
83
|
+
rubocop-performance (1.26.0)
|
|
84
|
+
lint_roller (~> 1.1)
|
|
85
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
86
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
87
|
+
rubocop-rake (0.7.1)
|
|
88
|
+
lint_roller (~> 1.1)
|
|
89
|
+
rubocop (>= 1.72.1)
|
|
90
|
+
rubocop-shopify (2.17.1)
|
|
91
|
+
rubocop (~> 1.62)
|
|
92
|
+
rubocop-sorbet (0.10.5)
|
|
93
|
+
lint_roller
|
|
94
|
+
rubocop (>= 1.75.2)
|
|
78
95
|
ruby-progressbar (1.13.0)
|
|
79
96
|
simplecov (0.22.0)
|
|
80
97
|
docile (~> 1.1)
|
|
81
98
|
simplecov-html (~> 0.11)
|
|
82
99
|
simplecov_json_formatter (~> 0.1)
|
|
83
|
-
simplecov-html (0.
|
|
100
|
+
simplecov-html (0.13.2)
|
|
84
101
|
simplecov_json_formatter (0.1.4)
|
|
85
|
-
sorbet (0.5.
|
|
86
|
-
sorbet-static (= 0.5.
|
|
87
|
-
sorbet-runtime (0.5.
|
|
88
|
-
sorbet-static (0.5.
|
|
89
|
-
sorbet-static (0.5.
|
|
90
|
-
sorbet-static
|
|
91
|
-
|
|
92
|
-
sorbet
|
|
93
|
-
|
|
102
|
+
sorbet (0.5.12443)
|
|
103
|
+
sorbet-static (= 0.5.12443)
|
|
104
|
+
sorbet-runtime (0.5.12443)
|
|
105
|
+
sorbet-static (0.5.12443-aarch64-linux)
|
|
106
|
+
sorbet-static (0.5.12443-universal-darwin)
|
|
107
|
+
sorbet-static (0.5.12443-x86_64-linux)
|
|
108
|
+
sorbet-static-and-runtime (0.5.12443)
|
|
109
|
+
sorbet (= 0.5.12443)
|
|
110
|
+
sorbet-runtime (= 0.5.12443)
|
|
111
|
+
spoom (1.6.3)
|
|
94
112
|
erubi (>= 1.10.0)
|
|
113
|
+
prism (>= 0.28.0)
|
|
114
|
+
rbi (>= 0.3.3)
|
|
115
|
+
rexml (>= 3.2.6)
|
|
95
116
|
sorbet-static-and-runtime (>= 0.5.10187)
|
|
96
|
-
syntax_tree (>= 6.1.1)
|
|
97
117
|
thor (>= 0.19.2)
|
|
98
|
-
stringio (3.1.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
prettier_print (>= 1.2.0)
|
|
102
|
-
tapioca (0.12.0)
|
|
118
|
+
stringio (3.1.7)
|
|
119
|
+
tapioca (0.16.11)
|
|
120
|
+
benchmark
|
|
103
121
|
bundler (>= 2.2.25)
|
|
104
122
|
netrc (>= 0.11.0)
|
|
105
123
|
parallel (>= 1.21.0)
|
|
106
|
-
rbi (
|
|
107
|
-
sorbet-static-and-runtime (>= 0.5.
|
|
108
|
-
spoom (
|
|
124
|
+
rbi (~> 0.2)
|
|
125
|
+
sorbet-static-and-runtime (>= 0.5.11087)
|
|
126
|
+
spoom (>= 1.2.0)
|
|
109
127
|
thor (>= 1.2.0)
|
|
110
128
|
yard-sorbet
|
|
111
|
-
thor (1.
|
|
112
|
-
unicode-display_width (2.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
129
|
+
thor (1.4.0)
|
|
130
|
+
unicode-display_width (3.2.0)
|
|
131
|
+
unicode-emoji (~> 4.1)
|
|
132
|
+
unicode-emoji (4.1.0)
|
|
133
|
+
yard (0.9.37)
|
|
134
|
+
yard-sorbet (0.9.0)
|
|
135
|
+
sorbet-runtime
|
|
136
|
+
yard
|
|
117
137
|
|
|
118
138
|
PLATFORMS
|
|
119
|
-
|
|
120
|
-
arm64-darwin
|
|
139
|
+
aarch64-linux
|
|
140
|
+
arm64-darwin
|
|
141
|
+
universal-darwin
|
|
121
142
|
x86_64-linux
|
|
122
143
|
|
|
123
144
|
DEPENDENCIES
|
|
145
|
+
benchmark
|
|
124
146
|
bigdecimal
|
|
125
147
|
bundler-audit
|
|
126
148
|
irb
|
|
127
149
|
minitest (~> 5.0)
|
|
128
150
|
minitest-reporters (~> 1.4)
|
|
151
|
+
ostruct
|
|
129
152
|
rake (~> 13.0)
|
|
130
153
|
rubocop
|
|
131
154
|
rubocop-minitest
|
|
@@ -140,5 +163,68 @@ DEPENDENCIES
|
|
|
140
163
|
yard
|
|
141
164
|
yard-sorbet
|
|
142
165
|
|
|
166
|
+
CHECKSUMS
|
|
167
|
+
ansi (1.5.0) sha256=5408253274e33d9d27d4a98c46d2998266fd51cba58a7eb9d08f50e57ed23592
|
|
168
|
+
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
169
|
+
benchmark (0.4.1) sha256=d4ef40037bba27f03b28013e219b950b82bace296549ec15a78016552f8d2cce
|
|
170
|
+
bigdecimal (3.2.3) sha256=ffd11d1ac67a0d3b2f44aec0a6487210b3f813f363dd11f1fcccf5ba00da4e1b
|
|
171
|
+
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
|
172
|
+
bundler-audit (0.9.2) sha256=73051daa09865c436450a35c4d87ceef15f3f9777f4aad4fd015cc6f1f2b1048
|
|
173
|
+
date (3.4.1) sha256=bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f
|
|
174
|
+
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
|
|
175
|
+
erb (5.0.2) sha256=d30f258143d4300fb4ecf430042ac12970c9bb4b33c974a545b8f58c1ec26c0f
|
|
176
|
+
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
177
|
+
io-console (0.8.1) sha256=1e15440a6b2f67b6ea496df7c474ed62c860ad11237f29b3bd187f054b925fcb
|
|
178
|
+
irb (1.15.2) sha256=222f32952e278da34b58ffe45e8634bf4afc2dc7aa9da23fed67e581aa50fdba
|
|
179
|
+
json (2.15.0) sha256=bc24d490a1d81bcbf6b45ee5c02695545d4ed37f679cee879b789a2bbb53ad5c
|
|
180
|
+
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
|
|
181
|
+
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
182
|
+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
183
|
+
minitest (5.25.5) sha256=391b6c6cb43a4802bfb7c93af1ebe2ac66a210293f4a3fb7db36f2fc7dc2c756
|
|
184
|
+
minitest-reporters (1.7.1) sha256=5060413a0c95b8c32fe73e0606f3631c173a884d7900e50013e15094eb50562c
|
|
185
|
+
netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f
|
|
186
|
+
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
|
|
187
|
+
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
|
|
188
|
+
parser (3.3.9.0) sha256=94d6929354b1a6e3e1f89d79d4d302cc8f5aa814431a6c9c7e0623335d7687f2
|
|
189
|
+
pp (0.6.2) sha256=947ec3120c6f92195f8ee8aa25a7b2c5297bb106d83b41baa02983686577b6ff
|
|
190
|
+
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
|
|
191
|
+
prism (1.5.1) sha256=b40c1b76ccb9fcccc3d1553967cda6e79fa7274d8bfea0d98b15d27a6d187134
|
|
192
|
+
psych (5.2.6) sha256=814328aa5dcb6d604d32126a20bc1cbcf05521a5b49dbb1a8b30a07e580f316e
|
|
193
|
+
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
194
|
+
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
195
|
+
rake (13.3.0) sha256=96f5092d786ff412c62fde76f793cc0541bd84d2eb579caa529aa8a059934493
|
|
196
|
+
rbi (0.3.6) sha256=577e94ddd123d7c83794dd62c06c5f9bf32a22e9a3a0d2f9baf32f7c81b2b5fa
|
|
197
|
+
rbs (3.9.5) sha256=eabaaf60aee84e38cbf94839c6e1b9cd145c7295fc3cc0e88c92e4069b1119b0
|
|
198
|
+
rdoc (6.14.2) sha256=9fdd44df130f856ae70cc9a264dfd659b9b40de369b16581f4ab746e42439226
|
|
199
|
+
regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
|
|
200
|
+
reline (0.6.2) sha256=1dad26a6008872d59c8e05244b119347c9f2ddaf4a53dce97856cd5f30a02846
|
|
201
|
+
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
|
|
202
|
+
rubocop (1.80.2) sha256=6485f30fefcf5c199db3b91e5e253b1ef43f7e564784e2315255809a3dd9abf4
|
|
203
|
+
rubocop-ast (1.47.1) sha256=592682017855408b046a8190689490763aecea175238232b1b526826349d01ae
|
|
204
|
+
rubocop-minitest (0.38.2) sha256=5a9dfb5a538973d0601aa51e59637d3998bb8df81233edf1ff421504c6280068
|
|
205
|
+
rubocop-performance (1.26.0) sha256=7bb0d9d9fb2ea122bf6f9a596dd7cf9dc93ab4950923d26c4ae4f328cef71ca9
|
|
206
|
+
rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
|
|
207
|
+
rubocop-shopify (2.17.1) sha256=03850eb1a9c4d1f9f0ac1d8d5aa51bb47a149e532cfb5e8d02ac6a90c8800a5f
|
|
208
|
+
rubocop-sorbet (0.10.5) sha256=221672c096616d908a06aadd5111bfaab6d3c990d2a1caf2714cdec6514f4795
|
|
209
|
+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
210
|
+
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
|
|
211
|
+
simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
|
|
212
|
+
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
|
|
213
|
+
sorbet (0.5.12443) sha256=9c52595b75f544284eee5e536f2ff86b7dfa370072227c56297e972bfdb28e6c
|
|
214
|
+
sorbet-runtime (0.5.12443) sha256=95a3667e2f2410857bca9952de98b88185b7e266c48e42ef4c6d2dc3fa73a6cc
|
|
215
|
+
sorbet-static (0.5.12443-aarch64-linux) sha256=418342d8925fa75285c73760e237dcb42994373d2d5f3b0bd7dcbdfb3f6dadbb
|
|
216
|
+
sorbet-static (0.5.12443-universal-darwin) sha256=99d0b9d5371ec9d449880154008d8b0aa1854c646ff83cdf1d7a29cda978d494
|
|
217
|
+
sorbet-static (0.5.12443-x86_64-linux) sha256=92915e823d312af2bd958f0700e529b5afd041492c6527198a2b60045f5a9e98
|
|
218
|
+
sorbet-static-and-runtime (0.5.12443) sha256=88ddf016cb6f238b14cc3c6d5324299e45f5957c9b1bae9c9509f864272ae2ea
|
|
219
|
+
sorbet_operation (0.1.3)
|
|
220
|
+
spoom (1.6.3) sha256=0d05a501a643a2e3cb75357583fcd0a400e92e05cd05a1bf1a08cda6d321d153
|
|
221
|
+
stringio (3.1.7) sha256=5b78b7cb242a315fb4fca61a8255d62ec438f58da2b90be66048546ade4507fa
|
|
222
|
+
tapioca (0.16.11) sha256=beeb388a5e2022ef8880cd24f57bc2acb59b65a4d5a6aa59bc1f10bc7b1eb1f7
|
|
223
|
+
thor (1.4.0) sha256=8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d
|
|
224
|
+
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
|
225
|
+
unicode-emoji (4.1.0) sha256=4997d2d5df1ed4252f4830a9b6e86f932e2013fbff2182a9ce9ccabda4f325a5
|
|
226
|
+
yard (0.9.37) sha256=a6e910399e78e613f80ba9add9ba7c394b1a935f083cccbef82903a3d2a26992
|
|
227
|
+
yard-sorbet (0.9.0) sha256=03d1aa461b9e9c82b886919a13aa3e09fcf4d1852239d2967ed97e92723ffe21
|
|
228
|
+
|
|
143
229
|
BUNDLED WITH
|
|
144
|
-
2.
|
|
230
|
+
2.7.2
|
data/README.md
CHANGED
|
@@ -34,7 +34,7 @@ In a Rails controller, this operation could be used as follows:
|
|
|
34
34
|
class UsersController < ApplicationController
|
|
35
35
|
def create
|
|
36
36
|
result = CreateUser.new(user_params).perform
|
|
37
|
-
if
|
|
37
|
+
if result.success?
|
|
38
38
|
user = result.unwrap!
|
|
39
39
|
T.reveal_type(user) # `User`
|
|
40
40
|
redirect_to user
|
|
@@ -38,16 +38,16 @@ module SorbetOperation
|
|
|
38
38
|
# Performs the operation and returns the result.
|
|
39
39
|
sig { returns(Result[ValueType]) }
|
|
40
40
|
def perform
|
|
41
|
-
logger.debug
|
|
41
|
+
logger.debug { "Performing operation #{self.class.name}" }
|
|
42
42
|
|
|
43
43
|
begin
|
|
44
44
|
value = execute
|
|
45
45
|
rescue Failure => e
|
|
46
|
-
logger.debug
|
|
46
|
+
logger.debug { "Operation #{self.class.name} failed, failure = #{e.inspect}" }
|
|
47
47
|
|
|
48
48
|
Result.new(false, nil, e)
|
|
49
49
|
else
|
|
50
|
-
logger.debug
|
|
50
|
+
logger.debug { "Operation #{self.class.name} succeeded, return value = #{value.inspect}" }
|
|
51
51
|
|
|
52
52
|
Result.new(true, value, nil)
|
|
53
53
|
end
|
|
@@ -7,7 +7,7 @@ module SorbetOperation
|
|
|
7
7
|
# Exception class used to indicate that an operation failed.
|
|
8
8
|
#
|
|
9
9
|
# Raise this exception (or a subclass of it) from an operation's
|
|
10
|
-
# {SorbetOperation::
|
|
10
|
+
# {SorbetOperation::Base#execute} method to indicate that the operation
|
|
11
11
|
# failed.
|
|
12
12
|
#
|
|
13
13
|
# If you need to pass additional information about the failure, you can
|
|
@@ -192,6 +192,8 @@ module SorbetOperation
|
|
|
192
192
|
# runtime error if `ValueType` is nilable and `@value` is `nil`.
|
|
193
193
|
#
|
|
194
194
|
# There's probably a better way to handle this.
|
|
195
|
+
#
|
|
196
|
+
# @private
|
|
195
197
|
sig { returns(ValueType) }
|
|
196
198
|
def casted_value
|
|
197
199
|
T.cast(@value, ValueType)
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sorbet_operation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thatch Health, Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: sorbet-runtime
|
|
@@ -55,7 +54,6 @@ metadata:
|
|
|
55
54
|
homepage_uri: https://github.com/thatch-health/sorbet_operation
|
|
56
55
|
source_code_uri: https://github.com/thatch-health/sorbet_operation
|
|
57
56
|
changelog_uri: https://github.com/thatch-health/sorbet_operation/blob/main/CHANGELOG.md
|
|
58
|
-
post_install_message:
|
|
59
57
|
rdoc_options: []
|
|
60
58
|
require_paths:
|
|
61
59
|
- lib
|
|
@@ -70,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
70
68
|
- !ruby/object:Gem::Version
|
|
71
69
|
version: '0'
|
|
72
70
|
requirements: []
|
|
73
|
-
rubygems_version: 3.
|
|
74
|
-
signing_key:
|
|
71
|
+
rubygems_version: 3.6.9
|
|
75
72
|
specification_version: 4
|
|
76
73
|
summary: Sorbet-powered operation framework.
|
|
77
74
|
test_files: []
|