grape_sorbet 0.0.7 → 0.0.8
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 +4 -0
- data/Gemfile.lock +1 -1
- data/lib/grape_sorbet/version.rb +1 -1
- data/lib/tapioca/dsl/compilers/grape_endpoints.rb +21 -7
- data/rbi/grape.rbi +9 -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: 59034cd5bc7a489f89c4f228f8f17bee2f6f7a22c7a88c409326a7288ab8ee12
|
4
|
+
data.tar.gz: a4ddf4b002c05e5c58470441d120ae3f5e792b2769d8e614b787dc7492915a95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 946c9e7c15a1419d90c722db1ed70f34b1534c91fbfc6bba3385654871a8fe668d07d9f388080c8f1c521e9ad0a92ef8a3330376a73c2e756e1f08f1d4a86e09
|
7
|
+
data.tar.gz: f4f9c16a0b8ea9b358d2f71d8d330fe3bde840674c1865d52686b3b45e2e06dfd19c427361dd03d2db1df93d40fa5f477b7f1900e71779d624824bf7b91a4f9b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/grape_sorbet/version.rb
CHANGED
@@ -172,16 +172,30 @@ module Tapioca
|
|
172
172
|
|
173
173
|
sig { void }
|
174
174
|
def create_request_response_methods
|
175
|
-
|
175
|
+
sigs = [
|
176
|
+
request_response_methods_module.create_sig(
|
177
|
+
parameters: {
|
178
|
+
args: "Symbol",
|
179
|
+
block: "T.nilable(T.proc.bind(#{EndpointClassName}).params(e: Exception).void)",
|
180
|
+
},
|
181
|
+
return_type: "void",
|
182
|
+
),
|
183
|
+
request_response_methods_module.create_sig(
|
184
|
+
type_parameters: ["E"],
|
185
|
+
parameters: {
|
186
|
+
args: "T::Class[T.all(::Exception, T.type_parameter(:E))]",
|
187
|
+
block: "T.nilable(T.proc.bind(#{EndpointClassName}).params(e: T.type_parameter(:E)).void)",
|
188
|
+
},
|
189
|
+
return_type: "void",
|
190
|
+
),
|
191
|
+
]
|
192
|
+
request_response_methods_module.create_method_with_sigs(
|
176
193
|
"rescue_from",
|
194
|
+
sigs: sigs,
|
177
195
|
parameters: [
|
178
|
-
|
179
|
-
|
180
|
-
"block",
|
181
|
-
type: "T.nilable(T.proc.bind(#{EndpointClassName}).params(e: Exception).void)",
|
182
|
-
),
|
196
|
+
RBI::RestParam.new("args"),
|
197
|
+
RBI::BlockParam.new("block"),
|
183
198
|
],
|
184
|
-
return_type: "void",
|
185
199
|
)
|
186
200
|
end
|
187
201
|
|
data/rbi/grape.rbi
CHANGED
@@ -51,7 +51,15 @@ module Grape
|
|
51
51
|
|
52
52
|
module RequestResponse
|
53
53
|
module ClassMethods
|
54
|
-
sig { params(args:
|
54
|
+
sig { params(args: Symbol, block: T.nilable(T.proc.bind(Grape::Endpoint).params(e: Exception).void)).void }
|
55
|
+
sig do
|
56
|
+
type_parameters(:E)
|
57
|
+
.params(
|
58
|
+
args: T::Class[T.all(Exception, T.type_parameter(:E))],
|
59
|
+
block: T.proc.bind(Grape::Endpoint).params(e: T.type_parameter(:E)).void,
|
60
|
+
)
|
61
|
+
.void
|
62
|
+
end
|
55
63
|
def rescue_from(*args, &block); end
|
56
64
|
end
|
57
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape_sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thatch Health, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|