konstruo 1.0.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.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +22 -0
  4. data/.tool-versions +1 -0
  5. data/CHANGELOG.md +21 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +35 -0
  8. data/Rakefile +10 -0
  9. data/lib/konstruo/mapper.rb +120 -0
  10. data/lib/konstruo/version.rb +6 -0
  11. data/lib/konstruo.rb +18 -0
  12. data/sorbet/config +4 -0
  13. data/sorbet/rbi/annotations/.gitattributes +1 -0
  14. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  15. data/sorbet/rbi/annotations/actionpack.rbi +430 -0
  16. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  17. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +454 -0
  21. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  22. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  23. data/sorbet/rbi/annotations/railties.rbi +61 -0
  24. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  25. data/sorbet/rbi/dsl/.gitattributes +1 -0
  26. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  27. data/sorbet/rbi/gems/.gitattributes +1 -0
  28. data/sorbet/rbi/gems/actioncable@7.2.1.rbi +3096 -0
  29. data/sorbet/rbi/gems/actionmailbox@7.2.1.rbi +1832 -0
  30. data/sorbet/rbi/gems/actionmailer@7.2.1.rbi +2664 -0
  31. data/sorbet/rbi/gems/actionpack@7.2.1.rbi +20536 -0
  32. data/sorbet/rbi/gems/actiontext@7.2.1.rbi +1697 -0
  33. data/sorbet/rbi/gems/actionview@7.2.1.rbi +15752 -0
  34. data/sorbet/rbi/gems/activejob@7.2.1.rbi +2828 -0
  35. data/sorbet/rbi/gems/activemodel@7.2.1.rbi +6762 -0
  36. data/sorbet/rbi/gems/activerecord@7.2.1.rbi +41433 -0
  37. data/sorbet/rbi/gems/activestorage@7.2.1.rbi +3247 -0
  38. data/sorbet/rbi/gems/activesupport@7.2.1.rbi +21142 -0
  39. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  40. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  41. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +78 -0
  42. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  43. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +11645 -0
  44. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  45. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  46. data/sorbet/rbi/gems/dashbrains-rubocop-config@1.0.4.rbi +9 -0
  47. data/sorbet/rbi/gems/date@3.3.4.rbi +75 -0
  48. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  49. data/sorbet/rbi/gems/drb@2.2.1.rbi +1347 -0
  50. data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
  51. data/sorbet/rbi/gems/globalid@1.2.1.rbi +749 -0
  52. data/sorbet/rbi/gems/i18n@1.14.5.rbi +2359 -0
  53. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  54. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  55. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  56. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  57. data/sorbet/rbi/gems/loofah@2.22.0.rbi +1081 -0
  58. data/sorbet/rbi/gems/mail@2.8.1.rbi +8658 -0
  59. data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
  60. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
  61. data/sorbet/rbi/gems/minitest@5.25.1.rbi +1546 -0
  62. data/sorbet/rbi/gems/net-imap@0.4.16.rbi +10845 -0
  63. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
  64. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  65. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +1228 -0
  66. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  67. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +293 -0
  68. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  69. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  70. data/sorbet/rbi/gems/parser@3.3.5.0.rbi +5519 -0
  71. data/sorbet/rbi/gems/prism@1.0.0.rbi +35493 -0
  72. data/sorbet/rbi/gems/psych@5.1.2.rbi +1769 -0
  73. data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
  74. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +727 -0
  75. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +747 -0
  76. data/sorbet/rbi/gems/rack@3.1.7.rbi +4902 -0
  77. data/sorbet/rbi/gems/rackup@2.1.0.rbi +390 -0
  78. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +758 -0
  79. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +785 -0
  80. data/sorbet/rbi/gems/rails@7.2.1.rbi +9 -0
  81. data/sorbet/rbi/gems/railties@7.2.1.rbi +3824 -0
  82. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  83. data/sorbet/rbi/gems/rake@13.2.1.rbi +3046 -0
  84. data/sorbet/rbi/gems/rbi@0.2.0.rbi +4105 -0
  85. data/sorbet/rbi/gems/rdoc@6.7.0.rbi +12721 -0
  86. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  87. data/sorbet/rbi/gems/reline@0.5.10.rbi +9 -0
  88. data/sorbet/rbi/gems/rspec-core@3.13.1.rbi +11012 -0
  89. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
  90. data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
  91. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  92. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  93. data/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi +7446 -0
  94. data/sorbet/rbi/gems/rubocop-capybara@2.21.0.rbi +9 -0
  95. data/sorbet/rbi/gems/rubocop-factory_bot@2.26.1.rbi +9 -0
  96. data/sorbet/rbi/gems/rubocop-graphql@1.5.4.rbi +9 -0
  97. data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +9 -0
  98. data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +9 -0
  99. data/sorbet/rbi/gems/rubocop-rails@2.26.1.rbi +9 -0
  100. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  101. data/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi +9 -0
  102. data/sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi +9 -0
  103. data/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi +9 -0
  104. data/sorbet/rbi/gems/rubocop@1.66.1.rbi +58268 -0
  105. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  106. data/sorbet/rbi/gems/securerandom@0.3.1.rbi +396 -0
  107. data/sorbet/rbi/gems/spoom@1.4.2.rbi +4932 -0
  108. data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
  109. data/sorbet/rbi/gems/tapioca@0.16.2.rbi +3581 -0
  110. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  111. data/sorbet/rbi/gems/timeout@0.4.1.rbi +149 -0
  112. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  113. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  114. data/sorbet/rbi/gems/useragent@0.16.10.rbi +9 -0
  115. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2607 -0
  116. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +993 -0
  117. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +121 -0
  118. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  119. data/sorbet/rbi/gems/yard@0.9.37.rbi +18570 -0
  120. data/sorbet/rbi/gems/zeitwerk@2.6.18.rbi +1051 -0
  121. data/sorbet/rbi/todo.rbi +6 -0
  122. data/sorbet/tapioca/config.yml +13 -0
  123. data/sorbet/tapioca/require.rb +9 -0
  124. data/tasks/bundle_update.rake +14 -0
  125. data/tasks/sorbet.rake +26 -0
  126. metadata +216 -0
