grape_sorbet 0.1.3 → 0.3.0
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/.ruby-version +1 -1
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +102 -118
- data/README.md +1 -1
- data/grape_sorbet.gemspec +1 -1
- data/lib/grape_sorbet/version.rb +1 -1
- data/lib/tapioca/dsl/compilers/grape_endpoints.rb +32 -29
- data/rbi/grape.rbi +76 -33
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 990df5ec35ac16a92d81098f82e48e399f4d743c562eefb44a7adf8234790aca
|
|
4
|
+
data.tar.gz: 508b014b46c8ef3f1ec69613b3037e7545930bd824c8b3787f8406cf38967f1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1da7adb449e03c5c9267b066aa2212d34e0c6aee0702894ed45e51cb56f621ae81474311a777d55cbffea2bf1c39f1635880edcac65cae065e6a621023c729c
|
|
7
|
+
data.tar.gz: 00a4a1c4a783e5f9ea01e7898e8bef9381f867262d5cbd9f17be9a0d7e30f50574aec7a7e3ecfcb2070e9f00d9ce572d415cdce3636da9e7e92b5855b28b9905
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 0.3.0 (2026-09-14)
|
|
2
|
+
|
|
3
|
+
⚠️ This release is a BREAKING CHANGE. ⚠️
|
|
4
|
+
|
|
5
|
+
grape_sorbet now targets grape >= 4.0 and is no longer compatible with older grape versions.
|
|
6
|
+
|
|
7
|
+
- Update signatures for grape 4.0 (#98)
|
|
8
|
+
- Add the missing `head` routing shim (#99)
|
|
9
|
+
- Add a signature for `return_no_content` (#100)
|
|
10
|
+
|
|
11
|
+
## 0.2.0 (2026-06-30)
|
|
12
|
+
|
|
13
|
+
⚠️ This release is a BREAKING CHANGE. ⚠️
|
|
14
|
+
|
|
15
|
+
grape_sorbet now targets grape >= 3.3 and is no longer compatible with older grape versions.
|
|
16
|
+
|
|
17
|
+
- Update signatures for grape 3.3 (#61)
|
|
18
|
+
|
|
1
19
|
## 0.1.3 (2026-05-26)
|
|
2
20
|
|
|
3
21
|
- Fix endpoint compiler to respect API superclass (#44)
|
data/Gemfile.lock
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
grape_sorbet (0.
|
|
4
|
+
grape_sorbet (0.3.0)
|
|
5
5
|
activesupport
|
|
6
|
-
grape (~>
|
|
6
|
+
grape (~> 4.0)
|
|
7
7
|
sorbet-runtime (>= 0.6)
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (8.1.3)
|
|
12
|
+
activesupport (8.1.3.1)
|
|
13
13
|
base64
|
|
14
14
|
bigdecimal
|
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -26,15 +26,13 @@ GEM
|
|
|
26
26
|
ast (2.4.3)
|
|
27
27
|
base64 (0.3.0)
|
|
28
28
|
benchmark (0.5.0)
|
|
29
|
-
bigdecimal (4.1.
|
|
29
|
+
bigdecimal (4.1.3)
|
|
30
30
|
builder (3.3.0)
|
|
31
31
|
bundler-audit (0.9.3)
|
|
32
32
|
bundler (>= 1.2.0)
|
|
33
33
|
thor (~> 1.0)
|
|
34
|
-
concurrent-ruby (1.3.
|
|
34
|
+
concurrent-ruby (1.3.8)
|
|
35
35
|
connection_pool (3.0.2)
|
|
36
|
-
date (3.5.1)
|
|
37
|
-
docile (1.4.1)
|
|
38
36
|
drb (2.2.3)
|
|
39
37
|
dry-configurable (1.4.0)
|
|
40
38
|
dry-core (~> 1.0)
|
|
@@ -56,28 +54,27 @@ GEM
|
|
|
56
54
|
dry-inflector (~> 1.0)
|
|
57
55
|
dry-logic (~> 1.4)
|
|
58
56
|
zeitwerk (~> 2.6)
|
|
59
|
-
erb (6.0.
|
|
57
|
+
erb (6.0.7)
|
|
60
58
|
erubi (1.13.1)
|
|
61
|
-
grape (
|
|
59
|
+
grape (4.0.0)
|
|
62
60
|
activesupport (>= 7.2)
|
|
63
|
-
dry-configurable
|
|
61
|
+
dry-configurable (>= 1.0)
|
|
64
62
|
dry-types (>= 1.1)
|
|
65
|
-
mustermann
|
|
66
|
-
rack (>= 2)
|
|
67
|
-
zeitwerk
|
|
68
|
-
grape-entity (1.0
|
|
63
|
+
mustermann (>= 4.0)
|
|
64
|
+
rack (>= 2.2.4)
|
|
65
|
+
zeitwerk (>= 2.6)
|
|
66
|
+
grape-entity (1.1.0)
|
|
69
67
|
activesupport (>= 3.0.0)
|
|
70
|
-
|
|
71
|
-
i18n (1.14.8)
|
|
68
|
+
i18n (1.15.2)
|
|
72
69
|
concurrent-ruby (~> 1.0)
|
|
73
|
-
io-console (0.
|
|
70
|
+
io-console (0.9.3)
|
|
74
71
|
irb (1.18.0)
|
|
75
72
|
pp (>= 0.6.0)
|
|
76
73
|
prism (>= 1.3.0)
|
|
77
74
|
rdoc (>= 4.0.0)
|
|
78
75
|
reline (>= 0.4.2)
|
|
79
|
-
json (
|
|
80
|
-
language_server-protocol (3.17.0.
|
|
76
|
+
json (3.0.2)
|
|
77
|
+
language_server-protocol (3.17.0.6)
|
|
81
78
|
lint_roller (1.1.0)
|
|
82
79
|
logger (1.7.0)
|
|
83
80
|
minitest (6.0.6)
|
|
@@ -88,44 +85,39 @@ GEM
|
|
|
88
85
|
builder
|
|
89
86
|
minitest (>= 5.0, < 7)
|
|
90
87
|
ruby-progressbar
|
|
91
|
-
multi_json (1.21.1)
|
|
92
88
|
mustermann (4.0.0)
|
|
93
|
-
mustermann-grape (1.1.0)
|
|
94
|
-
mustermann (>= 1.0.0)
|
|
95
89
|
netrc (0.11.0)
|
|
96
|
-
parallel (2.
|
|
97
|
-
parser (3.3.
|
|
90
|
+
parallel (2.2.0)
|
|
91
|
+
parser (3.3.12.0)
|
|
98
92
|
ast (~> 2.4.1)
|
|
99
93
|
racc
|
|
100
|
-
pp (0.6.
|
|
94
|
+
pp (0.6.4)
|
|
101
95
|
prettyprint
|
|
102
96
|
prettyprint (0.2.0)
|
|
103
97
|
prism (1.9.0)
|
|
104
|
-
psych (5.3.1)
|
|
105
|
-
date
|
|
106
|
-
stringio
|
|
107
98
|
racc (1.8.1)
|
|
108
|
-
rack (3.2.
|
|
99
|
+
rack (3.2.7)
|
|
109
100
|
rainbow (3.1.1)
|
|
110
101
|
rake (13.4.2)
|
|
111
|
-
rbi (0.3
|
|
102
|
+
rbi (0.4.3)
|
|
112
103
|
prism (~> 1.0)
|
|
113
104
|
rbs (>= 4.0.1)
|
|
114
|
-
rbs (4.0
|
|
105
|
+
rbs (4.2.0)
|
|
115
106
|
logger
|
|
116
107
|
prism (>= 1.6.0)
|
|
117
108
|
tsort
|
|
118
|
-
rdoc (
|
|
109
|
+
rdoc (8.0.0)
|
|
119
110
|
erb
|
|
120
|
-
|
|
111
|
+
prism (>= 1.6.0)
|
|
112
|
+
rbs (>= 4.0.0)
|
|
121
113
|
tsort
|
|
122
114
|
regexp_parser (2.12.0)
|
|
123
|
-
reline (0.
|
|
115
|
+
reline (0.7.0)
|
|
124
116
|
io-console (~> 0.5)
|
|
125
|
-
require-hooks (0.
|
|
117
|
+
require-hooks (0.5.1)
|
|
126
118
|
rexml (3.4.4)
|
|
127
|
-
rubocop (1.
|
|
128
|
-
json (
|
|
119
|
+
rubocop (1.91.0)
|
|
120
|
+
json (>= 2.3)
|
|
129
121
|
language_server-protocol (~> 3.17.0.2)
|
|
130
122
|
lint_roller (~> 1.1.0)
|
|
131
123
|
parallel (>= 1.10)
|
|
@@ -135,56 +127,54 @@ GEM
|
|
|
135
127
|
rubocop-ast (>= 1.49.0, < 2.0)
|
|
136
128
|
ruby-progressbar (~> 1.7)
|
|
137
129
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
138
|
-
rubocop-ast (1.
|
|
130
|
+
rubocop-ast (1.50.0)
|
|
139
131
|
parser (>= 3.3.7.2)
|
|
140
132
|
prism (~> 1.7)
|
|
141
|
-
rubocop-minitest (0.
|
|
133
|
+
rubocop-minitest (0.40.0)
|
|
142
134
|
lint_roller (~> 1.1)
|
|
143
135
|
rubocop (>= 1.75.0, < 2.0)
|
|
144
136
|
rubocop-ast (>= 1.38.0, < 2.0)
|
|
145
|
-
rubocop-performance (1.
|
|
137
|
+
rubocop-performance (1.27.0)
|
|
146
138
|
lint_roller (~> 1.1)
|
|
147
|
-
rubocop (>= 1.
|
|
139
|
+
rubocop (>= 1.89.0, < 2.0)
|
|
148
140
|
rubocop-ast (>= 1.47.1, < 2.0)
|
|
149
141
|
rubocop-rake (0.7.1)
|
|
150
142
|
lint_roller (~> 1.1)
|
|
151
143
|
rubocop (>= 1.72.1)
|
|
152
|
-
rubocop-shopify (
|
|
153
|
-
|
|
154
|
-
|
|
144
|
+
rubocop-shopify (3.0.2)
|
|
145
|
+
lint_roller
|
|
146
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
147
|
+
rubocop-sorbet (0.16.0)
|
|
155
148
|
lint_roller
|
|
149
|
+
rbi (~> 0.4)
|
|
156
150
|
rubocop (>= 1.75.2)
|
|
151
|
+
spoom (~> 1.8)
|
|
157
152
|
ruby-progressbar (1.13.0)
|
|
158
|
-
rubydex (0.
|
|
159
|
-
rubydex (0.
|
|
160
|
-
rubydex (0.
|
|
161
|
-
rubydex (0.
|
|
153
|
+
rubydex (0.4.1)
|
|
154
|
+
rubydex (0.4.1-aarch64-linux)
|
|
155
|
+
rubydex (0.4.1-arm64-darwin)
|
|
156
|
+
rubydex (0.4.1-x86_64-darwin)
|
|
157
|
+
rubydex (0.4.1-x86_64-linux)
|
|
162
158
|
securerandom (0.4.1)
|
|
163
|
-
simplecov (
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
sorbet (0.6.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
sorbet-static (0.6.13224-x86_64-linux)
|
|
175
|
-
sorbet-static-and-runtime (0.6.13224)
|
|
176
|
-
sorbet (= 0.6.13224)
|
|
177
|
-
sorbet-runtime (= 0.6.13224)
|
|
178
|
-
spoom (1.7.14)
|
|
159
|
+
simplecov (1.3.0)
|
|
160
|
+
sorbet (0.6.13499)
|
|
161
|
+
sorbet-static (= 0.6.13499)
|
|
162
|
+
sorbet-runtime (0.6.13499)
|
|
163
|
+
sorbet-static (0.6.13499-aarch64-linux)
|
|
164
|
+
sorbet-static (0.6.13499-universal-darwin)
|
|
165
|
+
sorbet-static (0.6.13499-x86_64-linux)
|
|
166
|
+
sorbet-static-and-runtime (0.6.13499)
|
|
167
|
+
sorbet (= 0.6.13499)
|
|
168
|
+
sorbet-runtime (= 0.6.13499)
|
|
169
|
+
spoom (1.8.7)
|
|
179
170
|
erubi (>= 1.10.0)
|
|
180
171
|
prism (>= 0.28.0)
|
|
181
|
-
rbi (>= 0.
|
|
172
|
+
rbi (>= 0.4.2)
|
|
182
173
|
rbs (>= 4.0.0.dev.5)
|
|
183
174
|
rexml (>= 3.2.6)
|
|
184
175
|
sorbet-static-and-runtime (>= 0.5.10187)
|
|
185
176
|
thor (>= 0.19.2)
|
|
186
|
-
|
|
187
|
-
tapioca (0.19.1)
|
|
177
|
+
tapioca (0.19.2)
|
|
188
178
|
benchmark
|
|
189
179
|
bundler (>= 2.2.25)
|
|
190
180
|
netrc (>= 0.11.0)
|
|
@@ -193,7 +183,7 @@ GEM
|
|
|
193
183
|
require-hooks (>= 0.2.2)
|
|
194
184
|
rubydex (>= 0.1.0.beta10)
|
|
195
185
|
sorbet-static-and-runtime (>= 0.6.12698)
|
|
196
|
-
spoom (>= 1.7.
|
|
186
|
+
spoom (>= 1.7.16)
|
|
197
187
|
thor (>= 1.2.0)
|
|
198
188
|
tsort
|
|
199
189
|
thor (1.5.0)
|
|
@@ -204,7 +194,7 @@ GEM
|
|
|
204
194
|
unicode-emoji (~> 4.1)
|
|
205
195
|
unicode-emoji (4.2.0)
|
|
206
196
|
uri (1.1.1)
|
|
207
|
-
zeitwerk (2.
|
|
197
|
+
zeitwerk (2.8.3)
|
|
208
198
|
|
|
209
199
|
PLATFORMS
|
|
210
200
|
aarch64-linux
|
|
@@ -232,91 +222,85 @@ DEPENDENCIES
|
|
|
232
222
|
tapioca (>= 0.18)
|
|
233
223
|
|
|
234
224
|
CHECKSUMS
|
|
235
|
-
activesupport (8.1.3) sha256=
|
|
225
|
+
activesupport (8.1.3.1) sha256=85458765f25ea48b9019c46b6bb3fa5683197bf4280d9f06710a6e8d7a831376
|
|
236
226
|
ansi (1.6.0) sha256=ac9ea0c0ea8d32fb4e271348e609963ac78882f34b73836c2a02b3622e666658
|
|
237
227
|
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
238
228
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
239
229
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
240
|
-
bigdecimal (4.1.
|
|
230
|
+
bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
|
|
241
231
|
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
|
232
|
+
bundler (4.0.20) sha256=7978a8ac648767f5e635bc522445b79e80a52b907a39a36c2d8085ed6bc762ae
|
|
242
233
|
bundler-audit (0.9.3) sha256=81c8766c71e47d0d28a0f98c7eed028539f21a6ea3cd8f685eb6f42333c9b4e9
|
|
243
|
-
concurrent-ruby (1.3.
|
|
234
|
+
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
244
235
|
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
245
|
-
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
246
|
-
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
|
|
247
236
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
248
237
|
dry-configurable (1.4.0) sha256=e35d1b5f3c081753ef361f564919db79000f32cfa6f20ee3a3ba5921b41b73ce
|
|
249
238
|
dry-core (1.2.0) sha256=0cc5a7da88df397f153947eeeae42e876e999c1e30900f3c536fb173854e96a1
|
|
250
239
|
dry-inflector (1.3.1) sha256=7fb0c2bb04f67638f25c52e7ba39ab435d922a3a5c3cd196120f63accb682dcc
|
|
251
240
|
dry-logic (1.6.0) sha256=da6fedbc0f90fc41f9b0cc7e6f05f5d529d1efaef6c8dcc8e0733f685745cea2
|
|
252
241
|
dry-types (1.9.1) sha256=baebeecdb9f8395d6c9d227b62011279440943e3ef2468fe8ccc1ba11467f178
|
|
253
|
-
erb (6.0.
|
|
242
|
+
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
254
243
|
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
255
|
-
grape (
|
|
256
|
-
grape-entity (1.0
|
|
257
|
-
grape_sorbet (0.
|
|
258
|
-
i18n (1.
|
|
259
|
-
io-console (0.
|
|
244
|
+
grape (4.0.0) sha256=15f93f2754776623397642d6acc3362c62c4c1b48791acab276356a48512816e
|
|
245
|
+
grape-entity (1.1.0) sha256=ab6a1004e57791834e8497d5e85a3c101b72144d8ca31462a26e6d0a380c3d89
|
|
246
|
+
grape_sorbet (0.3.0)
|
|
247
|
+
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
|
|
248
|
+
io-console (0.9.3) sha256=f555049461b0afb78a5448b5be8e7c7b48371347cd48abfc22814764160000dd
|
|
260
249
|
irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
|
|
261
|
-
json (
|
|
262
|
-
language_server-protocol (3.17.0.
|
|
250
|
+
json (3.0.2) sha256=8e6d7e7b11384c21230430cef90b71f14849a34a1f4452796670f7c981bd19df
|
|
251
|
+
language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
|
|
263
252
|
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
264
253
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
265
254
|
minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
|
|
266
255
|
minitest-reporters (1.8.0) sha256=8ce5280fb73ad3178ae525454df169b6f28c1b38b1d088ea91815d3a370ba384
|
|
267
|
-
multi_json (1.21.1) sha256=e6126a31808e3b4d19f483c775ceac34df190dffa62adfb63a165ee14ba68080
|
|
268
256
|
mustermann (4.0.0) sha256=91f67411bb208d1d93c41e6128cb3b0f8ddd9ec7c45966f1007e1c43c08040d7
|
|
269
|
-
mustermann-grape (1.1.0) sha256=8d258a986004c8f01ce4c023c0b037c168a9ed889cf5778068ad54398fa458c5
|
|
270
257
|
netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f
|
|
271
|
-
parallel (2.
|
|
272
|
-
parser (3.3.
|
|
273
|
-
pp (0.6.
|
|
258
|
+
parallel (2.2.0) sha256=e1059c5fd7b649558a0aec38a769f06a42942bdb40503d005a59c352fe011cd8
|
|
259
|
+
parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
|
|
260
|
+
pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
|
|
274
261
|
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
|
|
275
262
|
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
|
276
|
-
psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
|
|
277
263
|
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
278
|
-
rack (3.2.
|
|
264
|
+
rack (3.2.7) sha256=93e13e1c24f93556671d85d2d79fa228c3485815c50d7e2f265b5330c6528fb7
|
|
279
265
|
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
280
266
|
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
|
|
281
|
-
rbi (0.3
|
|
282
|
-
rbs (4.0
|
|
283
|
-
rdoc (
|
|
267
|
+
rbi (0.4.3) sha256=cc090ae62c3246412b992954f54077d6046c9b04f1537a4d24bfae8714503eac
|
|
268
|
+
rbs (4.2.0) sha256=51f7b886dcc05bc09e10b901daa6a81829f6adc03101d6ca9ea4aac6103e0674
|
|
269
|
+
rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469
|
|
284
270
|
regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
|
|
285
|
-
reline (0.
|
|
286
|
-
require-hooks (0.
|
|
271
|
+
reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
|
|
272
|
+
require-hooks (0.5.1) sha256=49a6b14518b91c5b8006d0644ef257af0ca033df23625bd4e314a8c5282191d9
|
|
287
273
|
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
|
|
288
|
-
rubocop (1.
|
|
289
|
-
rubocop-ast (1.
|
|
290
|
-
rubocop-minitest (0.
|
|
291
|
-
rubocop-performance (1.
|
|
274
|
+
rubocop (1.91.0) sha256=9c82b7bf391c5d7e3798c5b9996e22a1fe3bd7468e351dfdeb96140c058296d0
|
|
275
|
+
rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
|
|
276
|
+
rubocop-minitest (0.40.0) sha256=353c698199115f12151144cf0b5a96f69bb9d77b660cf6536df2c4250c672a9d
|
|
277
|
+
rubocop-performance (1.27.0) sha256=eeeb1374d062a368ee1c787b70eb0b0cc4b184cb1f8565f424760946146d61ce
|
|
292
278
|
rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
|
|
293
|
-
rubocop-shopify (
|
|
294
|
-
rubocop-sorbet (0.
|
|
279
|
+
rubocop-shopify (3.0.2) sha256=c2479c2781550dabbbb5850880f42eb36e37527711f10de89c3d11eb0cb31361
|
|
280
|
+
rubocop-sorbet (0.16.0) sha256=7e6970a4de3fcd1c9453aff007f55b09ae617bbb68182591b2668328f6997988
|
|
295
281
|
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
296
|
-
rubydex (0.
|
|
297
|
-
rubydex (0.
|
|
298
|
-
rubydex (0.
|
|
299
|
-
rubydex (0.
|
|
282
|
+
rubydex (0.4.1) sha256=9856af8bfbe656eed95449dd9e2c8239a74662b4bb8563e4b99221dbc065a34a
|
|
283
|
+
rubydex (0.4.1-aarch64-linux) sha256=abc1c9eb22479f60dd015fa81373163c5a71f2700b76bced1282631686bd6271
|
|
284
|
+
rubydex (0.4.1-arm64-darwin) sha256=d23720253876d88fb98954e5d3a1ef9696a269697acf50e3ab53cdfbb2b66b96
|
|
285
|
+
rubydex (0.4.1-x86_64-darwin) sha256=a9681db5bc9be6a62f226d96d6889b6b600d0b09e7576391702aafd29912145b
|
|
286
|
+
rubydex (0.4.1-x86_64-linux) sha256=4e2c8398c9fc585485b54edd28f5ecf76b5a02255e177b6f8402e9d2afffd51b
|
|
300
287
|
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
301
|
-
simplecov (
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
sorbet (0.6.
|
|
305
|
-
sorbet-
|
|
306
|
-
sorbet-static (0.6.
|
|
307
|
-
sorbet-static (0.6.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
spoom (1.7.14) sha256=48da4e39d9a63611aa0132a3656d7e75833fcccb6006d59f7fa879b98c8877c4
|
|
311
|
-
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
|
|
312
|
-
tapioca (0.19.1) sha256=5de94d458950897ffe3d4e86a21eec48bb6a8775af85f80b1486b7ae7ba51823
|
|
288
|
+
simplecov (1.3.0) sha256=d9886307863c1ead47657dcbed869bfffd82318808b09014d8f0ff77dcfe7492
|
|
289
|
+
sorbet (0.6.13499) sha256=e76cf02a8e5b279f63b3fac80568dab02c28d9c3065cae88b76eb71262fe1b77
|
|
290
|
+
sorbet-runtime (0.6.13499) sha256=8c58d7df13178c614733c0d4c05fd8e2f01ef09192e5cb4217082dcbbbd20fbc
|
|
291
|
+
sorbet-static (0.6.13499-aarch64-linux) sha256=93392b4e40c975ba239051430d7a7b1be8e2befc0f51c163c5888446824b5247
|
|
292
|
+
sorbet-static (0.6.13499-universal-darwin) sha256=bdc0cabf2af0511d37d55d2619bd9af3ae63815935abda4956198d0bd72a6857
|
|
293
|
+
sorbet-static (0.6.13499-x86_64-linux) sha256=fb7d826ae2886298896497a0ef13f70008ba48ce04885cfd91de2bb0bd85f797
|
|
294
|
+
sorbet-static-and-runtime (0.6.13499) sha256=fbf85862218c0df62dd384dc908f2397a0cdef4fb247a8718f7890b5b3502153
|
|
295
|
+
spoom (1.8.7) sha256=81960502cdf23aa991f015988aa5dd43325e23ae4318b8e00d541299cbdb70f6
|
|
296
|
+
tapioca (0.19.2) sha256=938731b07811aee8d23871b1aee8861d464fbaf2cfffbf79a62b0c869a5120ec
|
|
313
297
|
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
|
|
314
298
|
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
|
315
299
|
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
316
300
|
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
|
317
301
|
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
|
318
302
|
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
|
|
319
|
-
zeitwerk (2.
|
|
303
|
+
zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5
|
|
320
304
|
|
|
321
305
|
BUNDLED WITH
|
|
322
|
-
4.0.
|
|
306
|
+
4.0.20
|
data/README.md
CHANGED
data/grape_sorbet.gemspec
CHANGED
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
|
|
33
33
|
# Uncomment to register a new dependency of your gem
|
|
34
34
|
spec.add_dependency("activesupport")
|
|
35
|
-
spec.add_dependency("grape", "~>
|
|
35
|
+
spec.add_dependency("grape", "~> 4.0")
|
|
36
36
|
spec.add_dependency("sorbet-runtime", ">= 0.6")
|
|
37
37
|
|
|
38
38
|
# For more information and examples about making a new gem, check out our
|
data/lib/grape_sorbet/version.rb
CHANGED
|
@@ -97,23 +97,14 @@ module Tapioca
|
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
101
|
-
CALLBACKS_METHODS =
|
|
102
|
-
[:before, :before_validation, :after_validation, :after, :finally].freeze,
|
|
103
|
-
T::Array[Symbol],
|
|
104
|
-
)
|
|
100
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/callbacks.rb#L12-L16
|
|
101
|
+
CALLBACKS_METHODS = [:before, :before_validation, :after_validation, :after, :finally].freeze
|
|
105
102
|
|
|
106
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
107
|
-
HTTP_VERB_METHODS =
|
|
108
|
-
[:get, :post, :put, :patch, :delete, :head, :options].freeze,
|
|
109
|
-
T::Array[Symbol],
|
|
110
|
-
)
|
|
103
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape.rb#L69-L78
|
|
104
|
+
HTTP_VERB_METHODS = [:get, :query, :post, :put, :patch, :delete, :head, :options].freeze
|
|
111
105
|
|
|
112
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
113
|
-
NAMESPACE_METHODS =
|
|
114
|
-
[:namespace, :group, :resource, :resources, :segment].freeze,
|
|
115
|
-
T::Array[Symbol],
|
|
116
|
-
)
|
|
106
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L219-L246
|
|
107
|
+
NAMESPACE_METHODS = [:namespace, :group, :resource, :resources, :segment].freeze
|
|
117
108
|
|
|
118
109
|
private
|
|
119
110
|
|
|
@@ -141,7 +132,7 @@ module Tapioca
|
|
|
141
132
|
def create_endpoint_class(api)
|
|
142
133
|
superclass = "::Grape::Endpoint"
|
|
143
134
|
|
|
144
|
-
named_helper_mods = constant.inheritable_setting.
|
|
135
|
+
named_helper_mods = constant.inheritable_setting.helpers.reject { |mod| mod.name.nil? }
|
|
145
136
|
|
|
146
137
|
api.create_class(EndpointClassName, superclass_name: superclass) do |klass|
|
|
147
138
|
named_helper_mods.each do |mod|
|
|
@@ -153,7 +144,7 @@ module Tapioca
|
|
|
153
144
|
sig { params(api: RBI::Scope).void }
|
|
154
145
|
def create_callbacks_methods(api)
|
|
155
146
|
api.create_module(CallbacksMethodsModuleName) do |mod|
|
|
156
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
147
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/callbacks.rb#L12-L16
|
|
157
148
|
CALLBACKS_METHODS.each do |callback|
|
|
158
149
|
mod.create_method(
|
|
159
150
|
callback.to_s,
|
|
@@ -169,22 +160,32 @@ module Tapioca
|
|
|
169
160
|
sig { params(api: RBI::Scope).void }
|
|
170
161
|
def create_request_response_methods(api)
|
|
171
162
|
api.create_module(RequestResponseMethodsModuleName) do |mod|
|
|
172
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
163
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/request_response.rb#L95-L126
|
|
173
164
|
mod.create_method("rescue_from") do |method|
|
|
174
165
|
method.add_rest_param("args")
|
|
175
|
-
method.
|
|
166
|
+
method.add_kw_opt_param("with", "nil")
|
|
167
|
+
method.add_kw_opt_param("rescue_subclasses", "true")
|
|
168
|
+
method.add_kw_opt_param("backtrace", "false")
|
|
169
|
+
method.add_kw_opt_param("original_exception", "false")
|
|
176
170
|
method.add_block_param("block")
|
|
177
171
|
|
|
178
172
|
method.add_sig do |sig|
|
|
179
173
|
sig.add_param("args", "Symbol")
|
|
180
174
|
# Sorbet doesn't support keyword arguments in overloaded functions :(
|
|
181
|
-
# sig.add_param("
|
|
175
|
+
# sig.add_param("with", "T.untyped")
|
|
176
|
+
# sig.add_param("rescue_subclasses", "T::Boolean")
|
|
177
|
+
# sig.add_param("backtrace", "T::Boolean")
|
|
178
|
+
# sig.add_param("original_exception", "T::Boolean")
|
|
182
179
|
sig.add_param("block", "T.nilable(T.proc.bind(#{EndpointClassName}).params(e: Exception).void)")
|
|
183
180
|
sig.return_type = "void"
|
|
184
181
|
end
|
|
182
|
+
|
|
185
183
|
method.add_sig(type_params: ["E"]) do |sig|
|
|
186
184
|
sig.add_param("args", "T::Class[T.all(::Exception, T.type_parameter(:E))]")
|
|
187
|
-
sig.add_param("
|
|
185
|
+
sig.add_param("with", "T.untyped")
|
|
186
|
+
sig.add_param("rescue_subclasses", "T::Boolean")
|
|
187
|
+
sig.add_param("backtrace", "T::Boolean")
|
|
188
|
+
sig.add_param("original_exception", "T::Boolean")
|
|
188
189
|
sig.add_param(
|
|
189
190
|
"block",
|
|
190
191
|
"T.nilable(T.proc.bind(#{EndpointClassName}).params(e: T.type_parameter(:E)).void)",
|
|
@@ -198,24 +199,26 @@ module Tapioca
|
|
|
198
199
|
sig { params(api: RBI::Scope).void }
|
|
199
200
|
def create_routing_methods(api)
|
|
200
201
|
api.create_module(RoutingMethodsModuleName) do |routing_methods_module|
|
|
201
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
202
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L168-L211
|
|
202
203
|
routing_methods_module.create_method(
|
|
203
204
|
"route",
|
|
204
205
|
parameters: [
|
|
205
|
-
create_param("methods", type: "T.
|
|
206
|
-
create_opt_param("paths", type: "T.
|
|
207
|
-
|
|
206
|
+
create_param("methods", type: "T.any(Symbol, String, T::Array[String])"),
|
|
207
|
+
create_opt_param("paths", type: "T.nilable(T.any(String, T::Array[String]))", default: "['/']"),
|
|
208
|
+
create_kw_opt_param("requirements", type: "T.nilable(T::Hash[Symbol, T.untyped])", default: "nil"),
|
|
209
|
+
create_kw_opt_param("anchor", type: "T::Boolean", default: "true"),
|
|
210
|
+
create_kw_rest_param("route_options", type: "T.untyped"),
|
|
208
211
|
create_block_param("block", type: "T.nilable(T.proc.bind(#{EndpointClassName}).void)"),
|
|
209
212
|
],
|
|
210
213
|
return_type: "void",
|
|
211
214
|
)
|
|
212
215
|
|
|
213
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
216
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
214
217
|
HTTP_VERB_METHODS.each do |verb|
|
|
215
218
|
routing_methods_module.create_method(
|
|
216
219
|
verb.to_s,
|
|
217
220
|
parameters: [
|
|
218
|
-
|
|
221
|
+
create_opt_param("path", type: "String", default: "'/'"),
|
|
219
222
|
create_kw_rest_param("options", type: "T.untyped"),
|
|
220
223
|
create_block_param("block", type: "T.nilable(T.proc.bind(#{EndpointClassName}).void)"),
|
|
221
224
|
],
|
|
@@ -223,7 +226,7 @@ module Tapioca
|
|
|
223
226
|
)
|
|
224
227
|
end
|
|
225
228
|
|
|
226
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
229
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L219-L246
|
|
227
230
|
NAMESPACE_METHODS.each do |namespace_method|
|
|
228
231
|
routing_methods_module.create_method(
|
|
229
232
|
namespace_method.to_s,
|
|
@@ -237,7 +240,7 @@ module Tapioca
|
|
|
237
240
|
)
|
|
238
241
|
end
|
|
239
242
|
|
|
240
|
-
# https://github.com/ruby-grape/grape/blob/
|
|
243
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L253-L271
|
|
241
244
|
routing_methods_module.create_method(
|
|
242
245
|
"route_param",
|
|
243
246
|
parameters: [
|
data/rbi/grape.rbi
CHANGED
|
@@ -4,18 +4,20 @@
|
|
|
4
4
|
module Grape
|
|
5
5
|
module DSL
|
|
6
6
|
module Desc
|
|
7
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/desc.rb#L8-L78
|
|
7
8
|
sig do
|
|
8
9
|
params(
|
|
9
10
|
description: String,
|
|
10
|
-
options: T
|
|
11
|
+
options: T.untyped,
|
|
11
12
|
config_block: T.nilable(T.proc.bind(Grape::Util::ApiDescription).void),
|
|
12
13
|
).void
|
|
13
14
|
end
|
|
14
|
-
def desc(description, options
|
|
15
|
+
def desc(description, **options, &config_block); end
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
module Helpers
|
|
18
19
|
module BaseHelper
|
|
20
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/helpers.rb#L103-L106
|
|
19
21
|
sig do
|
|
20
22
|
params(
|
|
21
23
|
name: Symbol,
|
|
@@ -25,6 +27,7 @@ module Grape
|
|
|
25
27
|
def params(name, &block); end
|
|
26
28
|
end
|
|
27
29
|
|
|
30
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/helpers.rb#L6-L35
|
|
28
31
|
sig do
|
|
29
32
|
params(
|
|
30
33
|
new_modules: T.untyped,
|
|
@@ -35,6 +38,7 @@ module Grape
|
|
|
35
38
|
end
|
|
36
39
|
|
|
37
40
|
module InsideRoute
|
|
41
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/inside_route.rb#L21-L35
|
|
38
42
|
sig do
|
|
39
43
|
params(
|
|
40
44
|
message: T.any(String, T::Hash[Symbol, T.untyped]),
|
|
@@ -44,127 +48,166 @@ module Grape
|
|
|
44
48
|
original_exception: T.nilable(Exception),
|
|
45
49
|
).returns(T.noreturn)
|
|
46
50
|
end
|
|
47
|
-
def error!(message, status = nil, additional_headers = nil, backtrace = nil, original_exception = nil)
|
|
48
|
-
end
|
|
51
|
+
def error!(message, status = nil, additional_headers = nil, backtrace = nil, original_exception = nil); end
|
|
49
52
|
|
|
53
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/inside_route.rb#L65-L77
|
|
50
54
|
sig { params(status: T.nilable(T.any(Integer, Symbol))).returns(Integer) }
|
|
51
55
|
def status(status = nil); end
|
|
52
56
|
|
|
57
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/inside_route.rb#L107-L118
|
|
58
|
+
sig { void }
|
|
59
|
+
def return_no_content; end
|
|
60
|
+
|
|
61
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/inside_route.rb#L164-L174
|
|
53
62
|
sig { returns(Grape::Router::Route) }
|
|
54
63
|
def route; end
|
|
55
64
|
end
|
|
56
65
|
|
|
57
66
|
module RequestResponse
|
|
67
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/request_response.rb#L95-L126
|
|
58
68
|
sig do
|
|
59
69
|
params(
|
|
60
70
|
args: Symbol,
|
|
61
71
|
# Sorbet doesn't support keyword arguments in overloaded functions :(
|
|
62
|
-
#
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
# with: T.untyped,
|
|
73
|
+
# rescue_subclasses: T::Boolean,
|
|
74
|
+
# backtrace: T::Boolean,
|
|
75
|
+
# original_exception: T::Boolean,
|
|
76
|
+
block: T.proc.bind(Grape::Endpoint).params(e: Exception).void,
|
|
77
|
+
)
|
|
78
|
+
.void
|
|
65
79
|
end
|
|
66
80
|
sig do
|
|
67
81
|
type_parameters(:E)
|
|
68
82
|
.params(
|
|
69
83
|
args: T::Class[T.all(Exception, T.type_parameter(:E))],
|
|
70
|
-
|
|
84
|
+
with: T.untyped,
|
|
85
|
+
rescue_subclasses: T::Boolean,
|
|
86
|
+
backtrace: T::Boolean,
|
|
87
|
+
original_exception: T::Boolean,
|
|
71
88
|
block: T.proc.bind(Grape::Endpoint).params(e: T.type_parameter(:E)).void,
|
|
72
89
|
)
|
|
73
90
|
.void
|
|
74
91
|
end
|
|
75
|
-
def rescue_from(*args,
|
|
92
|
+
def rescue_from(*args, with: nil, rescue_subclasses: true, backtrace: false, original_exception: false, &block); end
|
|
76
93
|
end
|
|
77
94
|
|
|
78
95
|
module Routing
|
|
79
|
-
# @shim: https://github.com/ruby-grape/grape/blob/
|
|
96
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
97
|
+
sig do
|
|
98
|
+
params(
|
|
99
|
+
path: String,
|
|
100
|
+
options: T.untyped,
|
|
101
|
+
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
102
|
+
).void
|
|
103
|
+
end
|
|
104
|
+
def delete(path = '/', **options, &block); end
|
|
105
|
+
|
|
106
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
80
107
|
sig do
|
|
81
108
|
params(
|
|
82
|
-
|
|
109
|
+
path: String,
|
|
83
110
|
options: T.untyped,
|
|
84
111
|
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
85
112
|
).void
|
|
86
113
|
end
|
|
87
|
-
def
|
|
114
|
+
def get(path = '/', **options, &block); end
|
|
88
115
|
|
|
89
|
-
# @shim: https://github.com/ruby-grape/grape/blob/
|
|
116
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
90
117
|
sig do
|
|
91
118
|
params(
|
|
92
|
-
|
|
119
|
+
path: String,
|
|
93
120
|
options: T.untyped,
|
|
94
121
|
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
95
122
|
).void
|
|
96
123
|
end
|
|
97
|
-
def
|
|
124
|
+
def head(path = '/', **options, &block); end
|
|
98
125
|
|
|
99
|
-
# @shim: https://github.com/ruby-grape/grape/blob/
|
|
126
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
100
127
|
sig do
|
|
101
128
|
params(
|
|
102
|
-
|
|
129
|
+
path: String,
|
|
103
130
|
options: T.untyped,
|
|
104
131
|
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
105
132
|
).void
|
|
106
133
|
end
|
|
107
|
-
def options(
|
|
134
|
+
def options(path = '/', **options, &block); end
|
|
108
135
|
|
|
109
|
-
# @shim: https://github.com/ruby-grape/grape/blob/
|
|
136
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
110
137
|
sig do
|
|
111
138
|
params(
|
|
112
|
-
|
|
139
|
+
path: String,
|
|
113
140
|
options: T.untyped,
|
|
114
141
|
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
115
142
|
).void
|
|
116
143
|
end
|
|
117
|
-
def patch(
|
|
144
|
+
def patch(path = '/', **options, &block); end
|
|
118
145
|
|
|
119
|
-
# @shim: https://github.com/ruby-grape/grape/blob/
|
|
146
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
120
147
|
sig do
|
|
121
148
|
params(
|
|
122
|
-
|
|
149
|
+
path: String,
|
|
123
150
|
options: T.untyped,
|
|
124
151
|
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
125
152
|
).void
|
|
126
153
|
end
|
|
127
|
-
def post(
|
|
154
|
+
def post(path = '/', **options, &block); end
|
|
128
155
|
|
|
129
|
-
# @shim: https://github.com/ruby-grape/grape/blob/
|
|
156
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
130
157
|
sig do
|
|
131
158
|
params(
|
|
132
|
-
|
|
159
|
+
path: String,
|
|
133
160
|
options: T.untyped,
|
|
134
161
|
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
135
162
|
).void
|
|
136
163
|
end
|
|
137
|
-
def put(
|
|
164
|
+
def put(path = '/', **options, &block); end
|
|
138
165
|
|
|
166
|
+
# @shim: https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L213-L217
|
|
167
|
+
sig do
|
|
168
|
+
params(
|
|
169
|
+
path: String,
|
|
170
|
+
options: T.untyped,
|
|
171
|
+
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
172
|
+
).void
|
|
173
|
+
end
|
|
174
|
+
def query(path = '/', **options, &block); end
|
|
175
|
+
|
|
176
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L168-L211
|
|
139
177
|
sig do
|
|
140
178
|
params(
|
|
141
179
|
methods: T.any(Symbol, String, T::Array[String]),
|
|
142
180
|
paths: T.nilable(T.any(String, T::Array[String])),
|
|
143
|
-
|
|
181
|
+
requirements: T.nilable(T::Hash[Symbol, T.untyped]),
|
|
182
|
+
anchor: T::Boolean,
|
|
183
|
+
route_options: T.untyped,
|
|
144
184
|
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
145
185
|
).void
|
|
146
186
|
end
|
|
147
|
-
def route(methods, paths = [
|
|
187
|
+
def route(methods, paths = ['/'], requirements: nil, anchor: true, **route_options, &block); end
|
|
148
188
|
|
|
189
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/routing.rb#L253-L271
|
|
149
190
|
sig do
|
|
150
191
|
params(
|
|
151
192
|
param: Symbol,
|
|
152
|
-
requirements: T.
|
|
193
|
+
requirements: T.untyped,
|
|
153
194
|
type: T.untyped,
|
|
154
|
-
|
|
155
|
-
|
|
195
|
+
options: T.untyped,
|
|
196
|
+
block: T.nilable(T.proc.bind(Grape::Endpoint).void),
|
|
156
197
|
).void
|
|
157
198
|
end
|
|
158
|
-
def route_param(param, requirements: nil, type: nil, **
|
|
199
|
+
def route_param(param, requirements: nil, type: nil, **options, &block); end
|
|
159
200
|
end
|
|
160
201
|
|
|
161
202
|
module Validations
|
|
203
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/dsl/validations.rb#L6-L11
|
|
162
204
|
sig { params(block: T.proc.bind(Grape::Validations::ParamsScope).void).void }
|
|
163
205
|
def params(&block); end
|
|
164
206
|
end
|
|
165
207
|
end
|
|
166
208
|
|
|
167
209
|
class Endpoint
|
|
210
|
+
# https://github.com/ruby-grape/grape/blob/v4.0.0/lib/grape/endpoint.rb#L14
|
|
168
211
|
sig { returns(Grape::Request) }
|
|
169
212
|
def request; end
|
|
170
213
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: grape_sorbet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thatch Health, Inc.
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
32
|
+
version: '4.0'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
39
|
+
version: '4.0'
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: sorbet-runtime
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
98
98
|
- !ruby/object:Gem::Version
|
|
99
99
|
version: '0'
|
|
100
100
|
requirements: []
|
|
101
|
-
rubygems_version: 4.0.
|
|
101
|
+
rubygems_version: 4.0.16
|
|
102
102
|
specification_version: 4
|
|
103
103
|
summary: Sorbet signatures and Tapioca DSL compiler for Grape.
|
|
104
104
|
test_files: []
|