categoria 0.1.0.pre.beta0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +34 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +5 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +33 -0
  7. data/Rakefile +12 -0
  8. data/categoria.gemspec +48 -0
  9. data/lib/categoria/version.rb +6 -0
  10. data/lib/categoria.rb +9 -0
  11. data/lib/generators/categoria/command_generator.rb +8 -0
  12. data/lib/generators/categoria/domain_generator.rb +35 -0
  13. data/lib/generators/categoria/model_generator.rb +8 -0
  14. data/lib/generators/categoria/templates/domain_module.rb.erb +6 -0
  15. data/sig/categoria.rbs +4 -0
  16. data/sorbet/config +4 -0
  17. data/sorbet/rbi/annotations/.gitattributes +1 -0
  18. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  19. data/sorbet/rbi/annotations/actionpack.rbi +429 -0
  20. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  21. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  22. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  23. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  24. data/sorbet/rbi/annotations/activesupport.rbi +421 -0
  25. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  26. data/sorbet/rbi/annotations/railties.rbi +61 -0
  27. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  28. data/sorbet/rbi/gems/.gitattributes +1 -0
  29. data/sorbet/rbi/gems/actioncable@7.1.3.3.rbi +9 -0
  30. data/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +9 -0
  31. data/sorbet/rbi/gems/actionmailer@7.1.3.3.rbi +9 -0
  32. data/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +9 -0
  33. data/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +9 -0
  34. data/sorbet/rbi/gems/actionview@7.1.3.3.rbi +9 -0
  35. data/sorbet/rbi/gems/activejob@7.1.3.3.rbi +9 -0
  36. data/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +9 -0
  37. data/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +9 -0
  38. data/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +9 -0
  39. data/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +11 -0
  40. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  41. data/sorbet/rbi/gems/base64@0.2.0.rbi +9 -0
  42. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +9 -0
  43. data/sorbet/rbi/gems/builder@3.2.4.rbi +9 -0
  44. data/sorbet/rbi/gems/concurrent-ruby@1.3.1.rbi +9 -0
  45. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  46. data/sorbet/rbi/gems/crass@1.0.6.rbi +9 -0
  47. data/sorbet/rbi/gems/date@3.3.4.rbi +73 -0
  48. data/sorbet/rbi/gems/drb@2.2.1.rbi +9 -0
  49. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  50. data/sorbet/rbi/gems/globalid@1.2.1.rbi +9 -0
  51. data/sorbet/rbi/gems/i18n@1.14.5.rbi +9 -0
  52. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  53. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  54. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  55. data/sorbet/rbi/gems/loofah@2.22.0.rbi +9 -0
  56. data/sorbet/rbi/gems/mail@2.8.1.rbi +9 -0
  57. data/sorbet/rbi/gems/marcel@1.0.4.rbi +9 -0
  58. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +9 -0
  59. data/sorbet/rbi/gems/minitest@5.23.1.rbi +1555 -0
  60. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +9 -0
  61. data/sorbet/rbi/gems/net-imap@0.4.11.rbi +9 -0
  62. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +9 -0
  63. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +282 -0
  64. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +9 -0
  65. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  66. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +9 -0
  67. data/sorbet/rbi/gems/nokogiri@1.16.5.rbi +9 -0
  68. data/sorbet/rbi/gems/parallel@1.24.0.rbi +281 -0
  69. data/sorbet/rbi/gems/parser@3.3.2.0.rbi +5519 -0
  70. data/sorbet/rbi/gems/prism@0.29.0.rbi +37987 -0
  71. data/sorbet/rbi/gems/psych@5.1.2.rbi +1732 -0
  72. data/sorbet/rbi/gems/racc@1.8.0.rbi +162 -0
  73. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +9 -0
  74. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +9 -0
  75. data/sorbet/rbi/gems/rack@3.0.11.rbi +2910 -0
  76. data/sorbet/rbi/gems/rackup@2.1.0.rbi +390 -0
  77. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +9 -0
  78. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +9 -0
  79. data/sorbet/rbi/gems/rails@7.1.3.3.rbi +9 -0
  80. data/sorbet/rbi/gems/railties@7.1.3.3.rbi +9 -0
  81. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  82. data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
  83. data/sorbet/rbi/gems/rbi@0.1.13.rbi +3078 -0
  84. data/sorbet/rbi/gems/rdoc@6.7.0.rbi +12719 -0
  85. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  86. data/sorbet/rbi/gems/reline@0.5.8.rbi +9 -0
  87. data/sorbet/rbi/gems/rexml@3.2.8.rbi +4794 -0
  88. data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +7045 -0
  89. data/sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi +2611 -0
  90. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  91. data/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi +1607 -0
  92. data/sorbet/rbi/gems/rubocop@1.64.1.rbi +58104 -0
  93. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  94. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4421 -0
  95. data/sorbet/rbi/gems/stringio@3.1.0.rbi +9 -0
  96. data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
  97. data/sorbet/rbi/gems/tapioca@0.14.3.rbi +3534 -0
  98. data/sorbet/rbi/gems/thor@1.3.1.rbi +4352 -0
  99. data/sorbet/rbi/gems/timeout@0.4.1.rbi +143 -0
  100. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +9 -0
  101. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  102. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2607 -0
  103. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +9 -0
  104. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +9 -0
  105. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +429 -0
  106. data/sorbet/rbi/gems/yard@0.9.36.rbi +18412 -0
  107. data/sorbet/rbi/gems/zeitwerk@2.6.15.rbi +9 -0
  108. data/sorbet/rbi/todo.rbi +46 -0
  109. data/sorbet/tapioca/config.yml +13 -0
  110. data/sorbet/tapioca/require.rb +4 -0
  111. metadata +339 -0
