packwerk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  3. data/.github/probots.yml +2 -0
  4. data/.github/pull_request_template.md +27 -0
  5. data/.github/workflows/ci.yml +50 -0
  6. data/.gitignore +12 -0
  7. data/.rubocop.yml +46 -0
  8. data/.ruby-version +1 -0
  9. data/CODEOWNERS +1 -0
  10. data/CODE_OF_CONDUCT.md +76 -0
  11. data/CONTRIBUTING.md +17 -0
  12. data/Gemfile +22 -0
  13. data/Gemfile.lock +236 -0
  14. data/LICENSE.md +7 -0
  15. data/README.md +73 -0
  16. data/Rakefile +13 -0
  17. data/TROUBLESHOOT.md +67 -0
  18. data/USAGE.md +250 -0
  19. data/bin/console +15 -0
  20. data/bin/setup +8 -0
  21. data/dev.yml +32 -0
  22. data/docs/cohesion.png +0 -0
  23. data/exe/packwerk +6 -0
  24. data/lib/packwerk.rb +44 -0
  25. data/lib/packwerk/application_validator.rb +343 -0
  26. data/lib/packwerk/association_inspector.rb +44 -0
  27. data/lib/packwerk/checking_deprecated_references.rb +40 -0
  28. data/lib/packwerk/cli.rb +238 -0
  29. data/lib/packwerk/configuration.rb +82 -0
  30. data/lib/packwerk/const_node_inspector.rb +44 -0
  31. data/lib/packwerk/constant_discovery.rb +60 -0
  32. data/lib/packwerk/constant_name_inspector.rb +22 -0
  33. data/lib/packwerk/dependency_checker.rb +28 -0
  34. data/lib/packwerk/deprecated_references.rb +92 -0
  35. data/lib/packwerk/file_processor.rb +43 -0
  36. data/lib/packwerk/files_for_processing.rb +67 -0
  37. data/lib/packwerk/formatters/progress_formatter.rb +46 -0
  38. data/lib/packwerk/generators/application_validation.rb +62 -0
  39. data/lib/packwerk/generators/configuration_file.rb +69 -0
  40. data/lib/packwerk/generators/inflections_file.rb +43 -0
  41. data/lib/packwerk/generators/root_package.rb +37 -0
  42. data/lib/packwerk/generators/templates/inflections.yml +6 -0
  43. data/lib/packwerk/generators/templates/package.yml +17 -0
  44. data/lib/packwerk/generators/templates/packwerk +23 -0
  45. data/lib/packwerk/generators/templates/packwerk.yml.erb +23 -0
  46. data/lib/packwerk/generators/templates/packwerk_validator_test.rb +11 -0
  47. data/lib/packwerk/graph.rb +74 -0
  48. data/lib/packwerk/inflections/custom.rb +33 -0
  49. data/lib/packwerk/inflections/default.rb +73 -0
  50. data/lib/packwerk/inflector.rb +41 -0
  51. data/lib/packwerk/node.rb +259 -0
  52. data/lib/packwerk/node_processor.rb +49 -0
  53. data/lib/packwerk/node_visitor.rb +22 -0
  54. data/lib/packwerk/offense.rb +44 -0
  55. data/lib/packwerk/output_styles.rb +41 -0
  56. data/lib/packwerk/package.rb +56 -0
  57. data/lib/packwerk/package_set.rb +59 -0
  58. data/lib/packwerk/parsed_constant_definitions.rb +62 -0
  59. data/lib/packwerk/parsers.rb +23 -0
  60. data/lib/packwerk/parsers/erb.rb +66 -0
  61. data/lib/packwerk/parsers/factory.rb +34 -0
  62. data/lib/packwerk/parsers/ruby.rb +42 -0
  63. data/lib/packwerk/privacy_checker.rb +45 -0
  64. data/lib/packwerk/reference.rb +6 -0
  65. data/lib/packwerk/reference_extractor.rb +81 -0
  66. data/lib/packwerk/reference_lister.rb +23 -0
  67. data/lib/packwerk/run_context.rb +103 -0
  68. data/lib/packwerk/sanity_checker.rb +10 -0
  69. data/lib/packwerk/spring_command.rb +28 -0
  70. data/lib/packwerk/updating_deprecated_references.rb +51 -0
  71. data/lib/packwerk/version.rb +6 -0
  72. data/lib/packwerk/violation_type.rb +13 -0
  73. data/library.yml +6 -0
  74. data/packwerk.gemspec +58 -0
  75. data/service.yml +6 -0
  76. data/shipit.rubygems.yml +1 -0
  77. data/sorbet/config +2 -0
  78. data/sorbet/rbi/gems/actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +840 -0
  79. data/sorbet/rbi/gems/actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +571 -0
  80. data/sorbet/rbi/gems/actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +568 -0
  81. data/sorbet/rbi/gems/actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +5216 -0
  82. data/sorbet/rbi/gems/actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +663 -0
  83. data/sorbet/rbi/gems/actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +2504 -0
  84. data/sorbet/rbi/gems/activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +635 -0
  85. data/sorbet/rbi/gems/activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +1201 -0
  86. data/sorbet/rbi/gems/activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8011 -0
  87. data/sorbet/rbi/gems/activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +904 -0
  88. data/sorbet/rbi/gems/activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +3888 -0
  89. data/sorbet/rbi/gems/ast@2.4.1.rbi +54 -0
  90. data/sorbet/rbi/gems/better_html@1.0.15.rbi +317 -0
  91. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  92. data/sorbet/rbi/gems/byebug@11.1.3.rbi +8 -0
  93. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  94. data/sorbet/rbi/gems/colorize@0.8.1.rbi +40 -0
  95. data/sorbet/rbi/gems/commander@4.5.2.rbi +8 -0
  96. data/sorbet/rbi/gems/concurrent-ruby@1.1.6.rbi +1966 -0
  97. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +26 -0
  98. data/sorbet/rbi/gems/crass@1.0.6.rbi +138 -0
  99. data/sorbet/rbi/gems/erubi@1.9.0.rbi +39 -0
  100. data/sorbet/rbi/gems/globalid@0.4.2.rbi +178 -0
  101. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  102. data/sorbet/rbi/gems/html_tokenizer@0.0.7.rbi +46 -0
  103. data/sorbet/rbi/gems/i18n@1.8.2.rbi +633 -0
  104. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +8 -0
  105. data/sorbet/rbi/gems/loofah@2.5.0.rbi +272 -0
  106. data/sorbet/rbi/gems/m@1.5.1.rbi +108 -0
  107. data/sorbet/rbi/gems/mail@2.7.1.rbi +2490 -0
  108. data/sorbet/rbi/gems/marcel@0.3.3.rbi +30 -0
  109. data/sorbet/rbi/gems/method_source@1.0.0.rbi +76 -0
  110. data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +47 -0
  111. data/sorbet/rbi/gems/mini_mime@1.0.2.rbi +71 -0
  112. data/sorbet/rbi/gems/mini_portile2@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/minitest@5.14.0.rbi +542 -0
  114. data/sorbet/rbi/gems/mocha@1.11.2.rbi +964 -0
  115. data/sorbet/rbi/gems/nio4r@2.5.2.rbi +89 -0
  116. data/sorbet/rbi/gems/nokogiri@1.10.9.rbi +1608 -0
  117. data/sorbet/rbi/gems/parallel@1.19.1.rbi +8 -0
  118. data/sorbet/rbi/gems/parlour@4.0.1.rbi +561 -0
  119. data/sorbet/rbi/gems/parser@2.7.1.4.rbi +1632 -0
  120. data/sorbet/rbi/gems/pry@0.13.1.rbi +8 -0
  121. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +335 -0
  122. data/sorbet/rbi/gems/rack@2.2.2.rbi +1730 -0
  123. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +123 -0
  124. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +213 -0
  125. data/sorbet/rbi/gems/rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8 -0
  126. data/sorbet/rbi/gems/railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +869 -0
  127. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +155 -0
  128. data/sorbet/rbi/gems/rake@13.0.1.rbi +841 -0
  129. data/sorbet/rbi/gems/rexml@3.2.4.rbi +8 -0
  130. data/sorbet/rbi/gems/rubocop-performance@1.5.2.rbi +8 -0
  131. data/sorbet/rbi/gems/rubocop-shopify@1.0.2.rbi +8 -0
  132. data/sorbet/rbi/gems/rubocop-sorbet@0.3.7.rbi +8 -0
  133. data/sorbet/rbi/gems/rubocop@0.82.0.rbi +8 -0
  134. data/sorbet/rbi/gems/ruby-progressbar@1.10.1.rbi +8 -0
  135. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +168 -0
  136. data/sorbet/rbi/gems/spoom@1.0.4.rbi +418 -0
  137. data/sorbet/rbi/gems/spring@2.1.0.rbi +160 -0
  138. data/sorbet/rbi/gems/sprockets-rails@3.2.1.rbi +431 -0
  139. data/sorbet/rbi/gems/sprockets@4.0.0.rbi +1132 -0
  140. data/sorbet/rbi/gems/tapioca@0.4.5.rbi +518 -0
  141. data/sorbet/rbi/gems/thor@1.0.1.rbi +892 -0
  142. data/sorbet/rbi/gems/tzinfo@2.0.2.rbi +547 -0
  143. data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
  144. data/sorbet/rbi/gems/websocket-driver@0.7.1.rbi +438 -0
  145. data/sorbet/rbi/gems/websocket-extensions@0.1.4.rbi +71 -0
  146. data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +8 -0
  147. data/sorbet/tapioca/require.rb +25 -0
  148. data/static/packwerk-check-demo.png +0 -0
  149. data/static/packwerk_check.gif +0 -0
  150. data/static/packwerk_check_violation.gif +0 -0
  151. data/static/packwerk_update.gif +0 -0
  152. data/static/packwerk_validate.gif +0 -0
  153. metadata +341 -0