@@ -0,0 +1,430 @@
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
+ # required is an alias of require
118
+ sig { params(key: T.any(String, Symbol)).returns(ActionController::Parameters) }
119
+ sig { params(key: T::Array[T.any(String, Symbol)]).returns(T::Array[ActionController::Parameters]) }
120
+ def required(key); end
121
+
122
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
123
+ def reverse_merge!(other_hash); end
124
+
125
+ # with_defaults! is an alias of reverse_merge!
126
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
127
+ def with_defaults!(other_hash); end
128
+
129
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
130
+ def reverse_merge(other_hash); end
131
+
132
+ # with_defaults is an alias of reverse_merge
133
+ sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
134
+ def with_defaults(other_hash); end
135
+
136
+ sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
137
+ def select!(&block); end
138
+
139
+ # keep_if is an alias of select!
140
+ sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
141
+ def keep_if(&block); end
142
+
143
+ sig { params(block: T.untyped).returns(ActionController::Parameters) }
144
+ def select(&block); end
145
+
146
+ sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
147
+ def slice!(*keys); end
148
+
149
+ sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
150
+ def slice(*keys); end
151
+
152
+ sig { params(block: T.nilable(Proc)).returns(ActiveSupport::HashWithIndifferentAccess) }
153
+ def to_h(&block); end
154
+
155
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
156
+ def to_hash; end
157
+
158
+ # to_param is an alias of to_query
159
+ sig { params(args: String).returns(T.nilable(String)) }
160
+ def to_param(*args); end
161
+
162
+ sig { params(args: String).returns(T.nilable(String)) }
163
+ def to_query(*args); end
164
+
165
+ sig { returns(ActiveSupport::HashWithIndifferentAccess) }
166
+ def to_unsafe_h; end
167
+
168
+ # to_unsafe_hash is an alias of to_unsafe_h
169
+ sig { returns(ActiveSupport::HashWithIndifferentAccess) }
170
+ def to_unsafe_hash; end
171
+
172
+ sig { params(block: T.untyped).returns(ActionController::Parameters) }
173
+ def transform_keys!(&block); end
174
+
175
+ sig { params(block: T.untyped).returns(ActionController::Parameters) }
176
+ def transform_keys(&block); end
177
+
178
+ sig { returns(ActionController::Parameters) }
179
+ def transform_values!; end
180
+
181
+ sig { returns(ActionController::Parameters) }
182
+ def transform_values; end
183
+
184
+ sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
185
+ def values_at(*keys); end
186
+
187
+ sig { returns(T.any(Symbol, T::Boolean)) }
188
+ def self.action_on_unpermitted_parameters; end
189
+
190
+ sig { params(obj: T.any(Symbol, T::Boolean)).void }
191
+ def self.action_on_unpermitted_parameters=(obj); end
192
+
193
+ sig { returns(T::Array[T.any(String, Symbol)]) }
194
+ def self.always_permitted_parameters; end
195
+
196
+ sig { params(obj: T::Array[T.any(String, Symbol)]).void }
197
+ def self.always_permitted_parameters=(obj); end
198
+
199
+ sig { returns(T::Boolean) }
200
+ def self.permit_all_parameters; end
201
+
202
+ sig { params(obj: T::Boolean).void }
203
+ def self.permit_all_parameters=(obj); end
204
+ end
205
+
206
+ module ActionController::RequestForgeryProtection
207
+ sig { returns(T::Boolean) }
208
+ def protect_against_forgery?; end
209
+
210
+ sig { params(form_options: T::Hash[T.untyped, T.untyped]).returns(String) }
211
+ def form_authenticity_token(form_options: {}); end
212
+ end
213
+
214
+ module ActionController::RequestForgeryProtection::ClassMethods
215
+ sig { params(options: T::Hash[T.untyped, T.untyped]).void }
216
+ def skip_forgery_protection(options = T.unsafe(nil)); end
217
+ end
218
+
219
+ module ActionController::StrongParameters
220
+ sig { returns(ActionController::Parameters) }
221
+ def params; end
222
+ end
223
+
224
+ module ActionDispatch::Http::Parameters
225
+ sig { returns(ActionController::Parameters) }
226
+ def parameters; end
227
+
228
+ # params is an alias of parameters
229
+ sig { returns(ActionController::Parameters) }
230
+ def params; end
231
+ end
232
+
233
+ module ActionDispatch::Integration::Runner
234
+ # @method_missing: delegated to ActionDispatch::Integration::Session
235
+ sig { params(host: String).returns(String) }
236
+ def host!(host); end
237
+
238
+ # @method_missing: delegated to ActionDispatch::Integration::Session
239
+ sig { params(flag: T::Boolean).returns(T::Boolean) }
240
+ def https!(flag = true); end
241
+ end
242
+
243
+ class ActionDispatch::IntegrationTest
244
+ # The following methods are accessible on `IntegrationTest`
245
+ # through the following delegation chain:
246
+ # - `IntegrationTest` includes `IntegrationTest::Behavior`
247
+ # - `IntegrationTest::Behavior` includes `Integration::Runner`
248
+ # - `Integration::Runner#method_missing` delegates to `Integration::Session`
249
+ #
250
+ # Then `Integration::Session` either implements the methods
251
+ # directly or further delegates to `TestProcess` (included) or
252
+ # `TestResponse` / `Request` (via `delegate`).
253
+ #
254
+ # Cf. https://github.com/Shopify/rbi-central/pull/138 for more context.
255
+ # @method_missing: delegated to ActionDispatch::TestProcess
256
+ sig { returns(ActionDispatch::Flash::FlashHash) }
257
+ def flash; end
258
+
259
+ # @method_missing: delegated to ActionDispatch::TestProcess
260
+ sig { returns(ActionDispatch::Request::Session) }
261
+ def session; end
262
+
263
+ # @method_missing: delegated to ActionDispatch::TestResponse
264
+ sig { returns(T.nilable(Integer)) }
265
+ def status; end
266
+
267
+ # @method_missing: delegated to ActionDispatch::TestResponse
268
+ sig { returns(T.nilable(String)) }
269
+ def status_message; end
270
+
271
+ # @method_missing: delegated to ActionDispatch::TestResponse
272
+ sig { returns(ActionDispatch::Response::Header) }
273
+ def headers; end
274
+
275
+ # @method_missing: delegated to ActionDispatch::TestResponse
276
+ sig { returns(T.nilable(String)) }
277
+ def body; end
278
+
279
+ # @method_missing: delegated to ActionDispatch::TestResponse
280
+ sig { returns(T.nilable(T::Boolean)) }
281
+ def redirect?; end
282
+
283
+ # @method_missing: delegated to ActionDispatch::Request
284
+ sig { returns(T.nilable(String)) }
285
+ def path; end
286
+
287
+ # @method_missing: delegated to ActionDispatch::Integration::Session
288
+ sig { returns(String) }
289
+ def host; end
290
+
291
+ # @method_missing: delegated to ActionDispatch::Integration::Session
292
+ sig { params(host: String).returns(String) }
293
+ attr_writer :host
294
+
295
+ # @method_missing: delegated to ActionDispatch::Integration::Session
296
+ sig { returns(T.nilable(String)) }
297
+ attr_accessor :remote_addr
298
+
299
+ # @method_missing: delegated to ActionDispatch::Integration::Session
300
+ sig { returns(T.nilable(String)) }
301
+ attr_accessor :accept
302
+
303
+ # @method_missing: delegated to ActionDispatch::Integration::Session
304
+ sig { returns(Rack::Test::CookieJar) }
305
+ def cookies; end
306
+
307
+ # @method_missing: delegated to ActionDispatch::Integration::Session
308
+ sig { returns(T.nilable(ActionController::Base)) }
309
+ attr_reader :controller
310
+
311
+ # @method_missing: delegated to ActionDispatch::Integration::Session
312
+ sig { returns(ActionDispatch::TestRequest) }
313
+ attr_reader :request
314
+
315
+ # @method_missing: delegated to ActionDispatch::Integration::Session
316
+ sig { returns(ActionDispatch::TestResponse) }
317
+ attr_reader :response
318
+
319
+ # @method_missing: delegated to ActionDispatch::Integration::Session
320
+ sig { returns(Integer) }
321
+ attr_accessor :request_count
322
+ end
323
+
324
+ class ActionDispatch::Request
325
+ # Provides access to the request's HTTP headers, for example:
326
+ #
327
+ # ```ruby
328
+ # request.headers["Content-Type"] # => "text/plain"
329
+ # ```
330
+ sig { returns(ActionDispatch::Http::Headers) }
331
+ def headers; end
332
+
333
+ # Returns a `String` with the last requested path including their params.
334
+ #
335
+ # ```ruby
336
+ # # get '/foo'
337
+ # request.original_fullpath # => '/foo'
338
+ #
339
+ # # get '/foo?bar'
340
+ # request.original_fullpath # => '/foo?bar'
341
+ # ```
342
+ sig { returns(String) }
343
+ def original_fullpath; end
344
+
345
+ # Returns the `String` full path including params of the last URL requested.
346
+ #
347
+ # ```ruby
348
+ # # get "/articles"
349
+ # request.fullpath # => "/articles"
350
+ #
351
+ # # get "/articles?page=2"
352
+ # request.fullpath # => "/articles?page=2"
353
+ # ```
354
+ sig { returns(String) }
355
+ def fullpath; end
356
+
357
+ # Returns the original request URL as a `String`.
358
+ #
359
+ # ```ruby
360
+ # # get "/articles?page=2"
361
+ # request.original_url # => "http://www.example.com/articles?page=2"
362
+ # ```
363
+ sig { returns(String) }
364
+ def original_url; end
365
+
366
+ # The `String` MIME type of the request.
367
+ #
368
+ # ```
369
+ # # get "/articles"
370
+ # request.media_type # => "application/x-www-form-urlencoded"
371
+ # ```
372
+ sig { returns(String) }
373
+ def media_type; end
374
+
375
+ # Returns the content length of the request as an integer.
376
+ sig { returns(Integer) }
377
+ def content_length; end
378
+
379
+ # Returns the IP address of client as a `String`.
380
+ sig { returns(String) }
381
+ def ip; end
382
+
383
+ # Returns the IP address of client as a `String`,
384
+ # usually set by the RemoteIp middleware.
385
+ sig { returns(String) }
386
+ def remote_ip; end
387
+
388
+ # Returns the unique request id, which is based on either the X-Request-Id header that can
389
+ # be generated by a firewall, load balancer, or web server or by the RequestId middleware
390
+ # (which sets the action_dispatch.request_id environment variable).
391
+ #
392
+ # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.
393
+ # This relies on the Rack variable set by the ActionDispatch::RequestId middleware.
394
+ sig { returns(T.nilable(String)) }
395
+ def request_id; end
396
+
397
+ # Returns true if the request has a header matching the given key parameter.
398
+ #
399
+ # ```ruby
400
+ # request.key? :ip_spoofing_check # => true
401
+ # ```
402
+ sig { params(key: Symbol).returns(T::Boolean) }
403
+ def key?(key); end
404
+
405
+ # True if the request came from localhost, 127.0.0.1, or ::1.
406
+ sig { returns(T::Boolean) }
407
+ def local?; end
408
+ end
409
+
410
+ module ActionDispatch::Routing::Mapper::Resources
411
+ sig { params(name: T.untyped).returns(T.untyped) }
412
+ def action_path(name); end
413
+
414
+ sig { params(block: T.untyped).returns(T.untyped) }
415
+ def collection(&block); end
416
+
417
+ sig { params(block: T.untyped).returns(T.untyped) }
418
+ def member(&block); end
419
+
420
+ sig { returns(T.untyped) }
421
+ def shallow; end
422
+
423
+ sig { returns(T::Boolean) }
424
+ def shallow?; end
425
+ end
426
+
427
+ class ActionDispatch::Routing::RouteSet
428
+ sig { params(block: T.proc.bind(ActionDispatch::Routing::Mapper).void).void }
429
+ def draw(&block); end
430
+ 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: T.any(Module, 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