grape_sorbet 0.0.6 → 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/.ruby-version +1 -1
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +38 -41
- data/lib/grape_sorbet/version.rb +1 -1
- data/lib/tapioca/dsl/compilers/grape_endpoints.rb +21 -7
- data/rbi/grape.rbi +29 -1
- metadata +3 -3
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/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.3
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
grape_sorbet (0.0.
|
4
|
+
grape_sorbet (0.0.8)
|
5
5
|
activesupport
|
6
6
|
grape (~> 2.0)
|
7
7
|
sorbet-runtime (~> 0.5.10741)
|
@@ -9,7 +9,7 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (7.1.3.
|
12
|
+
activesupport (7.1.3.4)
|
13
13
|
base64
|
14
14
|
bigdecimal
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -23,18 +23,18 @@ GEM
|
|
23
23
|
ast (2.4.2)
|
24
24
|
base64 (0.2.0)
|
25
25
|
bigdecimal (3.1.8)
|
26
|
-
builder (3.
|
26
|
+
builder (3.3.0)
|
27
27
|
bundler-audit (0.9.1)
|
28
28
|
bundler (>= 1.2.0, < 3)
|
29
29
|
thor (~> 1.0)
|
30
|
-
concurrent-ruby (1.3.
|
30
|
+
concurrent-ruby (1.3.3)
|
31
31
|
connection_pool (2.4.1)
|
32
32
|
docile (1.4.0)
|
33
33
|
drb (2.2.1)
|
34
34
|
dry-core (1.0.1)
|
35
35
|
concurrent-ruby (~> 1.0)
|
36
36
|
zeitwerk (~> 2.6)
|
37
|
-
dry-inflector (1.
|
37
|
+
dry-inflector (1.1.0)
|
38
38
|
dry-logic (1.5.0)
|
39
39
|
concurrent-ruby (~> 1.0)
|
40
40
|
dry-core (~> 1.0, < 2)
|
@@ -46,45 +46,42 @@ GEM
|
|
46
46
|
dry-inflector (~> 1.0)
|
47
47
|
dry-logic (~> 1.4)
|
48
48
|
zeitwerk (~> 2.6)
|
49
|
-
erubi (1.
|
50
|
-
grape (2.
|
51
|
-
activesupport (>=
|
52
|
-
builder
|
49
|
+
erubi (1.13.0)
|
50
|
+
grape (2.1.2)
|
51
|
+
activesupport (>= 6)
|
53
52
|
dry-types (>= 1.1)
|
54
|
-
mustermann-grape (~> 1.
|
55
|
-
rack (>=
|
56
|
-
|
53
|
+
mustermann-grape (~> 1.1.0)
|
54
|
+
rack (>= 2)
|
55
|
+
zeitwerk
|
57
56
|
i18n (1.14.5)
|
58
57
|
concurrent-ruby (~> 1.0)
|
59
58
|
io-console (0.7.2)
|
60
|
-
irb (1.13.
|
59
|
+
irb (1.13.2)
|
61
60
|
rdoc (>= 4.0.0)
|
62
61
|
reline (>= 0.4.2)
|
63
62
|
json (2.7.2)
|
64
63
|
language_server-protocol (3.17.0.3)
|
65
|
-
minitest (5.
|
66
|
-
minitest-reporters (1.
|
64
|
+
minitest (5.24.1)
|
65
|
+
minitest-reporters (1.7.1)
|
67
66
|
ansi
|
68
67
|
builder
|
69
68
|
minitest (>= 5.0)
|
70
69
|
ruby-progressbar
|
71
70
|
mustermann (3.0.0)
|
72
71
|
ruby2_keywords (~> 0.0.1)
|
73
|
-
mustermann-grape (1.0
|
72
|
+
mustermann-grape (1.1.0)
|
74
73
|
mustermann (>= 1.0.0)
|
75
74
|
mutex_m (0.2.0)
|
76
75
|
netrc (0.11.0)
|
77
|
-
parallel (1.
|
78
|
-
parser (3.3.
|
76
|
+
parallel (1.25.1)
|
77
|
+
parser (3.3.3.0)
|
79
78
|
ast (~> 2.4.1)
|
80
79
|
racc
|
81
|
-
prism (0.
|
80
|
+
prism (0.30.0)
|
82
81
|
psych (5.1.2)
|
83
82
|
stringio
|
84
83
|
racc (1.8.0)
|
85
|
-
rack (3.
|
86
|
-
rack-accept (0.4.5)
|
87
|
-
rack (>= 0.4)
|
84
|
+
rack (3.1.6)
|
88
85
|
rainbow (3.1.1)
|
89
86
|
rake (13.2.1)
|
90
87
|
rbi (0.1.13)
|
@@ -93,10 +90,10 @@ GEM
|
|
93
90
|
rdoc (6.7.0)
|
94
91
|
psych (>= 4.0.0)
|
95
92
|
regexp_parser (2.9.2)
|
96
|
-
reline (0.5.
|
93
|
+
reline (0.5.9)
|
97
94
|
io-console (~> 0.5)
|
98
|
-
rexml (3.
|
99
|
-
strscan
|
95
|
+
rexml (3.3.1)
|
96
|
+
strscan
|
100
97
|
rubocop (1.64.1)
|
101
98
|
json (~> 2.3)
|
102
99
|
language_server-protocol (>= 3.17.0)
|
@@ -113,7 +110,7 @@ GEM
|
|
113
110
|
rubocop-minitest (0.35.0)
|
114
111
|
rubocop (>= 1.61, < 2.0)
|
115
112
|
rubocop-ast (>= 1.31.1, < 2.0)
|
116
|
-
rubocop-performance (1.21.
|
113
|
+
rubocop-performance (1.21.1)
|
117
114
|
rubocop (>= 1.48.1, < 2.0)
|
118
115
|
rubocop-ast (>= 1.31.1, < 2.0)
|
119
116
|
rubocop-rake (0.6.0)
|
@@ -130,23 +127,23 @@ GEM
|
|
130
127
|
simplecov_json_formatter (~> 0.1)
|
131
128
|
simplecov-html (0.12.3)
|
132
129
|
simplecov_json_formatter (0.1.4)
|
133
|
-
sorbet (0.5.
|
134
|
-
sorbet-static (= 0.5.
|
135
|
-
sorbet-runtime (0.5.
|
136
|
-
sorbet-static (0.5.
|
137
|
-
sorbet-static (0.5.
|
138
|
-
sorbet-static (0.5.
|
139
|
-
sorbet-static-and-runtime (0.5.
|
140
|
-
sorbet (= 0.5.
|
141
|
-
sorbet-runtime (= 0.5.
|
130
|
+
sorbet (0.5.11466)
|
131
|
+
sorbet-static (= 0.5.11466)
|
132
|
+
sorbet-runtime (0.5.11466)
|
133
|
+
sorbet-static (0.5.11466-aarch64-linux)
|
134
|
+
sorbet-static (0.5.11466-universal-darwin)
|
135
|
+
sorbet-static (0.5.11466-x86_64-linux)
|
136
|
+
sorbet-static-and-runtime (0.5.11466)
|
137
|
+
sorbet (= 0.5.11466)
|
138
|
+
sorbet-runtime (= 0.5.11466)
|
142
139
|
spoom (1.3.2)
|
143
140
|
erubi (>= 1.10.0)
|
144
141
|
prism (>= 0.19.0)
|
145
142
|
sorbet-static-and-runtime (>= 0.5.10187)
|
146
143
|
thor (>= 0.19.2)
|
147
|
-
stringio (3.1.
|
144
|
+
stringio (3.1.1)
|
148
145
|
strscan (3.1.0)
|
149
|
-
tapioca (0.
|
146
|
+
tapioca (0.15.0)
|
150
147
|
bundler (>= 2.2.25)
|
151
148
|
netrc (>= 0.11.0)
|
152
149
|
parallel (>= 1.21.0)
|
@@ -160,10 +157,10 @@ GEM
|
|
160
157
|
concurrent-ruby (~> 1.0)
|
161
158
|
unicode-display_width (2.5.0)
|
162
159
|
yard (0.9.36)
|
163
|
-
yard-sorbet (0.
|
164
|
-
sorbet-runtime
|
165
|
-
yard
|
166
|
-
zeitwerk (2.6.
|
160
|
+
yard-sorbet (0.9.0)
|
161
|
+
sorbet-runtime
|
162
|
+
yard
|
163
|
+
zeitwerk (2.6.16)
|
167
164
|
|
168
165
|
PLATFORMS
|
169
166
|
aarch64-linux
|
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
@@ -29,9 +29,37 @@ module Grape
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
module InsideRoute
|
33
|
+
sig do
|
34
|
+
params(
|
35
|
+
message: T.any(String, T::Hash[Symbol, T.untyped]),
|
36
|
+
status: T.nilable(T.any(Integer, Symbol)),
|
37
|
+
additional_headers: T.nilable(T::Hash[String, String]),
|
38
|
+
).returns(T.noreturn)
|
39
|
+
end
|
40
|
+
def error!(message, status = nil, additional_headers = nil); end
|
41
|
+
|
42
|
+
sig { params(status: T.nilable(T.any(Integer, Symbol))).returns(Integer) }
|
43
|
+
def status(status = nil); end
|
44
|
+
|
45
|
+
sig { returns(Grape::Cookies) }
|
46
|
+
def cookies; end
|
47
|
+
|
48
|
+
sig { returns(Grape::Router::Route) }
|
49
|
+
def route; end
|
50
|
+
end
|
51
|
+
|
32
52
|
module RequestResponse
|
33
53
|
module ClassMethods
|
34
|
-
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
|
35
63
|
def rescue_from(*args, &block); end
|
36
64
|
end
|
37
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-
|
11
|
+
date: 2024-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -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: 3.5.
|
101
|
+
rubygems_version: 3.5.14
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: Sorbet signatures and Tapioca DSL compiler for Grape.
|