@@ -0,0 +1,429 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ class ActionController::API
8
+ MODULES = T.let(T.unsafe(nil), T::Array[T.untyped])
9
+ end
10
+
11
+ module ActionController::Flash::ClassMethods
12
+ sig { params(types: Symbol).void }
13
+ def add_flash_types(*types); end
14
+ end
15
+
16
+ module ActionController::Helpers::ClassMethods
17
+ sig { returns(ActionView::Base) }
18
+ def helpers; end
19
+ end
20
+
21
+ class ActionController::Metal < AbstractController::Base
22
+ sig { returns(ActionController::Parameters) }
23
+ def params; end
24
+
25
+ sig { returns(ActionDispatch::Request) }
26
+ def request; end
27
+
28
+ sig { returns(ActionDispatch::Response) }
29
+ def response; end
30
+ end
31
+
32
+ module ActionController::MimeResponds
33
+ sig { params(mimes: T.nilable(Symbol), block: T.nilable(T.proc.params(arg0: ActionController::MimeResponds::Collector).void)).void }
34
+ def respond_to(*mimes, &block); end
35
+ end
36
+
37
+ class ActionController::Parameters
38
+ sig { params(other: T.any(String, ActionController::Parameters)).returns(T::Boolean) }
39
+ def ==(other); end
40
+
41
+ sig { params(key: T.any(String, Symbol), value: T.untyped).void }
42
+ def []=(key, value); end
43
+
44
+ sig { returns(T.nilable(T::Array[T.any(String, Symbol)])) }
45
+ def always_permitted_parameters; end
46
+
47
+ sig { params(obj: T.nilable(T::Array[T.any(String, Symbol)])).void }
48
+ def always_permitted_parameters=(obj); end
49
+
50
+ sig { returns(T.untyped) }
51
+ def deep_dup; end
52
+
53
+ sig { params(key: T.any(String, Symbol), block: T.untyped).returns(T.untyped) }
54
+ def delete(key, &block); end
55
+
56
+ sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
57
+ def dig(*keys); end
58
+
59
+ sig { params(block: T.untyped).returns(T.untyped) }
60
+ def each_pair(&block); end
61
+
62
+ # each is an alias of each_pair
63
+ sig { params(block: T.untyped).returns(T.untyped) }
64
+ def each(&block); end
65
+
66
+ sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
67
+ def except(*keys); end
68
+
69
+ sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
70
+ def extract!(*keys); end
71
+
72
+ sig { params(key: T.any(String, Symbol), args: T.untyped).returns(T.untyped) }
73
+ def fetch(key, *args); end
74
+
75
+ sig { returns(String) }
76
+ def inspect; end
77
+
78
+ sig { params(other_hash: T.untyped, block: T.untyped).returns(ActionController::Parameters) }
79
+ def merge!(other_hash, &block); end
80
+
81
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
82
+ def merge(other_hash); end
83
+
84
+ sig { returns(T.untyped) }
85
+ def parameters; end
86
+
87
+ sig { returns(T.self_type) }
88
+ def permit!; end
89
+
90
+ # You can pass _a lot_ of stuff to permit, so filters is left untyped for now.
91
+ sig { params(filters: T.untyped).returns(ActionController::Parameters) }
92
+ def permit(*filters); end
93
+
94
+ sig { params(new_permitted: T.untyped).void }
95
+ def permitted=(new_permitted); end
96
+
97
+ sig { returns(T::Boolean) }
98
+ def permitted?; end
99
+
100
+ sig { params(block: T.untyped).returns(T.untyped) }
101
+ def reject!(&block); end
102
+
103
+ # delete_if is an alias of reject!
104
+ sig { params(block: T.untyped).returns(T.untyped) }
105
+ def delete_if(&block); end
106
+
107
+ sig { params(block: T.untyped).returns(T.untyped) }
108
+ def reject(&block); end
109
+
110
+ sig { params(key: T.any(String, Symbol)).returns(T.untyped) }
111
+ def [](key); end
112
+
113
+ sig { params(key: T.any(String, Symbol)).returns(ActionController::Parameters) }
114
+ sig { params(key: T::Array[T.any(String, Symbol)]).returns(T::Array[ActionController::Parameters]) }
115
+ def require(key); end
116
+
117
+ sig { params(key: T.any(String, Symbol)).returns(ActionController::Parameters) }
118
+ sig { params(key: T::Array[T.any(String, Symbol)]).returns(T::Array[ActionController::Parameters]) }
119
+ def required(key); end
120
+
121
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
122
+ def reverse_merge!(other_hash); end
123
+
124
+ # with_defaults! is an alias of reverse_merge!
125
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
126
+ def with_defaults!(other_hash); end
127
+
128
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
129
+ def reverse_merge(other_hash); end
130
+
131
+ # with_defaults is an alias of reverse_merge
132
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
133
+ def with_defaults(other_hash); end
134
+
135
+ sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
136
+ def select!(&block); end
137
+
138
+ # keep_if is an alias of select!
139
+ sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
140
+ def keep_if(&block); end
141
+
142
+ sig { params(block: T.untyped).returns(ActionController::Parameters) }
143
+ def select(&block); end
144
+
145
+ sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
146
+ def slice!(*keys); end
147
+
148
+ sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
149
+ def slice(*keys); end
150
+
151
+ sig { params(block: T.nilable(Proc)).returns(ActiveSupport::HashWithIndifferentAccess) }
152
+ def to_h(&block); end
153
+
154
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
155
+ def to_hash; end
156
+
157
+ # to_param is an alias of to_query
158
+ sig { params(args: String).returns(T.nilable(String)) }
159
+ def to_param(*args); end
160
+
161
+ sig { params(args: String).returns(T.nilable(String)) }
162
+ def to_query(*args); end
163
+
164
+ sig { returns(ActiveSupport::HashWithIndifferentAccess) }
165
+ def to_unsafe_h; end
166
+
167
+ # to_unsafe_hash is an alias of to_unsafe_h
168
+ sig { returns(ActiveSupport::HashWithIndifferentAccess) }
169
+ def to_unsafe_hash; end
170
+
171
+ sig { params(block: T.untyped).returns(ActionController::Parameters) }
172
+ def transform_keys!(&block); end
173
+
174
+ sig { params(block: T.untyped).returns(ActionController::Parameters) }
175
+ def transform_keys(&block); end
176
+
177
+ sig { returns(ActionController::Parameters) }
178
+ def transform_values!; end
179
+
180
+ sig { returns(ActionController::Parameters) }
181
+ def transform_values; end
182
+
183
+ sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
184
+ def values_at(*keys); end
185
+
186
+ sig { returns(T.any(Symbol, T::Boolean)) }
187
+ def self.action_on_unpermitted_parameters; end
188
+
189
+ sig { params(obj: T.any(Symbol, T::Boolean)).void }
190
+ def self.action_on_unpermitted_parameters=(obj); end
191
+
192
+ sig { returns(T::Array[T.any(String, Symbol)]) }
193
+ def self.always_permitted_parameters; end
194
+
195
+ sig { params(obj: T::Array[T.any(String, Symbol)]).void }
196
+ def self.always_permitted_parameters=(obj); end
197
+
198
+ sig { returns(T::Boolean) }
199
+ def self.permit_all_parameters; end
200
+
201
+ sig { params(obj: T::Boolean).void }
202
+ def self.permit_all_parameters=(obj); end
203
+ end
204
+
205
+ module ActionController::RequestForgeryProtection
206
+ sig { returns(T::Boolean) }
207
+ def protect_against_forgery?; end
208
+
209
+ sig { params(form_options: T::Hash[T.untyped, T.untyped]).returns(String) }
210
+ def form_authenticity_token(form_options: {}); end
211
+ end
212
+
213
+ module ActionController::RequestForgeryProtection::ClassMethods
214
+ sig { params(options: T::Hash[T.untyped, T.untyped]).void }
215
+ def skip_forgery_protection(options = T.unsafe(nil)); end
216
+ end
217
+
218
+ module ActionController::StrongParameters
219
+ sig { returns(ActionController::Parameters) }
220
+ def params; end
221
+ end
222
+
223
+ module ActionDispatch::Http::Parameters
224
+ sig { returns(ActionController::Parameters) }
225
+ def parameters; end
226
+
227
+ # params is an alias of parameters
228
+ sig { returns(ActionController::Parameters) }
229
+ def params; end
230
+ end
231
+
232
+ module ActionDispatch::Integration::Runner
233
+ # @method_missing: delegated to ActionDispatch::Integration::Session
234
+ sig { params(host: String).returns(String) }
235
+ def host!(host); end
236
+
237
+ # @method_missing: delegated to ActionDispatch::Integration::Session
238
+ sig { params(flag: T::Boolean).returns(T::Boolean) }
239
+ def https!(flag = true); end
240
+ end
241
+
242
+ class ActionDispatch::IntegrationTest
243
+ # The following methods are accessible on `IntegrationTest`
244
+ # through the following delegation chain:
245
+ # - `IntegrationTest` includes `IntegrationTest::Behavior`
246
+ # - `IntegrationTest::Behavior` includes `Integration::Runner`
247
+ # - `Integration::Runner#method_missing` delegates to `Integration::Session`
248
+ #
249
+ # Then `Integration::Session` either implements the methods
250
+ # directly or further delegates to `TestProcess` (included) or
251
+ # `TestResponse` / `Request` (via `delegate`).
252
+ #
253
+ # Cf. https://github.com/Shopify/rbi-central/pull/138 for more context.
254
+ # @method_missing: delegated to ActionDispatch::TestProcess
255
+ sig { returns(ActionDispatch::Flash::FlashHash) }
256
+ def flash; end
257
+
258
+ # @method_missing: delegated to ActionDispatch::TestProcess
259
+ sig { returns(ActionDispatch::Request::Session) }
260
+ def session; end
261
+
262
+ # @method_missing: delegated to ActionDispatch::TestResponse
263
+ sig { returns(T.nilable(Integer)) }
264
+ def status; end
265
+
266
+ # @method_missing: delegated to ActionDispatch::TestResponse
267
+ sig { returns(T.nilable(String)) }
268
+ def status_message; end
269
+
270
+ # @method_missing: delegated to ActionDispatch::TestResponse
271
+ sig { returns(ActionDispatch::Response::Header) }
272
+ def headers; end
273
+
274
+ # @method_missing: delegated to ActionDispatch::TestResponse
275
+ sig { returns(T.nilable(String)) }
276
+ def body; end
277
+
278
+ # @method_missing: delegated to ActionDispatch::TestResponse
279
+ sig { returns(T.nilable(T::Boolean)) }
280
+ def redirect?; end
281
+
282
+ # @method_missing: delegated to ActionDispatch::Request
283
+ sig { returns(T.nilable(String)) }
284
+ def path; end
285
+
286
+ # @method_missing: delegated to ActionDispatch::Integration::Session
287
+ sig { returns(String) }
288
+ def host; end
289
+
290
+ # @method_missing: delegated to ActionDispatch::Integration::Session
291
+ sig { params(host: String).returns(String) }
292
+ attr_writer :host
293
+
294
+ # @method_missing: delegated to ActionDispatch::Integration::Session
295
+ sig { returns(T.nilable(String)) }
296
+ attr_accessor :remote_addr
297
+
298
+ # @method_missing: delegated to ActionDispatch::Integration::Session
299
+ sig { returns(T.nilable(String)) }
300
+ attr_accessor :accept
301
+
302
+ # @method_missing: delegated to ActionDispatch::Integration::Session
303
+ sig { returns(Rack::Test::CookieJar) }
304
+ def cookies; end
305
+
306
+ # @method_missing: delegated to ActionDispatch::Integration::Session
307
+ sig { returns(T.nilable(ActionController::Base)) }
308
+ attr_reader :controller
309
+
310
+ # @method_missing: delegated to ActionDispatch::Integration::Session
311
+ sig { returns(ActionDispatch::TestRequest) }
312
+ attr_reader :request
313
+
314
+ # @method_missing: delegated to ActionDispatch::Integration::Session
315
+ sig { returns(ActionDispatch::TestResponse) }
316
+ attr_reader :response
317
+
318
+ # @method_missing: delegated to ActionDispatch::Integration::Session
319
+ sig { returns(Integer) }
320
+ attr_accessor :request_count
321
+ end
322
+
323
+ class ActionDispatch::Request
324
+ # Provides access to the request's HTTP headers, for example:
325
+ #
326
+ # ```ruby
327
+ # request.headers["Content-Type"] # => "text/plain"
328
+ # ```
329
+ sig { returns(ActionDispatch::Http::Headers) }
330
+ def headers; end
331
+
332
+ # Returns a `String` with the last requested path including their params.
333
+ #
334
+ # ```ruby
335
+ # # get '/foo'
336
+ # request.original_fullpath # => '/foo'
337
+ #
338
+ # # get '/foo?bar'
339
+ # request.original_fullpath # => '/foo?bar'
340
+ # ```
341
+ sig { returns(String) }
342
+ def original_fullpath; end
343
+
344
+ # Returns the `String` full path including params of the last URL requested.
345
+ #
346
+ # ```ruby
347
+ # # get "/articles"
348
+ # request.fullpath # => "/articles"
349
+ #
350
+ # # get "/articles?page=2"
351
+ # request.fullpath # => "/articles?page=2"
352
+ # ```
353
+ sig { returns(String) }
354
+ def fullpath; end
355
+
356
+ # Returns the original request URL as a `String`.
357
+ #
358
+ # ```ruby
359
+ # # get "/articles?page=2"
360
+ # request.original_url # => "http://www.example.com/articles?page=2"
361
+ # ```
362
+ sig { returns(String) }
363
+ def original_url; end
364
+
365
+ # The `String` MIME type of the request.
366
+ #
367
+ # ```
368
+ # # get "/articles"
369
+ # request.media_type # => "application/x-www-form-urlencoded"
370
+ # ```
371
+ sig { returns(String) }
372
+ def media_type; end
373
+
374
+ # Returns the content length of the request as an integer.
375
+ sig { returns(Integer) }
376
+ def content_length; end
377
+
378
+ # Returns the IP address of client as a `String`.
379
+ sig { returns(String) }
380
+ def ip; end
381
+
382
+ # Returns the IP address of client as a `String`,
383
+ # usually set by the RemoteIp middleware.
384
+ sig { returns(String) }
385
+ def remote_ip; end
386
+
387
+ # Returns the unique request id, which is based on either the X-Request-Id header that can
388
+ # be generated by a firewall, load balancer, or web server or by the RequestId middleware
389
+ # (which sets the action_dispatch.request_id environment variable).
390
+ #
391
+ # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.
392
+ # This relies on the Rack variable set by the ActionDispatch::RequestId middleware.
393
+ sig { returns(T.nilable(String)) }
394
+ def request_id; end
395
+
396
+ # Returns true if the request has a header matching the given key parameter.
397
+ #
398
+ # ```ruby
399
+ # request.key? :ip_spoofing_check # => true
400
+ # ```
401
+ sig { params(key: Symbol).returns(T::Boolean) }
402
+ def key?(key); end
403
+
404
+ # True if the request came from localhost, 127.0.0.1, or ::1.
405
+ sig { returns(T::Boolean) }
406
+ def local?; end
407
+ end
408
+
409
+ module ActionDispatch::Routing::Mapper::Resources
410
+ sig { params(name: T.untyped).returns(T.untyped) }
411
+ def action_path(name); end
412
+
413
+ sig { params(block: T.untyped).returns(T.untyped) }
414
+ def collection(&block); end
415
+
416
+ sig { params(block: T.untyped).returns(T.untyped) }
417
+ def member(&block); end
418
+
419
+ sig { returns(T.untyped) }
420
+ def shallow; end
421
+
422
+ sig { returns(T::Boolean) }
423
+ def shallow?; end
424
+ end
425
+
426
+ class ActionDispatch::Routing::RouteSet
427
+ sig { params(block: T.proc.bind(ActionDispatch::Routing::Mapper).void).void }
428
+ def draw(&block); end
429
+ end
@@ -0,0 +1,75 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ module ActionView
8
+ TemplateError = T.type_alias { Template::Error }
9
+
10
+ class MissingTemplate < ActionView::ActionViewError
11
+ sig { returns(String) }
12
+ def path; end
13
+ end
14
+ end
15
+
16
+ class ActionView::Helpers::FormBuilder
17
+ sig { returns(T.untyped) }
18
+ def object; end
19
+ end
20
+
21
+ module ActionView::Helpers::NumberHelper
22
+ sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
23
+ def number_to_currency(number, options = T.unsafe(nil)); end
24
+
25
+ sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
26
+ def number_to_human(number, options = T.unsafe(nil)); end
27
+
28
+ sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
29
+ def number_to_human_size(number, options = T.unsafe(nil)); end
30
+
31
+ sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
32
+ def number_to_percentage(number, options = T.unsafe(nil)); end
33
+
34
+ sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
35
+ def number_to_phone(number, options = T.unsafe(nil)); end
36
+
37
+ sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
38
+ def number_with_delimiter(number, options = T.unsafe(nil)); end
39
+
40
+ sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
41
+ def number_with_precision(number, options = T.unsafe(nil)); end
42
+ end
43
+
44
+ module ActionView::Helpers::SanitizeHelper
45
+ mixes_in_class_methods ActionView::Helpers::SanitizeHelper::ClassMethods
46
+ end
47
+
48
+ module ActionView::Helpers::UrlHelper
49
+ extend ActiveSupport::Concern
50
+ include ActionView::Helpers::TagHelper
51
+ mixes_in_class_methods ActionView::Helpers::UrlHelper::ClassMethods
52
+
53
+ sig { params(name: T.nilable(String), options: T.untyped, html_options: T.untyped, block: T.untyped).returns(ActiveSupport::SafeBuffer) }
54
+ def link_to(name = nil, options = nil, html_options = nil, &block); end
55
+
56
+ sig { params(condition: T.untyped, name: String, options: T.untyped, html_options: T.untyped, block: T.untyped).returns(T.untyped) }
57
+ def link_to_if(condition, name, options = {}, html_options = {}, &block); end
58
+ end
59
+
60
+ module ActionView::Layouts
61
+ mixes_in_class_methods ActionView::Layouts::ClassMethods
62
+ end
63
+
64
+ module ActionView::Rendering
65
+ mixes_in_class_methods ActionView::Rendering::ClassMethods
66
+ end
67
+
68
+ module ActionView::ViewPaths
69
+ mixes_in_class_methods ActionView::ViewPaths::ClassMethods
70
+ end
71
+
72
+ module ActionView::ViewPaths::ClassMethods
73
+ sig { params(value: T.any(String, T::Array[String])).void }
74
+ def append_view_path(value); end
75
+ end
@@ -0,0 +1,44 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ class ActiveJob::Base
8
+ sig { params(blk: T.proc.bind(T.attached_class).params(job: T.attached_class).void).void }
9
+ def self.after_discard(&blk); end
10
+
11
+ sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
12
+ def self.after_enqueue(*filters, &blk); end
13
+
14
+ sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
15
+ def self.after_perform(*filters, &blk); end
16
+
17
+ sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class, block: T.untyped).void)).void }
18
+ def self.around_enqueue(*filters, &blk); end
19
+
20
+ sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class, block: T.untyped).void)).void }
21
+ def self.around_perform(*filters, &blk); end
22
+
23
+ sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
24
+ def self.before_enqueue(*filters, &blk); end
25
+
26
+ sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
27
+ def self.before_perform(*filters, &blk); end
28
+
29
+ sig { type_parameters(:ExceptionType).params(exceptions: T::Class[T.type_parameter(:ExceptionType)], block: T.nilable(T.proc.params(job: T.attached_class, error: T.type_parameter(:ExceptionType)).void)).void }
30
+ sig { params(exceptions: String, block: T.nilable(T.proc.params(job: T.attached_class, error: T.untyped).void)).void }
31
+ def self.discard_on(*exceptions, &block); end
32
+
33
+ sig { params(klasses: T.any(Module, String), with: T.nilable(Symbol), block: T.nilable(T.proc.params(exception: T.untyped).void)).void }
34
+ def self.rescue_from(*klasses, with: nil, &block); end
35
+
36
+ sig { params(exceptions: T.any(Module, String), wait: T.any(ActiveSupport::Duration, Integer, Symbol, T.proc.params(executions: Integer).returns(Integer)), attempts: T.any(Integer, Symbol), queue: T.nilable(T.any(String, Symbol)), priority: T.untyped, jitter: Numeric, block: T.nilable(T.proc.params(job: T.attached_class, error: T.untyped).void)).void }
37
+ def self.retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: JITTER_DEFAULT, &block); end
38
+
39
+ sig { params(part_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.bind(T.attached_class).returns(T.untyped))).void }
40
+ def self.queue_as(part_name = nil, &block); end
41
+
42
+ sig { params(priority: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).returns(T.untyped))).void }
43
+ def self.queue_with_priority(priority = nil, &block); end
44
+ end
@@ -0,0 +1,89 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ class ActiveModel::Errors
8
+ Elem = type_member { { fixed: ActiveModel::Error } }
9
+
10
+ sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) }
11
+ def [](attribute); end
12
+
13
+ sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(ActiveModel::Error) }
14
+ def add(attribute, type = :invalid, **options); end
15
+
16
+ sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T::Boolean) }
17
+ def added?(attribute, type = :invalid, options = {}); end
18
+
19
+ sig { params(options: T.untyped).returns(T::Hash[T.untyped, T.untyped]) }
20
+ def as_json(options = nil); end
21
+
22
+ sig { returns(T::Array[Symbol]) }
23
+ def attribute_names; end
24
+
25
+ sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T.nilable(T::Array[String])) }
26
+ def delete(attribute, type = nil, **options); end
27
+
28
+ sig { returns(T::Hash[Symbol, T::Array[T::Hash[Symbol, T.untyped]]]) }
29
+ def details; end
30
+
31
+ sig { returns(T::Array[Elem]) }
32
+ def errors; end
33
+
34
+ sig { params(attribute: T.any(Symbol, String), message: String).returns(String) }
35
+ def full_message(attribute, message); end
36
+
37
+ sig { returns(T::Array[String]) }
38
+ def full_messages; end
39
+
40
+ sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) }
41
+ def full_messages_for(attribute); end
42
+
43
+ sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(String) }
44
+ def generate_message(attribute, type = :invalid, options = {}); end
45
+
46
+ sig { returns(T::Hash[Symbol, T::Array[ActiveModel::Error]]) }
47
+ def group_by_attribute; end
48
+
49
+ sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) }
50
+ def has_key?(attribute); end
51
+
52
+ sig { params(error: ActiveModel::Error, override_options: T.untyped).returns(T::Array[ActiveModel::Error]) }
53
+ def import(error, override_options = {}); end
54
+
55
+ sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) }
56
+ def include?(attribute); end
57
+
58
+ sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) }
59
+ def key?(attribute); end
60
+
61
+ sig { params(other: T.untyped).returns(T::Array[ActiveModel::Error]) }
62
+ def merge!(other); end
63
+
64
+ sig { returns(T::Hash[Symbol, T::Array[String]]) }
65
+ def messages; end
66
+
67
+ sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) }
68
+ def messages_for(attribute); end
69
+
70
+ sig { returns(T::Array[Elem]) }
71
+ def objects; end
72
+
73
+ sig { params(attribute: T.any(Symbol, String), type: T.untyped).returns(T::Boolean) }
74
+ def of_kind?(attribute, type = :invalid); end
75
+
76
+ sig { returns(T::Array[String]) }
77
+ def to_a; end
78
+
79
+ sig { params(full_messages: T.untyped).returns(T::Hash[Symbol, T::Array[String]]) }
80
+ def to_hash(full_messages = false); end
81
+
82
+ sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T::Array[ActiveModel::Error]) }
83
+ def where(attribute, type = nil, **options); end
84
+ end
85
+
86
+ module ActiveModel::Validations
87
+ sig { returns(ActiveModel::Errors) }
88
+ def errors; end
89
+ end