@@ -0,0 +1,8 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `pry` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
@@ -0,0 +1,335 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rack-test` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module Rack
8
+ class << self
9
+ def release; end
10
+ def version; end
11
+ end
12
+ end
13
+
14
+ Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String)
15
+
16
+ Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String)
17
+
18
+ Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String)
19
+
20
+ Rack::DELETE = T.let(T.unsafe(nil), String)
21
+
22
+ Rack::ETAG = T.let(T.unsafe(nil), String)
23
+
24
+ Rack::EXPIRES = T.let(T.unsafe(nil), String)
25
+
26
+ Rack::File = Rack::Files
27
+
28
+ Rack::GET = T.let(T.unsafe(nil), String)
29
+
30
+ Rack::HEAD = T.let(T.unsafe(nil), String)
31
+
32
+ Rack::HTTPS = T.let(T.unsafe(nil), String)
33
+
34
+ Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String)
35
+
36
+ Rack::HTTP_HOST = T.let(T.unsafe(nil), String)
37
+
38
+ Rack::HTTP_PORT = T.let(T.unsafe(nil), String)
39
+
40
+ Rack::HTTP_VERSION = T.let(T.unsafe(nil), String)
41
+
42
+ Rack::LINK = T.let(T.unsafe(nil), String)
43
+
44
+ class Rack::MockSession
45
+ def initialize(app, default_host = T.unsafe(nil)); end
46
+
47
+ def after_request(&block); end
48
+ def clear_cookies; end
49
+ def cookie_jar; end
50
+ def cookie_jar=(_); end
51
+ def default_host; end
52
+ def last_request; end
53
+ def last_response; end
54
+ def request(uri, env); end
55
+ def set_cookie(cookie, uri = T.unsafe(nil)); end
56
+ end
57
+
58
+ Rack::OPTIONS = T.let(T.unsafe(nil), String)
59
+
60
+ Rack::PATCH = T.let(T.unsafe(nil), String)
61
+
62
+ Rack::PATH_INFO = T.let(T.unsafe(nil), String)
63
+
64
+ Rack::POST = T.let(T.unsafe(nil), String)
65
+
66
+ Rack::PUT = T.let(T.unsafe(nil), String)
67
+
68
+ Rack::QUERY_STRING = T.let(T.unsafe(nil), String)
69
+
70
+ Rack::RACK_ERRORS = T.let(T.unsafe(nil), String)
71
+
72
+ Rack::RACK_HIJACK = T.let(T.unsafe(nil), String)
73
+
74
+ Rack::RACK_HIJACK_IO = T.let(T.unsafe(nil), String)
75
+
76
+ Rack::RACK_INPUT = T.let(T.unsafe(nil), String)
77
+
78
+ Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String)
79
+
80
+ Rack::RACK_LOGGER = T.let(T.unsafe(nil), String)
81
+
82
+ Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String)
83
+
84
+ Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String)
85
+
86
+ Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String)
87
+
88
+ Rack::RACK_MULTIPROCESS = T.let(T.unsafe(nil), String)
89
+
90
+ Rack::RACK_MULTITHREAD = T.let(T.unsafe(nil), String)
91
+
92
+ Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String)
93
+
94
+ Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String)
95
+
96
+ Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String)
97
+
98
+ Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String)
99
+
100
+ Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String)
101
+
102
+ Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String)
103
+
104
+ Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String)
105
+
106
+ Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String)
107
+
108
+ Rack::RACK_RUNONCE = T.let(T.unsafe(nil), String)
109
+
110
+ Rack::RACK_SESSION = T.let(T.unsafe(nil), String)
111
+
112
+ Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String)
113
+
114
+ Rack::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String)
115
+
116
+ Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String)
117
+
118
+ Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String)
119
+
120
+ Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String)
121
+
122
+ Rack::RACK_VERSION = T.let(T.unsafe(nil), String)
123
+
124
+ Rack::RELEASE = T.let(T.unsafe(nil), String)
125
+
126
+ Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String)
127
+
128
+ Rack::REQUEST_PATH = T.let(T.unsafe(nil), String)
129
+
130
+ Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String)
131
+
132
+ Rack::SERVER_NAME = T.let(T.unsafe(nil), String)
133
+
134
+ Rack::SERVER_PORT = T.let(T.unsafe(nil), String)
135
+
136
+ Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String)
137
+
138
+ Rack::SET_COOKIE = T.let(T.unsafe(nil), String)
139
+
140
+ Rack::TRACE = T.let(T.unsafe(nil), String)
141
+
142
+ Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String)
143
+
144
+ module Rack::Test
145
+ class << self
146
+ def encoding_aware_strings?; end
147
+ end
148
+ end
149
+
150
+ class Rack::Test::Cookie
151
+ include(::Rack::Utils)
152
+
153
+ def initialize(raw, uri = T.unsafe(nil), default_host = T.unsafe(nil)); end
154
+
155
+ def <=>(other); end
156
+ def domain; end
157
+ def empty?; end
158
+ def expired?; end
159
+ def expires; end
160
+ def http_only?; end
161
+ def matches?(uri); end
162
+ def name; end
163
+ def path; end
164
+ def raw; end
165
+ def replaces?(other); end
166
+ def secure?; end
167
+ def to_h; end
168
+ def to_hash; end
169
+ def valid?(uri); end
170
+ def value; end
171
+
172
+ protected
173
+
174
+ def default_uri; end
175
+ end
176
+
177
+ class Rack::Test::CookieJar
178
+ def initialize(cookies = T.unsafe(nil), default_host = T.unsafe(nil)); end
179
+
180
+ def <<(new_cookie); end
181
+ def [](name); end
182
+ def []=(name, value); end
183
+ def delete(name); end
184
+ def for(uri); end
185
+ def get_cookie(name); end
186
+ def merge(raw_cookies, uri = T.unsafe(nil)); end
187
+ def to_hash; end
188
+
189
+ protected
190
+
191
+ def hash_for(uri = T.unsafe(nil)); end
192
+ end
193
+
194
+ Rack::Test::CookieJar::DELIMITER = T.let(T.unsafe(nil), String)
195
+
196
+ Rack::Test::DEFAULT_HOST = T.let(T.unsafe(nil), String)
197
+
198
+ class Rack::Test::Error < ::StandardError
199
+ end
200
+
201
+ Rack::Test::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String)
202
+
203
+ module Rack::Test::Methods
204
+ extend(::Forwardable)
205
+
206
+ def _current_session_names; end
207
+ def authorize(*args, &block); end
208
+ def basic_authorize(*args, &block); end
209
+ def build_rack_mock_session; end
210
+ def build_rack_test_session(name); end
211
+ def clear_cookies(*args, &block); end
212
+ def current_session; end
213
+ def custom_request(*args, &block); end
214
+ def delete(*args, &block); end
215
+ def digest_authorize(*args, &block); end
216
+ def env(*args, &block); end
217
+ def follow_redirect!(*args, &block); end
218
+ def get(*args, &block); end
219
+ def head(*args, &block); end
220
+ def header(*args, &block); end
221
+ def last_request(*args, &block); end
222
+ def last_response(*args, &block); end
223
+ def options(*args, &block); end
224
+ def patch(*args, &block); end
225
+ def post(*args, &block); end
226
+ def put(*args, &block); end
227
+ def rack_mock_session(name = T.unsafe(nil)); end
228
+ def rack_test_session(name = T.unsafe(nil)); end
229
+ def request(*args, &block); end
230
+ def set_cookie(*args, &block); end
231
+ def with_session(name); end
232
+ end
233
+
234
+ Rack::Test::Methods::METHODS = T.let(T.unsafe(nil), Array)
235
+
236
+ class Rack::Test::MockDigestRequest
237
+ def initialize(params); end
238
+
239
+ def method; end
240
+ def method_missing(sym); end
241
+ def response(password); end
242
+ end
243
+
244
+ class Rack::Test::Session
245
+ include(::Rack::Utils)
246
+ include(::Rack::Test::Utils)
247
+ extend(::Forwardable)
248
+
249
+ def initialize(mock_session); end
250
+
251
+ def authorize(username, password); end
252
+ def basic_authorize(username, password); end
253
+ def clear_cookies(*args, &block); end
254
+ def custom_request(verb, uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
255
+ def delete(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
256
+ def digest_authorize(username, password); end
257
+ def env(name, value); end
258
+ def follow_redirect!; end
259
+ def get(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
260
+ def head(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
261
+ def header(name, value); end
262
+ def last_request(*args, &block); end
263
+ def last_response(*args, &block); end
264
+ def options(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
265
+ def patch(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
266
+ def post(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
267
+ def put(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
268
+ def request(uri, env = T.unsafe(nil), &block); end
269
+ def set_cookie(*args, &block); end
270
+
271
+ private
272
+
273
+ def default_env; end
274
+ def digest_auth_configured?; end
275
+ def digest_auth_header; end
276
+ def env_for(uri, env); end
277
+ def headers_for_env; end
278
+ def params_to_string(params); end
279
+ def parse_uri(path, env); end
280
+ def process_request(uri, env); end
281
+ def retry_with_digest_auth?(env); end
282
+ end
283
+
284
+ class Rack::Test::UploadedFile
285
+ def initialize(content, content_type = T.unsafe(nil), binary = T.unsafe(nil), original_filename: T.unsafe(nil)); end
286
+
287
+ def content_type; end
288
+ def content_type=(_); end
289
+ def local_path; end
290
+ def method_missing(method_name, *args, &block); end
291
+ def original_filename; end
292
+ def path; end
293
+ def tempfile; end
294
+
295
+ private
296
+
297
+ def initialize_from_file_path(path); end
298
+ def initialize_from_stringio(stringio, original_filename); end
299
+ def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end
300
+
301
+ class << self
302
+ def actually_finalize(file); end
303
+ def finalize(file); end
304
+ end
305
+ end
306
+
307
+ module Rack::Test::Utils
308
+ include(::Rack::Utils)
309
+ extend(::Rack::Utils)
310
+
311
+
312
+ private
313
+
314
+ def build_file_part(parameter_name, uploaded_file); end
315
+ def build_multipart(params, first = T.unsafe(nil), multipart = T.unsafe(nil)); end
316
+ def build_nested_query(value, prefix = T.unsafe(nil)); end
317
+ def build_parts(parameters); end
318
+ def build_primitive_part(parameter_name, value); end
319
+ def get_parts(parameters); end
320
+
321
+ class << self
322
+ def build_file_part(parameter_name, uploaded_file); end
323
+ def build_multipart(params, first = T.unsafe(nil), multipart = T.unsafe(nil)); end
324
+ def build_nested_query(value, prefix = T.unsafe(nil)); end
325
+ def build_parts(parameters); end
326
+ def build_primitive_part(parameter_name, value); end
327
+ def get_parts(parameters); end
328
+ end
329
+ end
330
+
331
+ Rack::Test::VERSION = T.let(T.unsafe(nil), String)
332
+
333
+ Rack::UNLINK = T.let(T.unsafe(nil), String)
334
+
335
+ Rack::VERSION = T.let(T.unsafe(nil), Array)
@@ -0,0 +1,1730 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rack` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module Rack
8
+ class << self
9
+ def release; end
10
+ def version; end
11
+ end
12
+ end
13
+
14
+ module Rack::Auth
15
+ end
16
+
17
+ class Rack::Auth::AbstractHandler
18
+ def initialize(app, realm = T.unsafe(nil), &authenticator); end
19
+
20
+ def realm; end
21
+ def realm=(_); end
22
+
23
+ private
24
+
25
+ def bad_request; end
26
+ def unauthorized(www_authenticate = T.unsafe(nil)); end
27
+ end
28
+
29
+ class Rack::Auth::AbstractRequest
30
+ def initialize(env); end
31
+
32
+ def params; end
33
+ def parts; end
34
+ def provided?; end
35
+ def request; end
36
+ def scheme; end
37
+ def valid?; end
38
+
39
+ private
40
+
41
+ def authorization_key; end
42
+ end
43
+
44
+ Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array)
45
+
46
+ class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler
47
+ def call(env); end
48
+
49
+ private
50
+
51
+ def challenge; end
52
+ def valid?(auth); end
53
+ end
54
+
55
+ class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest
56
+ def basic?; end
57
+ def credentials; end
58
+ def username; end
59
+ end
60
+
61
+ module Rack::Auth::Digest
62
+ end
63
+
64
+ class Rack::Auth::Digest::MD5 < ::Rack::Auth::AbstractHandler
65
+ def initialize(app, realm = T.unsafe(nil), opaque = T.unsafe(nil), &authenticator); end
66
+
67
+ def call(env); end
68
+ def opaque; end
69
+ def opaque=(_); end
70
+ def passwords_hashed=(_); end
71
+ def passwords_hashed?; end
72
+
73
+ private
74
+
75
+ def A1(auth, password); end
76
+ def A2(auth); end
77
+ def H(data); end
78
+ def KD(secret, data); end
79
+ def challenge(hash = T.unsafe(nil)); end
80
+ def digest(auth, password); end
81
+ def md5(data); end
82
+ def params(hash = T.unsafe(nil)); end
83
+ def valid?(auth); end
84
+ def valid_digest?(auth); end
85
+ def valid_nonce?(auth); end
86
+ def valid_opaque?(auth); end
87
+ def valid_qop?(auth); end
88
+ end
89
+
90
+ Rack::Auth::Digest::MD5::QOP = T.let(T.unsafe(nil), String)
91
+
92
+ class Rack::Auth::Digest::Nonce
93
+ def initialize(timestamp = T.unsafe(nil), given_digest = T.unsafe(nil)); end
94
+
95
+ def digest; end
96
+ def fresh?; end
97
+ def stale?; end
98
+ def to_s; end
99
+ def valid?; end
100
+
101
+ class << self
102
+ def parse(string); end
103
+ def private_key; end
104
+ def private_key=(_); end
105
+ def time_limit; end
106
+ def time_limit=(_); end
107
+ end
108
+ end
109
+
110
+ class Rack::Auth::Digest::Params < ::Hash
111
+ def initialize; end
112
+
113
+ def [](k); end
114
+ def []=(k, v); end
115
+ def quote(str); end
116
+ def to_s; end
117
+
118
+ class << self
119
+ def dequote(str); end
120
+ def parse(str); end
121
+ def split_header_value(str); end
122
+ end
123
+ end
124
+
125
+ Rack::Auth::Digest::Params::UNQUOTED = T.let(T.unsafe(nil), Array)
126
+
127
+ class Rack::Auth::Digest::Request < ::Rack::Auth::AbstractRequest
128
+ def correct_uri?; end
129
+ def digest?; end
130
+ def method; end
131
+ def method_missing(sym, *args); end
132
+ def nonce; end
133
+ def params; end
134
+ def respond_to?(sym, *_); end
135
+ end
136
+
137
+ class Rack::BodyProxy
138
+ def initialize(body, &block); end
139
+
140
+ def close; end
141
+ def closed?; end
142
+ def method_missing(method_name, *args, &block); end
143
+
144
+ private
145
+
146
+ def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end
147
+ end
148
+
149
+ class Rack::Builder
150
+ def initialize(default_app = T.unsafe(nil), &block); end
151
+
152
+ def call(env); end
153
+ def freeze_app; end
154
+ def map(path, &block); end
155
+ def run(app); end
156
+ def to_app; end
157
+ def use(middleware, *args, &block); end
158
+ def warmup(prc = T.unsafe(nil), &block); end
159
+
160
+ private
161
+
162
+ def generate_map(default_app, mapping); end
163
+
164
+ class << self
165
+ def app(default_app = T.unsafe(nil), &block); end
166
+ def load_file(path, opts = T.unsafe(nil)); end
167
+ def new_from_string(builder_script, file = T.unsafe(nil)); end
168
+ def parse_file(config, opts = T.unsafe(nil)); end
169
+ end
170
+ end
171
+
172
+ Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String)
173
+
174
+ Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String)
175
+
176
+ Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String)
177
+
178
+ Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String)
179
+
180
+ class Rack::Cascade
181
+ def initialize(apps, cascade_for = T.unsafe(nil)); end
182
+
183
+ def <<(app); end
184
+ def add(app); end
185
+ def apps; end
186
+ def call(env); end
187
+ def include?(app); end
188
+ end
189
+
190
+ Rack::Cascade::NotFound = T.let(T.unsafe(nil), Array)
191
+
192
+ class Rack::Chunked
193
+ include(::Rack::Utils)
194
+
195
+ def initialize(app); end
196
+
197
+ def call(env); end
198
+ def chunkable_version?(ver); end
199
+ end
200
+
201
+ class Rack::Chunked::Body
202
+ def initialize(body); end
203
+
204
+ def close; end
205
+ def each(&block); end
206
+
207
+ private
208
+
209
+ def yield_trailers; end
210
+ end
211
+
212
+ Rack::Chunked::Body::TAIL = T.let(T.unsafe(nil), String)
213
+
214
+ Rack::Chunked::Body::TERM = T.let(T.unsafe(nil), String)
215
+
216
+ class Rack::Chunked::TrailerBody < ::Rack::Chunked::Body
217
+
218
+ private
219
+
220
+ def yield_trailers; end
221
+ end
222
+
223
+ class Rack::CommonLogger
224
+ def initialize(app, logger = T.unsafe(nil)); end
225
+
226
+ def call(env); end
227
+
228
+ private
229
+
230
+ def extract_content_length(headers); end
231
+ def log(env, status, header, began_at); end
232
+ end
233
+
234
+ Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String)
235
+
236
+ class Rack::ConditionalGet
237
+ def initialize(app); end
238
+
239
+ def call(env); end
240
+
241
+ private
242
+
243
+ def etag_matches?(none_match, headers); end
244
+ def fresh?(env, headers); end
245
+ def modified_since?(modified_since, headers); end
246
+ def to_rfc2822(since); end
247
+ end
248
+
249
+ class Rack::Config
250
+ def initialize(app, &block); end
251
+
252
+ def call(env); end
253
+ end
254
+
255
+ class Rack::ContentLength
256
+ include(::Rack::Utils)
257
+
258
+ def initialize(app); end
259
+
260
+ def call(env); end
261
+ end
262
+
263
+ class Rack::ContentType
264
+ include(::Rack::Utils)
265
+
266
+ def initialize(app, content_type = T.unsafe(nil)); end
267
+
268
+ def call(env); end
269
+ end
270
+
271
+ Rack::DELETE = T.let(T.unsafe(nil), String)
272
+
273
+ class Rack::Deflater
274
+ def initialize(app, options = T.unsafe(nil)); end
275
+
276
+ def call(env); end
277
+
278
+ private
279
+
280
+ def should_deflate?(env, status, headers, body); end
281
+ end
282
+
283
+ class Rack::Deflater::GzipStream
284
+ def initialize(body, mtime, sync); end
285
+
286
+ def close; end
287
+ def each(&block); end
288
+ def write(data); end
289
+ end
290
+
291
+ class Rack::Directory
292
+ def initialize(root, app = T.unsafe(nil)); end
293
+
294
+ def call(env); end
295
+ def check_bad_request(path_info); end
296
+ def check_forbidden(path_info); end
297
+ def entity_not_found(path_info); end
298
+ def filesize_format(int); end
299
+ def get(env); end
300
+ def list_directory(path_info, path, script_name); end
301
+ def list_path(env, path, path_info, script_name); end
302
+ def root; end
303
+ def stat(path); end
304
+ end
305
+
306
+ Rack::Directory::DIR_FILE = T.let(T.unsafe(nil), String)
307
+
308
+ Rack::Directory::DIR_PAGE_FOOTER = T.let(T.unsafe(nil), String)
309
+
310
+ Rack::Directory::DIR_PAGE_HEADER = T.let(T.unsafe(nil), String)
311
+
312
+ class Rack::Directory::DirectoryBody < ::Struct
313
+ def each; end
314
+
315
+ private
316
+
317
+ def DIR_FILE_escape(htmls); end
318
+ end
319
+
320
+ Rack::Directory::FILESIZE_FORMAT = T.let(T.unsafe(nil), Array)
321
+
322
+ Rack::ETAG = T.let(T.unsafe(nil), String)
323
+
324
+ class Rack::ETag
325
+ def initialize(app, no_cache_control = T.unsafe(nil), cache_control = T.unsafe(nil)); end
326
+
327
+ def call(env); end
328
+
329
+ private
330
+
331
+ def digest_body(body); end
332
+ def etag_body?(body); end
333
+ def etag_status?(status); end
334
+ def skip_caching?(headers); end
335
+ end
336
+
337
+ Rack::ETag::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String)
338
+
339
+ Rack::ETag::ETAG_STRING = T.let(T.unsafe(nil), String)
340
+
341
+ Rack::EXPIRES = T.let(T.unsafe(nil), String)
342
+
343
+ class Rack::Events
344
+ def initialize(app, handlers); end
345
+
346
+ def call(env); end
347
+
348
+ private
349
+
350
+ def make_request(env); end
351
+ def make_response(status, headers, body); end
352
+ def on_commit(request, response); end
353
+ def on_error(request, response, e); end
354
+ def on_finish(request, response); end
355
+ def on_start(request, response); end
356
+ end
357
+
358
+ module Rack::Events::Abstract
359
+ def on_commit(req, res); end
360
+ def on_error(req, res, e); end
361
+ def on_finish(req, res); end
362
+ def on_send(req, res); end
363
+ def on_start(req, res); end
364
+ end
365
+
366
+ class Rack::Events::BufferedResponse < ::Rack::Response::Raw
367
+ def initialize(status, headers, body); end
368
+
369
+ def body; end
370
+ def to_a; end
371
+ end
372
+
373
+ class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy
374
+ def initialize(body, request, response, handlers, &block); end
375
+
376
+ def each; end
377
+ def request; end
378
+ def response; end
379
+ end
380
+
381
+ Rack::File = Rack::Files
382
+
383
+ class Rack::Files
384
+ def initialize(root, headers = T.unsafe(nil), default_mime = T.unsafe(nil)); end
385
+
386
+ def call(env); end
387
+ def get(env); end
388
+ def root; end
389
+ def serving(request, path); end
390
+
391
+ private
392
+
393
+ def fail(status, body, headers = T.unsafe(nil)); end
394
+ def filesize(path); end
395
+ def mime_type(path, default_mime); end
396
+
397
+ class << self
398
+ def method_added(name); end
399
+ end
400
+ end
401
+
402
+ Rack::Files::ALLOWED_VERBS = T.let(T.unsafe(nil), Array)
403
+
404
+ Rack::Files::ALLOW_HEADER = T.let(T.unsafe(nil), String)
405
+
406
+ class Rack::Files::BaseIterator
407
+ def initialize(path, ranges, options); end
408
+
409
+ def bytesize; end
410
+ def close; end
411
+ def each; end
412
+ def options; end
413
+ def path; end
414
+ def ranges; end
415
+
416
+ private
417
+
418
+ def each_range_part(file, range); end
419
+ def multipart?; end
420
+ def multipart_heading(range); end
421
+ end
422
+
423
+ class Rack::Files::Iterator < ::Rack::Files::BaseIterator
424
+ def to_path; end
425
+ end
426
+
427
+ Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String)
428
+
429
+ class Rack::ForwardRequest < ::Exception
430
+ def initialize(url, env = T.unsafe(nil)); end
431
+
432
+ def env; end
433
+ def url; end
434
+ end
435
+
436
+ Rack::GET = T.let(T.unsafe(nil), String)
437
+
438
+ Rack::HEAD = T.let(T.unsafe(nil), String)
439
+
440
+ Rack::HTTPS = T.let(T.unsafe(nil), String)
441
+
442
+ Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String)
443
+
444
+ Rack::HTTP_HOST = T.let(T.unsafe(nil), String)
445
+
446
+ Rack::HTTP_PORT = T.let(T.unsafe(nil), String)
447
+
448
+ Rack::HTTP_VERSION = T.let(T.unsafe(nil), String)
449
+
450
+ module Rack::Handler
451
+ class << self
452
+ def default; end
453
+ def get(server); end
454
+ def pick(server_names); end
455
+ def register(server, klass); end
456
+ def try_require(prefix, const_name); end
457
+ end
458
+ end
459
+
460
+ class Rack::Handler::CGI
461
+ class << self
462
+ def run(app, **options); end
463
+ def send_body(body); end
464
+ def send_headers(status, headers); end
465
+ def serve(app); end
466
+ end
467
+ end
468
+
469
+ class Rack::Handler::WEBrick < ::WEBrick::HTTPServlet::AbstractServlet
470
+ def initialize(server, app); end
471
+
472
+ def service(req, res); end
473
+
474
+ class << self
475
+ def run(app, **options); end
476
+ def shutdown; end
477
+ def valid_options; end
478
+ end
479
+ end
480
+
481
+ class Rack::Head
482
+ def initialize(app); end
483
+
484
+ def call(env); end
485
+ end
486
+
487
+ Rack::LINK = T.let(T.unsafe(nil), String)
488
+
489
+ class Rack::Lint
490
+ include(::Rack::Lint::Assertion)
491
+
492
+ def initialize(app); end
493
+
494
+ def _call(env); end
495
+ def call(env = T.unsafe(nil)); end
496
+ def check_content_length(status, headers); end
497
+ def check_content_type(status, headers); end
498
+ def check_env(env); end
499
+ def check_error(error); end
500
+ def check_headers(header); end
501
+ def check_hijack(env); end
502
+ def check_hijack_response(headers, env); end
503
+ def check_input(input); end
504
+ def check_status(status); end
505
+ def close; end
506
+ def each; end
507
+ def verify_content_length(bytes); end
508
+ end
509
+
510
+ module Rack::Lint::Assertion
511
+ def assert(message); end
512
+ end
513
+
514
+ class Rack::Lint::ErrorWrapper
515
+ include(::Rack::Lint::Assertion)
516
+
517
+ def initialize(error); end
518
+
519
+ def close(*args); end
520
+ def flush; end
521
+ def puts(str); end
522
+ def write(str); end
523
+ end
524
+
525
+ class Rack::Lint::HijackWrapper
526
+ include(::Rack::Lint::Assertion)
527
+ extend(::Forwardable)
528
+
529
+ def initialize(io); end
530
+
531
+ def close(*args, &block); end
532
+ def close_read(*args, &block); end
533
+ def close_write(*args, &block); end
534
+ def closed?(*args, &block); end
535
+ def flush(*args, &block); end
536
+ def read(*args, &block); end
537
+ def read_nonblock(*args, &block); end
538
+ def write(*args, &block); end
539
+ def write_nonblock(*args, &block); end
540
+ end
541
+
542
+ Rack::Lint::HijackWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array)
543
+
544
+ class Rack::Lint::InputWrapper
545
+ include(::Rack::Lint::Assertion)
546
+
547
+ def initialize(input); end
548
+
549
+ def close(*args); end
550
+ def each(*args); end
551
+ def gets(*args); end
552
+ def read(*args); end
553
+ def rewind(*args); end
554
+ end
555
+
556
+ class Rack::Lint::LintError < ::RuntimeError
557
+ end
558
+
559
+ class Rack::Lock
560
+ def initialize(app, mutex = T.unsafe(nil)); end
561
+
562
+ def call(env); end
563
+
564
+ private
565
+
566
+ def unlock; end
567
+ end
568
+
569
+ class Rack::Logger
570
+ def initialize(app, level = T.unsafe(nil)); end
571
+
572
+ def call(env); end
573
+ end
574
+
575
+ class Rack::MediaType
576
+ class << self
577
+ def params(content_type); end
578
+ def type(content_type); end
579
+
580
+ private
581
+
582
+ def strip_doublequotes(str); end
583
+ end
584
+ end
585
+
586
+ Rack::MediaType::SPLIT_PATTERN = T.let(T.unsafe(nil), Regexp)
587
+
588
+ class Rack::MethodOverride
589
+ def initialize(app); end
590
+
591
+ def call(env); end
592
+ def method_override(env); end
593
+
594
+ private
595
+
596
+ def allowed_methods; end
597
+ def method_override_param(req); end
598
+ end
599
+
600
+ Rack::MethodOverride::ALLOWED_METHODS = T.let(T.unsafe(nil), Array)
601
+
602
+ Rack::MethodOverride::HTTP_METHODS = T.let(T.unsafe(nil), Array)
603
+
604
+ Rack::MethodOverride::HTTP_METHOD_OVERRIDE_HEADER = T.let(T.unsafe(nil), String)
605
+
606
+ Rack::MethodOverride::METHOD_OVERRIDE_PARAM_KEY = T.let(T.unsafe(nil), String)
607
+
608
+ module Rack::Mime
609
+
610
+ private
611
+
612
+ def match?(value, matcher); end
613
+ def mime_type(ext, fallback = T.unsafe(nil)); end
614
+
615
+ class << self
616
+ def match?(value, matcher); end
617
+ def mime_type(ext, fallback = T.unsafe(nil)); end
618
+ end
619
+ end
620
+
621
+ Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash)
622
+
623
+ class Rack::MockRequest
624
+ def initialize(app); end
625
+
626
+ def delete(uri, opts = T.unsafe(nil)); end
627
+ def get(uri, opts = T.unsafe(nil)); end
628
+ def head(uri, opts = T.unsafe(nil)); end
629
+ def options(uri, opts = T.unsafe(nil)); end
630
+ def patch(uri, opts = T.unsafe(nil)); end
631
+ def post(uri, opts = T.unsafe(nil)); end
632
+ def put(uri, opts = T.unsafe(nil)); end
633
+ def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end
634
+
635
+ class << self
636
+ def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end
637
+ def parse_uri_rfc2396(uri); end
638
+ end
639
+ end
640
+
641
+ Rack::MockRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash)
642
+
643
+ class Rack::MockRequest::FatalWarner
644
+ def flush; end
645
+ def puts(warning); end
646
+ def string; end
647
+ def write(warning); end
648
+ end
649
+
650
+ class Rack::MockRequest::FatalWarning < ::RuntimeError
651
+ end
652
+
653
+ class Rack::MockResponse < ::Rack::Response
654
+ def initialize(status, headers, body, errors = T.unsafe(nil)); end
655
+
656
+ def =~(other); end
657
+ def body; end
658
+ def cookie(name); end
659
+ def cookies; end
660
+ def empty?; end
661
+ def errors; end
662
+ def errors=(_); end
663
+ def match(other); end
664
+ def original_headers; end
665
+
666
+ private
667
+
668
+ def identify_cookie_attributes(cookie_filling); end
669
+ def parse_cookies_from_header; end
670
+
671
+ class << self
672
+ def [](*_); end
673
+ end
674
+ end
675
+
676
+ module Rack::Multipart
677
+ class << self
678
+ def build_multipart(params, first = T.unsafe(nil)); end
679
+ def extract_multipart(req, params = T.unsafe(nil)); end
680
+ def parse_multipart(env, params = T.unsafe(nil)); end
681
+ end
682
+ end
683
+
684
+ Rack::Multipart::ATTRIBUTE = T.let(T.unsafe(nil), Regexp)
685
+
686
+ Rack::Multipart::ATTRIBUTE_CHAR = T.let(T.unsafe(nil), Regexp)
687
+
688
+ Rack::Multipart::BROKEN_QUOTED = T.let(T.unsafe(nil), Regexp)
689
+
690
+ Rack::Multipart::BROKEN_UNQUOTED = T.let(T.unsafe(nil), Regexp)
691
+
692
+ Rack::Multipart::CONDISP = T.let(T.unsafe(nil), Regexp)
693
+
694
+ Rack::Multipart::DISPPARM = T.let(T.unsafe(nil), Regexp)
695
+
696
+ Rack::Multipart::EOL = T.let(T.unsafe(nil), String)
697
+
698
+ Rack::Multipart::EXTENDED_INITIAL_NAME = T.let(T.unsafe(nil), Regexp)
699
+
700
+ Rack::Multipart::EXTENDED_INITIAL_PARAMETER = T.let(T.unsafe(nil), Regexp)
701
+
702
+ Rack::Multipart::EXTENDED_INITIAL_VALUE = T.let(T.unsafe(nil), Regexp)
703
+
704
+ Rack::Multipart::EXTENDED_OTHER_NAME = T.let(T.unsafe(nil), Regexp)
705
+
706
+ Rack::Multipart::EXTENDED_OTHER_PARAMETER = T.let(T.unsafe(nil), Regexp)
707
+
708
+ Rack::Multipart::EXTENDED_OTHER_VALUE = T.let(T.unsafe(nil), Regexp)
709
+
710
+ Rack::Multipart::EXTENDED_PARAMETER = T.let(T.unsafe(nil), Regexp)
711
+
712
+ class Rack::Multipart::Generator
713
+ def initialize(params, first = T.unsafe(nil)); end
714
+
715
+ def dump; end
716
+
717
+ private
718
+
719
+ def content_for_other(file, name); end
720
+ def content_for_tempfile(io, file, name); end
721
+ def flattened_params; end
722
+ def multipart?; end
723
+ end
724
+
725
+ Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp)
726
+
727
+ Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String)
728
+
729
+ Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp)
730
+
731
+ Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp)
732
+
733
+ Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp)
734
+
735
+ class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE
736
+ end
737
+
738
+ class Rack::Multipart::Parser
739
+ def initialize(boundary, tempfile, bufsize, query_parser); end
740
+
741
+ def on_read(content); end
742
+ def result; end
743
+ def state; end
744
+
745
+ private
746
+
747
+ def consume_boundary; end
748
+ def full_boundary; end
749
+ def get_filename(head); end
750
+ def handle_consume_token; end
751
+ def handle_empty_content!(content); end
752
+ def handle_fast_forward; end
753
+ def handle_mime_body; end
754
+ def handle_mime_head; end
755
+ def run_parser; end
756
+ def tag_multipart_encoding(filename, content_type, name, body); end
757
+
758
+ class << self
759
+ def parse(io, content_length, content_type, tmpfile, bufsize, qp); end
760
+ def parse_boundary(content_type); end
761
+ end
762
+ end
763
+
764
+ Rack::Multipart::Parser::BOUNDARY_REGEX = T.let(T.unsafe(nil), Regexp)
765
+
766
+ Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer)
767
+
768
+ class Rack::Multipart::Parser::BoundedIO
769
+ def initialize(io, content_length); end
770
+
771
+ def read(size, outbuf = T.unsafe(nil)); end
772
+ def rewind; end
773
+ end
774
+
775
+ Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String)
776
+
777
+ class Rack::Multipart::Parser::Collector
778
+ include(::Enumerable)
779
+
780
+ def initialize(tempfile); end
781
+
782
+ def each; end
783
+ def on_mime_body(mime_index, content); end
784
+ def on_mime_finish(mime_index); end
785
+ def on_mime_head(mime_index, head, filename, content_type, name); end
786
+
787
+ private
788
+
789
+ def check_open_files; end
790
+ end
791
+
792
+ class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart
793
+ def close; end
794
+ def file?; end
795
+ end
796
+
797
+ class Rack::Multipart::Parser::Collector::MimePart < ::Struct
798
+ def get_data; end
799
+ end
800
+
801
+ class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart
802
+ def close; end
803
+ def file?; end
804
+ end
805
+
806
+ Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo)
807
+
808
+ class Rack::Multipart::Parser::MultipartInfo < ::Struct
809
+ def params; end
810
+ def params=(_); end
811
+ def tmp_files; end
812
+ def tmp_files=(_); end
813
+
814
+ class << self
815
+ def [](*_); end
816
+ def inspect; end
817
+ def members; end
818
+ def new(*_); end
819
+ end
820
+ end
821
+
822
+ Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc)
823
+
824
+ Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String)
825
+
826
+ Rack::Multipart::REGULAR_PARAMETER = T.let(T.unsafe(nil), Regexp)
827
+
828
+ Rack::Multipart::REGULAR_PARAMETER_NAME = T.let(T.unsafe(nil), Regexp)
829
+
830
+ Rack::Multipart::RFC2183 = T.let(T.unsafe(nil), Regexp)
831
+
832
+ Rack::Multipart::SECTION = T.let(T.unsafe(nil), Regexp)
833
+
834
+ Rack::Multipart::TOKEN = T.let(T.unsafe(nil), Regexp)
835
+
836
+ class Rack::Multipart::UploadedFile
837
+ def initialize(filepath = T.unsafe(nil), ct = T.unsafe(nil), bin = T.unsafe(nil), path: T.unsafe(nil), content_type: T.unsafe(nil), binary: T.unsafe(nil), filename: T.unsafe(nil), io: T.unsafe(nil)); end
838
+
839
+ def content_type; end
840
+ def content_type=(_); end
841
+ def local_path; end
842
+ def method_missing(method_name, *args, &block); end
843
+ def original_filename; end
844
+ def path; end
845
+ def respond_to?(*args); end
846
+ end
847
+
848
+ Rack::Multipart::VALUE = T.let(T.unsafe(nil), Regexp)
849
+
850
+ class Rack::NullLogger
851
+ def initialize(app); end
852
+
853
+ def <<(msg); end
854
+ def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end
855
+ def call(env); end
856
+ def close; end
857
+ def datetime_format; end
858
+ def datetime_format=(datetime_format); end
859
+ def debug(progname = T.unsafe(nil), &block); end
860
+ def debug?; end
861
+ def error(progname = T.unsafe(nil), &block); end
862
+ def error?; end
863
+ def fatal(progname = T.unsafe(nil), &block); end
864
+ def fatal?; end
865
+ def formatter; end
866
+ def formatter=(formatter); end
867
+ def info(progname = T.unsafe(nil), &block); end
868
+ def info?; end
869
+ def level; end
870
+ def level=(level); end
871
+ def progname; end
872
+ def progname=(progname); end
873
+ def sev_threshold; end
874
+ def sev_threshold=(sev_threshold); end
875
+ def unknown(progname = T.unsafe(nil), &block); end
876
+ def warn(progname = T.unsafe(nil), &block); end
877
+ def warn?; end
878
+ end
879
+
880
+ Rack::OPTIONS = T.let(T.unsafe(nil), String)
881
+
882
+ Rack::PATCH = T.let(T.unsafe(nil), String)
883
+
884
+ Rack::PATH_INFO = T.let(T.unsafe(nil), String)
885
+
886
+ Rack::POST = T.let(T.unsafe(nil), String)
887
+
888
+ Rack::PUT = T.let(T.unsafe(nil), String)
889
+
890
+ Rack::QUERY_STRING = T.let(T.unsafe(nil), String)
891
+
892
+ class Rack::QueryParser
893
+ def initialize(params_class, key_space_limit, param_depth_limit); end
894
+
895
+ def key_space_limit; end
896
+ def make_params; end
897
+ def new_depth_limit(param_depth_limit); end
898
+ def new_space_limit(key_space_limit); end
899
+ def normalize_params(params, name, v, depth); end
900
+ def param_depth_limit; end
901
+ def parse_nested_query(qs, d = T.unsafe(nil)); end
902
+ def parse_query(qs, d = T.unsafe(nil), &unescaper); end
903
+
904
+ private
905
+
906
+ def params_hash_has_key?(hash, key); end
907
+ def params_hash_type?(obj); end
908
+ def unescape(s); end
909
+
910
+ class << self
911
+ def make_default(key_space_limit, param_depth_limit); end
912
+ end
913
+ end
914
+
915
+ Rack::QueryParser::COMMON_SEP = T.let(T.unsafe(nil), Hash)
916
+
917
+ Rack::QueryParser::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp)
918
+
919
+ class Rack::QueryParser::InvalidParameterError < ::ArgumentError
920
+ end
921
+
922
+ class Rack::QueryParser::ParameterTypeError < ::TypeError
923
+ end
924
+
925
+ class Rack::QueryParser::Params
926
+ def initialize(limit); end
927
+
928
+ def [](key); end
929
+ def []=(key, value); end
930
+ def key?(key); end
931
+ def to_h; end
932
+ def to_params_hash; end
933
+ end
934
+
935
+ Rack::RACK_ERRORS = T.let(T.unsafe(nil), String)
936
+
937
+ Rack::RACK_HIJACK = T.let(T.unsafe(nil), String)
938
+
939
+ Rack::RACK_HIJACK_IO = T.let(T.unsafe(nil), String)
940
+
941
+ Rack::RACK_INPUT = T.let(T.unsafe(nil), String)
942
+
943
+ Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String)
944
+
945
+ Rack::RACK_LOGGER = T.let(T.unsafe(nil), String)
946
+
947
+ Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String)
948
+
949
+ Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String)
950
+
951
+ Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String)
952
+
953
+ Rack::RACK_MULTIPROCESS = T.let(T.unsafe(nil), String)
954
+
955
+ Rack::RACK_MULTITHREAD = T.let(T.unsafe(nil), String)
956
+
957
+ Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String)
958
+
959
+ Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String)
960
+
961
+ Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String)
962
+
963
+ Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String)
964
+
965
+ Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String)
966
+
967
+ Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String)
968
+
969
+ Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String)
970
+
971
+ Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String)
972
+
973
+ Rack::RACK_RUNONCE = T.let(T.unsafe(nil), String)
974
+
975
+ Rack::RACK_SESSION = T.let(T.unsafe(nil), String)
976
+
977
+ Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String)
978
+
979
+ Rack::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String)
980
+
981
+ Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String)
982
+
983
+ Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String)
984
+
985
+ Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String)
986
+
987
+ Rack::RACK_VERSION = T.let(T.unsafe(nil), String)
988
+
989
+ Rack::RELEASE = T.let(T.unsafe(nil), String)
990
+
991
+ Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String)
992
+
993
+ Rack::REQUEST_PATH = T.let(T.unsafe(nil), String)
994
+
995
+ class Rack::Recursive
996
+ def initialize(app); end
997
+
998
+ def _call(env); end
999
+ def call(env); end
1000
+ def include(env, path); end
1001
+ end
1002
+
1003
+ class Rack::Reloader
1004
+ def initialize(app, cooldown = T.unsafe(nil), backend = T.unsafe(nil)); end
1005
+
1006
+ def call(env); end
1007
+ def reload!(stderr = T.unsafe(nil)); end
1008
+ def safe_load(file, mtime, stderr = T.unsafe(nil)); end
1009
+ end
1010
+
1011
+ module Rack::Reloader::Stat
1012
+ def figure_path(file, paths); end
1013
+ def rotation; end
1014
+ def safe_stat(file); end
1015
+ end
1016
+
1017
+ class Rack::Request
1018
+ include(::Rack::Request::Env)
1019
+ include(::Rack::Request::Helpers)
1020
+
1021
+ def initialize(env); end
1022
+
1023
+ def delete_param(k); end
1024
+ def params; end
1025
+ def update_param(k, v); end
1026
+
1027
+ class << self
1028
+ def ip_filter; end
1029
+ def ip_filter=(_); end
1030
+ end
1031
+ end
1032
+
1033
+ Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array)
1034
+
1035
+ module Rack::Request::Env
1036
+ def initialize(env); end
1037
+
1038
+ def add_header(key, v); end
1039
+ def delete_header(name); end
1040
+ def each_header(&block); end
1041
+ def env; end
1042
+ def fetch_header(name, &block); end
1043
+ def get_header(name); end
1044
+ def has_header?(name); end
1045
+ def set_header(name, v); end
1046
+
1047
+ private
1048
+
1049
+ def initialize_copy(other); end
1050
+ end
1051
+
1052
+ module Rack::Request::Helpers
1053
+ def GET; end
1054
+ def POST; end
1055
+ def [](key); end
1056
+ def []=(key, value); end
1057
+ def accept_encoding; end
1058
+ def accept_language; end
1059
+ def authority; end
1060
+ def base_url; end
1061
+ def body; end
1062
+ def content_charset; end
1063
+ def content_length; end
1064
+ def content_type; end
1065
+ def cookies; end
1066
+ def delete?; end
1067
+ def delete_param(k); end
1068
+ def form_data?; end
1069
+ def forwarded_authority; end
1070
+ def forwarded_for; end
1071
+ def forwarded_port; end
1072
+ def fullpath; end
1073
+ def get?; end
1074
+ def head?; end
1075
+ def host; end
1076
+ def host_authority; end
1077
+ def host_with_port(authority = T.unsafe(nil)); end
1078
+ def hostname; end
1079
+ def ip; end
1080
+ def link?; end
1081
+ def logger; end
1082
+ def media_type; end
1083
+ def media_type_params; end
1084
+ def multithread?; end
1085
+ def options?; end
1086
+ def params; end
1087
+ def parseable_data?; end
1088
+ def patch?; end
1089
+ def path; end
1090
+ def path_info; end
1091
+ def path_info=(s); end
1092
+ def port; end
1093
+ def post?; end
1094
+ def put?; end
1095
+ def query_string; end
1096
+ def referer; end
1097
+ def referrer; end
1098
+ def request_method; end
1099
+ def scheme; end
1100
+ def script_name; end
1101
+ def script_name=(s); end
1102
+ def server_authority; end
1103
+ def server_name; end
1104
+ def server_port; end
1105
+ def session; end
1106
+ def session_options; end
1107
+ def ssl?; end
1108
+ def trace?; end
1109
+ def trusted_proxy?(ip); end
1110
+ def unlink?; end
1111
+ def update_param(k, v); end
1112
+ def url; end
1113
+ def user_agent; end
1114
+ def values_at(*keys); end
1115
+ def xhr?; end
1116
+
1117
+ private
1118
+
1119
+ def allowed_scheme(header); end
1120
+ def default_session; end
1121
+ def extract_proto_header(header); end
1122
+ def forwarded_scheme; end
1123
+ def parse_http_accept_header(header); end
1124
+ def parse_multipart; end
1125
+ def parse_query(qs, d = T.unsafe(nil)); end
1126
+ def query_parser; end
1127
+ def reject_trusted_ip_addresses(ip_addresses); end
1128
+ def split_authority(authority); end
1129
+ def split_header(value); end
1130
+ def wrap_ipv6(host); end
1131
+ end
1132
+
1133
+ Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash)
1134
+
1135
+ Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array)
1136
+
1137
+ Rack::Request::Helpers::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String)
1138
+
1139
+ Rack::Request::Helpers::HTTP_X_FORWARDED_HOST = T.let(T.unsafe(nil), String)
1140
+
1141
+ Rack::Request::Helpers::HTTP_X_FORWARDED_PORT = T.let(T.unsafe(nil), String)
1142
+
1143
+ Rack::Request::Helpers::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String)
1144
+
1145
+ Rack::Request::Helpers::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String)
1146
+
1147
+ Rack::Request::Helpers::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String)
1148
+
1149
+ Rack::Request::Helpers::PARSEABLE_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array)
1150
+
1151
+ Rack::Request::SCHEME_WHITELIST = T.let(T.unsafe(nil), Array)
1152
+
1153
+ class Rack::Response
1154
+ include(::Rack::Response::Helpers)
1155
+
1156
+ def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end
1157
+
1158
+ def [](key); end
1159
+ def []=(key, v); end
1160
+ def body; end
1161
+ def body=(_); end
1162
+ def chunked?; end
1163
+ def close; end
1164
+ def delete_header(key); end
1165
+ def each(&callback); end
1166
+ def empty?; end
1167
+ def finish(&block); end
1168
+ def get_header(key); end
1169
+ def has_header?(key); end
1170
+ def header; end
1171
+ def headers; end
1172
+ def length; end
1173
+ def length=(_); end
1174
+ def redirect(target, status = T.unsafe(nil)); end
1175
+ def set_header(key, v); end
1176
+ def status; end
1177
+ def status=(_); end
1178
+ def to_a(&block); end
1179
+ def write(chunk); end
1180
+
1181
+ class << self
1182
+ def [](status, headers, body); end
1183
+ end
1184
+ end
1185
+
1186
+ Rack::Response::CHUNKED = T.let(T.unsafe(nil), String)
1187
+
1188
+ module Rack::Response::Helpers
1189
+ def accepted?; end
1190
+ def add_header(key, v); end
1191
+ def bad_request?; end
1192
+ def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end
1193
+ def cache_control; end
1194
+ def cache_control=(v); end
1195
+ def client_error?; end
1196
+ def content_length; end
1197
+ def content_type; end
1198
+ def content_type=(content_type); end
1199
+ def created?; end
1200
+ def delete_cookie(key, value = T.unsafe(nil)); end
1201
+ def do_not_cache!; end
1202
+ def etag; end
1203
+ def etag=(v); end
1204
+ def forbidden?; end
1205
+ def include?(header); end
1206
+ def informational?; end
1207
+ def invalid?; end
1208
+ def location; end
1209
+ def location=(location); end
1210
+ def media_type; end
1211
+ def media_type_params; end
1212
+ def method_not_allowed?; end
1213
+ def moved_permanently?; end
1214
+ def no_content?; end
1215
+ def not_found?; end
1216
+ def ok?; end
1217
+ def precondition_failed?; end
1218
+ def redirect?; end
1219
+ def redirection?; end
1220
+ def server_error?; end
1221
+ def set_cookie(key, value); end
1222
+ def set_cookie_header; end
1223
+ def set_cookie_header=(v); end
1224
+ def successful?; end
1225
+ def unauthorized?; end
1226
+ def unprocessable?; end
1227
+
1228
+ protected
1229
+
1230
+ def append(chunk); end
1231
+ def buffered_body!; end
1232
+ end
1233
+
1234
+ class Rack::Response::Raw
1235
+ include(::Rack::Response::Helpers)
1236
+
1237
+ def initialize(status, headers); end
1238
+
1239
+ def delete_header(key); end
1240
+ def get_header(key); end
1241
+ def has_header?(key); end
1242
+ def headers; end
1243
+ def set_header(key, v); end
1244
+ def status; end
1245
+ def status=(_); end
1246
+ end
1247
+
1248
+ Rack::Response::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash)
1249
+
1250
+ class Rack::RewindableInput
1251
+ def initialize(io); end
1252
+
1253
+ def close; end
1254
+ def each(&block); end
1255
+ def gets; end
1256
+ def read(*args); end
1257
+ def rewind; end
1258
+
1259
+ private
1260
+
1261
+ def filesystem_has_posix_semantics?; end
1262
+ def make_rewindable; end
1263
+ end
1264
+
1265
+ class Rack::Runtime
1266
+ def initialize(app, name = T.unsafe(nil)); end
1267
+
1268
+ def call(env); end
1269
+ end
1270
+
1271
+ Rack::Runtime::FORMAT_STRING = T.let(T.unsafe(nil), String)
1272
+
1273
+ Rack::Runtime::HEADER_NAME = T.let(T.unsafe(nil), String)
1274
+
1275
+ Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String)
1276
+
1277
+ Rack::SERVER_NAME = T.let(T.unsafe(nil), String)
1278
+
1279
+ Rack::SERVER_PORT = T.let(T.unsafe(nil), String)
1280
+
1281
+ Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String)
1282
+
1283
+ Rack::SET_COOKIE = T.let(T.unsafe(nil), String)
1284
+
1285
+ class Rack::Sendfile
1286
+ def initialize(app, variation = T.unsafe(nil), mappings = T.unsafe(nil)); end
1287
+
1288
+ def call(env); end
1289
+
1290
+ private
1291
+
1292
+ def map_accel_path(env, path); end
1293
+ def variation(env); end
1294
+ end
1295
+
1296
+ class Rack::Server
1297
+ def initialize(options = T.unsafe(nil)); end
1298
+
1299
+ def app; end
1300
+ def default_options; end
1301
+ def middleware; end
1302
+ def options; end
1303
+ def options=(_); end
1304
+ def server; end
1305
+ def start(&block); end
1306
+
1307
+ private
1308
+
1309
+ def build_app(app); end
1310
+ def build_app_and_options_from_config; end
1311
+ def build_app_from_string; end
1312
+ def check_pid!; end
1313
+ def daemonize_app; end
1314
+ def handle_profiling(heapfile, profile_mode, filename); end
1315
+ def make_profile_name(filename); end
1316
+ def opt_parser; end
1317
+ def parse_options(args); end
1318
+ def pidfile_process_status; end
1319
+ def wrapped_app; end
1320
+ def write_pid; end
1321
+
1322
+ class << self
1323
+ def default_middleware_by_environment; end
1324
+ def logging_middleware; end
1325
+ def middleware; end
1326
+ def start(options = T.unsafe(nil)); end
1327
+ end
1328
+ end
1329
+
1330
+ class Rack::Server::Options
1331
+ def handler_opts(options); end
1332
+ def parse!(args); end
1333
+ end
1334
+
1335
+ module Rack::Session
1336
+ end
1337
+
1338
+ module Rack::Session::Abstract
1339
+ end
1340
+
1341
+ class Rack::Session::Abstract::ID < ::Rack::Session::Abstract::Persisted
1342
+ def delete_session(req, sid, options); end
1343
+ def find_session(req, sid); end
1344
+ def write_session(req, sid, session, options); end
1345
+
1346
+ class << self
1347
+ def inherited(klass); end
1348
+ end
1349
+ end
1350
+
1351
+ class Rack::Session::Abstract::Persisted
1352
+ def initialize(app, options = T.unsafe(nil)); end
1353
+
1354
+ def call(env); end
1355
+ def commit_session(req, res); end
1356
+ def context(env, app = T.unsafe(nil)); end
1357
+ def default_options; end
1358
+ def key; end
1359
+ def sid_secure; end
1360
+
1361
+ private
1362
+
1363
+ def commit_session?(req, session, options); end
1364
+ def cookie_value(data); end
1365
+ def current_session_id(req); end
1366
+ def delete_session(req, sid, options); end
1367
+ def extract_session_id(request); end
1368
+ def find_session(env, sid); end
1369
+ def force_options?(options); end
1370
+ def forced_session_update?(session, options); end
1371
+ def generate_sid(secure = T.unsafe(nil)); end
1372
+ def initialize_sid; end
1373
+ def load_session(req); end
1374
+ def loaded_session?(session); end
1375
+ def make_request(env); end
1376
+ def prepare_session(req); end
1377
+ def security_matches?(request, options); end
1378
+ def session_class; end
1379
+ def session_exists?(req); end
1380
+ def set_cookie(request, res, cookie); end
1381
+ def write_session(req, sid, session, options); end
1382
+ end
1383
+
1384
+ Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1385
+
1386
+ class Rack::Session::Abstract::PersistedSecure < ::Rack::Session::Abstract::Persisted
1387
+ def extract_session_id(*_); end
1388
+ def generate_sid(*_); end
1389
+
1390
+ private
1391
+
1392
+ def cookie_value(data); end
1393
+ def session_class; end
1394
+ end
1395
+
1396
+ class Rack::Session::Abstract::PersistedSecure::SecureSessionHash < ::Rack::Session::Abstract::SessionHash
1397
+ def [](key); end
1398
+ end
1399
+
1400
+ class Rack::Session::Abstract::SessionHash
1401
+ include(::Enumerable)
1402
+
1403
+ def initialize(store, req); end
1404
+
1405
+ def [](key); end
1406
+ def []=(key, value); end
1407
+ def clear; end
1408
+ def delete(key); end
1409
+ def destroy; end
1410
+ def dig(key, *keys); end
1411
+ def each(&block); end
1412
+ def empty?; end
1413
+ def exists?; end
1414
+ def fetch(key, default = T.unsafe(nil), &block); end
1415
+ def has_key?(key); end
1416
+ def id; end
1417
+ def id=(_); end
1418
+ def include?(key); end
1419
+ def inspect; end
1420
+ def key?(key); end
1421
+ def keys; end
1422
+ def loaded?; end
1423
+ def merge!(hash); end
1424
+ def options; end
1425
+ def replace(hash); end
1426
+ def store(key, value); end
1427
+ def to_hash; end
1428
+ def update(hash); end
1429
+ def values; end
1430
+
1431
+ private
1432
+
1433
+ def load!; end
1434
+ def load_for_read!; end
1435
+ def load_for_write!; end
1436
+ def stringify_keys(other); end
1437
+
1438
+ class << self
1439
+ def find(req); end
1440
+ def set(req, session); end
1441
+ def set_options(req, options); end
1442
+ end
1443
+ end
1444
+
1445
+ Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object)
1446
+
1447
+ class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure
1448
+ def initialize(app, options = T.unsafe(nil)); end
1449
+
1450
+ def coder; end
1451
+
1452
+ private
1453
+
1454
+ def delete_session(req, session_id, options); end
1455
+ def digest_match?(data, digest); end
1456
+ def extract_session_id(request); end
1457
+ def find_session(req, sid); end
1458
+ def generate_hmac(data, secret); end
1459
+ def persistent_session_id!(data, sid = T.unsafe(nil)); end
1460
+ def secure?(options); end
1461
+ def unpacked_cookie_data(request); end
1462
+ def write_session(req, session_id, session, options); end
1463
+ end
1464
+
1465
+ class Rack::Session::Cookie::Base64
1466
+ def decode(str); end
1467
+ def encode(str); end
1468
+ end
1469
+
1470
+ class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64
1471
+ def decode(str); end
1472
+ def encode(obj); end
1473
+ end
1474
+
1475
+ class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64
1476
+ def decode(str); end
1477
+ def encode(str); end
1478
+ end
1479
+
1480
+ class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64
1481
+ def decode(str); end
1482
+ def encode(obj); end
1483
+ end
1484
+
1485
+ class Rack::Session::Cookie::Identity
1486
+ def decode(str); end
1487
+ def encode(str); end
1488
+ end
1489
+
1490
+ class Rack::Session::Cookie::SessionId
1491
+ def initialize(session_id, cookie_value); end
1492
+
1493
+ def cookie_value; end
1494
+ end
1495
+
1496
+ class Rack::Session::Pool < ::Rack::Session::Abstract::PersistedSecure
1497
+ def initialize(app, options = T.unsafe(nil)); end
1498
+
1499
+ def delete_session(req, session_id, options); end
1500
+ def find_session(req, sid); end
1501
+ def generate_sid; end
1502
+ def mutex; end
1503
+ def pool; end
1504
+ def with_lock(req); end
1505
+ def write_session(req, session_id, new_session, options); end
1506
+
1507
+ private
1508
+
1509
+ def get_session_with_fallback(sid); end
1510
+ end
1511
+
1512
+ Rack::Session::Pool::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1513
+
1514
+ class Rack::Session::SessionId
1515
+ def initialize(public_id); end
1516
+
1517
+ def cookie_value; end
1518
+ def empty?; end
1519
+ def inspect; end
1520
+ def private_id; end
1521
+ def public_id; end
1522
+ def to_s; end
1523
+
1524
+ private
1525
+
1526
+ def hash_sid(sid); end
1527
+ end
1528
+
1529
+ Rack::Session::SessionId::ID_VERSION = T.let(T.unsafe(nil), Integer)
1530
+
1531
+ class Rack::ShowExceptions
1532
+ def initialize(app); end
1533
+
1534
+ def call(env); end
1535
+ def dump_exception(exception); end
1536
+ def h(obj); end
1537
+ def prefers_plaintext?(env); end
1538
+ def pretty(env, exception); end
1539
+ def template; end
1540
+
1541
+ private
1542
+
1543
+ def accepts_html?(env); end
1544
+ end
1545
+
1546
+ Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer)
1547
+
1548
+ Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB)
1549
+
1550
+ class Rack::ShowStatus
1551
+ def initialize(app); end
1552
+
1553
+ def call(env); end
1554
+ def h(obj); end
1555
+ end
1556
+
1557
+ Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String)
1558
+
1559
+ class Rack::Static
1560
+ def initialize(app, options = T.unsafe(nil)); end
1561
+
1562
+ def add_index_root?(path); end
1563
+ def applicable_rules(path); end
1564
+ def call(env); end
1565
+ def can_serve(path); end
1566
+ def overwrite_file_path(path); end
1567
+ def route_file(path); end
1568
+ end
1569
+
1570
+ Rack::TRACE = T.let(T.unsafe(nil), String)
1571
+
1572
+ Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String)
1573
+
1574
+ class Rack::TempfileReaper
1575
+ def initialize(app); end
1576
+
1577
+ def call(env); end
1578
+ end
1579
+
1580
+ Rack::UNLINK = T.let(T.unsafe(nil), String)
1581
+
1582
+ class Rack::URLMap
1583
+ def initialize(map = T.unsafe(nil)); end
1584
+
1585
+ def call(env); end
1586
+ def remap(map); end
1587
+
1588
+ private
1589
+
1590
+ def casecmp?(v1, v2); end
1591
+ end
1592
+
1593
+ module Rack::Utils
1594
+
1595
+ private
1596
+
1597
+ def add_cookie_to_header(header, key, value); end
1598
+ def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end
1599
+ def best_q_match(q_value_header, available_mimes); end
1600
+ def build_nested_query(value, prefix = T.unsafe(nil)); end
1601
+ def build_query(params); end
1602
+ def byte_ranges(env, size); end
1603
+ def clean_path_info(path_info); end
1604
+ def clock_time; end
1605
+ def delete_cookie_header!(header, key, value = T.unsafe(nil)); end
1606
+ def escape(s); end
1607
+ def escape_html(string); end
1608
+ def escape_path(s); end
1609
+ def get_byte_ranges(http_range, size); end
1610
+ def make_delete_cookie_header(header, key, value); end
1611
+ def parse_cookies(env); end
1612
+ def parse_cookies_header(header); end
1613
+ def parse_nested_query(qs, d = T.unsafe(nil)); end
1614
+ def parse_query(qs, d = T.unsafe(nil), &unescaper); end
1615
+ def q_values(q_value_header); end
1616
+ def rfc2109(time); end
1617
+ def rfc2822(time); end
1618
+ def secure_compare(a, b); end
1619
+ def select_best_encoding(available_encodings, accept_encoding); end
1620
+ def set_cookie_header!(header, key, value); end
1621
+ def status_code(status); end
1622
+ def unescape(s, encoding = T.unsafe(nil)); end
1623
+ def unescape_path(s); end
1624
+ def valid_path?(path); end
1625
+
1626
+ class << self
1627
+ def add_cookie_to_header(header, key, value); end
1628
+ def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end
1629
+ def best_q_match(q_value_header, available_mimes); end
1630
+ def build_nested_query(value, prefix = T.unsafe(nil)); end
1631
+ def build_query(params); end
1632
+ def byte_ranges(env, size); end
1633
+ def clean_path_info(path_info); end
1634
+ def clock_time; end
1635
+ def default_query_parser; end
1636
+ def default_query_parser=(_); end
1637
+ def delete_cookie_header!(header, key, value = T.unsafe(nil)); end
1638
+ def escape(s); end
1639
+ def escape_html(string); end
1640
+ def escape_path(s); end
1641
+ def get_byte_ranges(http_range, size); end
1642
+ def key_space_limit; end
1643
+ def key_space_limit=(v); end
1644
+ def make_delete_cookie_header(header, key, value); end
1645
+ def multipart_part_limit; end
1646
+ def multipart_part_limit=(_); end
1647
+ def param_depth_limit; end
1648
+ def param_depth_limit=(v); end
1649
+ def parse_cookies(env); end
1650
+ def parse_cookies_header(header); end
1651
+ def parse_nested_query(qs, d = T.unsafe(nil)); end
1652
+ def parse_query(qs, d = T.unsafe(nil), &unescaper); end
1653
+ def q_values(q_value_header); end
1654
+ def rfc2109(time); end
1655
+ def rfc2822(time); end
1656
+ def secure_compare(a, b); end
1657
+ def select_best_encoding(available_encodings, accept_encoding); end
1658
+ def set_cookie_header!(header, key, value); end
1659
+ def status_code(status); end
1660
+ def unescape(s, encoding = T.unsafe(nil)); end
1661
+ def unescape_path(s); end
1662
+ def valid_path?(path); end
1663
+ end
1664
+ end
1665
+
1666
+ Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash)
1667
+
1668
+ class Rack::Utils::Context
1669
+ def initialize(app_f, app_r); end
1670
+
1671
+ def app; end
1672
+ def call(env); end
1673
+ def context(env, app = T.unsafe(nil)); end
1674
+ def for; end
1675
+ def recontext(app); end
1676
+ end
1677
+
1678
+ Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp)
1679
+
1680
+ Rack::Utils::ESCAPE_HTML = T.let(T.unsafe(nil), Hash)
1681
+
1682
+ Rack::Utils::ESCAPE_HTML_PATTERN = T.let(T.unsafe(nil), Regexp)
1683
+
1684
+ Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash)
1685
+
1686
+ class Rack::Utils::HeaderHash < ::Hash
1687
+ def initialize(hash = T.unsafe(nil)); end
1688
+
1689
+ def [](k); end
1690
+ def []=(k, v); end
1691
+ def clear; end
1692
+ def delete(k); end
1693
+ def each; end
1694
+ def has_key?(k); end
1695
+ def include?(k); end
1696
+ def key?(k); end
1697
+ def member?(k); end
1698
+ def merge(other); end
1699
+ def merge!(other); end
1700
+ def replace(other); end
1701
+ def to_hash; end
1702
+
1703
+ protected
1704
+
1705
+ def names; end
1706
+
1707
+ private
1708
+
1709
+ def initialize_copy(other); end
1710
+
1711
+ class << self
1712
+ def [](headers); end
1713
+ end
1714
+ end
1715
+
1716
+ Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError
1717
+
1718
+ Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params
1719
+
1720
+ Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String)
1721
+
1722
+ Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp)
1723
+
1724
+ Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError
1725
+
1726
+ Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash)
1727
+
1728
+ Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash)
1729
+
1730
+ Rack::VERSION = T.let(T.unsafe(nil), Array)