acts-as-messageable 0.4.11 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +1 -0
  3. data/.github/dependabot.yml +8 -0
  4. data/.github/workflows/test.yml +152 -0
  5. data/.rubocop.yml +32 -0
  6. data/.rubocop_todo.yml +75 -0
  7. data/.ruby-version +1 -0
  8. data/Appraisals +35 -11
  9. data/Dockerfile +14 -0
  10. data/Gemfile +22 -9
  11. data/Gemfile.lock +210 -90
  12. data/README.md +31 -14
  13. data/Rakefile +10 -1
  14. data/VERSION +1 -1
  15. data/acts-as-messageable.gemspec +225 -59
  16. data/bin/tapioca +29 -0
  17. data/docker-compose.yml +84 -0
  18. data/gemfiles/rails_3.2.gemfile +22 -10
  19. data/gemfiles/rails_4.2.gemfile +29 -0
  20. data/gemfiles/rails_5.2.gemfile +22 -10
  21. data/gemfiles/rails_6.0.gemfile +22 -10
  22. data/gemfiles/rails_7.0.gemfile +29 -0
  23. data/gemfiles/rails_master.gemfile +29 -0
  24. data/lib/acts-as-messageable.rb +3 -17
  25. data/lib/acts_as_messageable/message.rb +136 -0
  26. data/lib/acts_as_messageable/model.rb +229 -0
  27. data/lib/acts_as_messageable/rails3.rb +46 -0
  28. data/lib/acts_as_messageable/rails4.rb +54 -0
  29. data/lib/acts_as_messageable/rails6.rb +63 -0
  30. data/lib/acts_as_messageable/railtie.rb +12 -0
  31. data/lib/acts_as_messageable/relation.rb +35 -0
  32. data/lib/acts_as_messageable/scopes.rb +53 -0
  33. data/lib/acts_as_messageable.rb +41 -0
  34. data/lib/generators/acts_as_messageable/migration/migration_generator.rb +48 -0
  35. data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration.rb +4 -3
  36. data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +12 -0
  37. data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +16 -0
  38. data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration_permanent.rb +2 -1
  39. data/sorbet/config +4 -0
  40. data/sorbet/rbi/annotations/actionpack.rbi +428 -0
  41. data/sorbet/rbi/annotations/actionview.rbi +77 -0
  42. data/sorbet/rbi/annotations/activerecord.rbi +18 -0
  43. data/sorbet/rbi/annotations/activesupport.rbi +52 -0
  44. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  45. data/sorbet/rbi/annotations/railties.rbi +58 -0
  46. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  47. data/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi +23 -0
  48. data/sorbet/rbi/dsl/abstract_controller/caching.rbi +30 -0
  49. data/sorbet/rbi/dsl/abstract_controller/callbacks.rbi +23 -0
  50. data/sorbet/rbi/dsl/abstract_controller/helpers.rbi +23 -0
  51. data/sorbet/rbi/dsl/abstract_controller/rendering.rbi +9 -0
  52. data/sorbet/rbi/dsl/abstract_controller/url_for.rbi +23 -0
  53. data/sorbet/rbi/dsl/action_controller/caching.rbi +29 -0
  54. data/sorbet/rbi/dsl/action_controller/conditional_get.rbi +23 -0
  55. data/sorbet/rbi/dsl/action_controller/content_security_policy.rbi +31 -0
  56. data/sorbet/rbi/dsl/action_controller/data_streaming.rbi +9 -0
  57. data/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi +24 -0
  58. data/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi +30 -0
  59. data/sorbet/rbi/dsl/action_controller/flash.rbi +19 -0
  60. data/sorbet/rbi/dsl/action_controller/form_builder.rbi +19 -0
  61. data/sorbet/rbi/dsl/action_controller/helpers.rbi +36 -0
  62. data/sorbet/rbi/dsl/action_controller/params_wrapper.rbi +23 -0
  63. data/sorbet/rbi/dsl/action_controller/redirecting.rbi +24 -0
  64. data/sorbet/rbi/dsl/action_controller/renderers/all.rbi +24 -0
  65. data/sorbet/rbi/dsl/action_controller/renderers.rbi +23 -0
  66. data/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi +31 -0
  67. data/sorbet/rbi/dsl/action_controller/rescue.rbi +24 -0
  68. data/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi +24 -0
  69. data/sorbet/rbi/dsl/action_controller/url_for.rbi +24 -0
  70. data/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi +23 -0
  71. data/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi +10 -0
  72. data/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi +10 -0
  73. data/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi +9 -0
  74. data/sorbet/rbi/dsl/action_view/helpers.rbi +10 -0
  75. data/sorbet/rbi/dsl/action_view/layouts.rbi +24 -0
  76. data/sorbet/rbi/dsl/action_view/rendering.rbi +9 -0
  77. data/sorbet/rbi/dsl/active_model/attribute_methods.rbi +27 -0
  78. data/sorbet/rbi/dsl/active_model/attributes.rbi +34 -0
  79. data/sorbet/rbi/dsl/active_model/dirty.rbi +28 -0
  80. data/sorbet/rbi/dsl/active_model/serializers/json.rbi +22 -0
  81. data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +22 -0
  82. data/sorbet/rbi/dsl/active_model/validations.rbi +27 -0
  83. data/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +38 -0
  84. data/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi +32 -0
  85. data/sorbet/rbi/dsl/active_record/attribute_methods.rbi +53 -0
  86. data/sorbet/rbi/dsl/active_record/attributes.rbi +19 -0
  87. data/sorbet/rbi/dsl/active_record/callbacks.rbi +22 -0
  88. data/sorbet/rbi/dsl/active_record/core.rbi +55 -0
  89. data/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi +23 -0
  90. data/sorbet/rbi/dsl/active_record/inheritance.rbi +27 -0
  91. data/sorbet/rbi/dsl/active_record/integration.rbi +32 -0
  92. data/sorbet/rbi/dsl/active_record/locking/optimistic.rbi +22 -0
  93. data/sorbet/rbi/dsl/active_record/model_schema.rbi +52 -0
  94. data/sorbet/rbi/dsl/active_record/nested_attributes.rbi +22 -0
  95. data/sorbet/rbi/dsl/active_record/readonly_attributes.rbi +19 -0
  96. data/sorbet/rbi/dsl/active_record/reflection.rbi +32 -0
  97. data/sorbet/rbi/dsl/active_record/scoping/default.rbi +23 -0
  98. data/sorbet/rbi/dsl/active_record/scoping.rbi +23 -0
  99. data/sorbet/rbi/dsl/active_record/serialization.rbi +22 -0
  100. data/sorbet/rbi/dsl/active_record/signed_id.rbi +22 -0
  101. data/sorbet/rbi/dsl/active_record/test_fixtures.rbi +58 -0
  102. data/sorbet/rbi/dsl/active_record/timestamp.rbi +23 -0
  103. data/sorbet/rbi/dsl/active_record/validations.rbi +28 -0
  104. data/sorbet/rbi/dsl/active_support/actionable_error.rbi +23 -0
  105. data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
  106. data/sorbet/rbi/dsl/active_support/rescuable.rbi +23 -0
  107. data/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi +22 -0
  108. data/sorbet/rbi/gems/actionpack@7.0.4.3.rbi +19265 -0
  109. data/sorbet/rbi/gems/actionview@7.0.4.3.rbi +15482 -0
  110. data/sorbet/rbi/gems/activemodel@7.0.4.3.rbi +6025 -0
  111. data/sorbet/rbi/gems/activerecord@7.0.4.3.rbi +37852 -0
  112. data/sorbet/rbi/gems/activesupport@7.0.4.3.rbi +18788 -0
  113. data/sorbet/rbi/gems/addressable@2.4.0.rbi +8 -0
  114. data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
  115. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  116. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  117. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  118. data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
  119. data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
  120. data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
  121. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  122. data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
  123. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  124. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  125. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  126. data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
  127. data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
  128. data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
  129. data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
  130. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  131. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  132. data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
  133. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  134. data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
  135. data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
  136. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  137. data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
  138. data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
  139. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
  140. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
  141. data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
  142. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  143. data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
  144. data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
  145. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  146. data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
  147. data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
  148. data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
  149. data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
  150. data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
  151. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
  152. data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
  153. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
  154. data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
  155. data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
  156. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  157. data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
  158. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  159. data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
  160. data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
  161. data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
  162. data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
  163. data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
  164. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
  165. data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
  166. data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
  167. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  168. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  169. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
  170. data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
  171. data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
  172. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  173. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
  174. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  175. data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
  176. data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
  177. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  178. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  179. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  180. data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
  181. data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
  182. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  183. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  184. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
  185. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  186. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
  187. data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
  188. data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
  189. data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
  190. data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
  191. data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
  192. data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
  193. data/sorbet/rbi/shims/activerecord.rbi +4 -0
  194. data/sorbet/rbi/shims/model.rbi +9 -0
  195. data/sorbet/tapioca/config.yml +10 -0
  196. data/sorbet/tapioca/pre_require.rb +5 -0
  197. data/sorbet/tapioca/require.rb +10 -0
  198. data/spec/{acts-as-messageable_spec.rb → acts_as_messageable_spec.rb} +80 -5
  199. data/spec/{custom-class_spec.rb → custom_class_spec.rb} +15 -5
  200. data/spec/{custom-required_spec.rb → custom_required_spec.rb} +10 -4
  201. data/spec/{group-messages_spec.rb → group_messages_spec.rb} +5 -2
  202. data/spec/migrations_spec.rb +76 -0
  203. data/spec/spec_helper.rb +44 -41
  204. data/spec/support/admin.rb +5 -0
  205. data/spec/support/custom_message.rb +8 -0
  206. data/spec/support/custom_message_uuid.rb +6 -0
  207. data/spec/support/custom_search_user.rb +8 -0
  208. data/spec/support/men.rb +7 -0
  209. data/spec/support/send_message.rb +10 -1
  210. data/spec/support/table_schema.rb +36 -0
  211. data/spec/support/user.rb +5 -3
  212. data/spec/support/uuid_user.rb +9 -0
  213. data/tasks/types.rake +46 -0
  214. metadata +371 -39
  215. data/.travis.yml +0 -19
  216. data/gemfiles/rails_3.2.gemfile.lock +0 -153
  217. data/gemfiles/rails_4.2.11.gemfile +0 -16
  218. data/gemfiles/rails_4.2.11.gemfile.lock +0 -157
  219. data/gemfiles/rails_5.2.gemfile.lock +0 -155
  220. data/gemfiles/rails_6.0.gemfile.lock +0 -155
  221. data/lib/acts-as-messageable/message.rb +0 -62
  222. data/lib/acts-as-messageable/model.rb +0 -181
  223. data/lib/acts-as-messageable/rails3.rb +0 -19
  224. data/lib/acts-as-messageable/rails4.rb +0 -23
  225. data/lib/acts-as-messageable/railtie.rb +0 -13
  226. data/lib/acts-as-messageable/relation.rb +0 -17
  227. data/lib/acts-as-messageable/scopes.rb +0 -38
  228. data/lib/generators/acts-as-messageable/migration/migration_generator.rb +0 -30
@@ -0,0 +1,943 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rack-test` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rack-test`.
6
+
7
+ # :nocov:
8
+ #
9
+ # source://rack-test//lib/rack/test/cookie_jar.rb#6
10
+ module Rack
11
+ class << self
12
+ # source://rack/2.2.6.2/lib/rack/version.rb#26
13
+ def release; end
14
+
15
+ # source://rack/2.2.6.2/lib/rack/version.rb#19
16
+ def version; end
17
+ end
18
+ end
19
+
20
+ # source://rack/2.2.6.2/lib/rack.rb#29
21
+ Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String)
22
+
23
+ # source://rack/2.2.6.2/lib/rack.rb#31
24
+ Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String)
25
+
26
+ # source://rack/2.2.6.2/lib/rack.rb#32
27
+ Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String)
28
+
29
+ # source://rack/2.2.6.2/lib/rack.rb#43
30
+ Rack::DELETE = T.let(T.unsafe(nil), String)
31
+
32
+ # source://rack/2.2.6.2/lib/rack.rb#36
33
+ Rack::ETAG = T.let(T.unsafe(nil), String)
34
+
35
+ # source://rack/2.2.6.2/lib/rack.rb#30
36
+ Rack::EXPIRES = T.let(T.unsafe(nil), String)
37
+
38
+ # source://rack/2.2.6.2/lib/rack/file.rb#6
39
+ Rack::File = Rack::Files
40
+
41
+ # source://rack/2.2.6.2/lib/rack.rb#39
42
+ Rack::GET = T.let(T.unsafe(nil), String)
43
+
44
+ # source://rack/2.2.6.2/lib/rack.rb#44
45
+ Rack::HEAD = T.let(T.unsafe(nil), String)
46
+
47
+ # source://rack/2.2.6.2/lib/rack.rb#20
48
+ Rack::HTTPS = T.let(T.unsafe(nil), String)
49
+
50
+ # source://rack/2.2.6.2/lib/rack.rb#35
51
+ Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String)
52
+
53
+ # source://rack/2.2.6.2/lib/rack.rb#17
54
+ Rack::HTTP_HOST = T.let(T.unsafe(nil), String)
55
+
56
+ # source://rack/2.2.6.2/lib/rack.rb#18
57
+ Rack::HTTP_PORT = T.let(T.unsafe(nil), String)
58
+
59
+ # source://rack/2.2.6.2/lib/rack.rb#19
60
+ Rack::HTTP_VERSION = T.let(T.unsafe(nil), String)
61
+
62
+ # source://rack/2.2.6.2/lib/rack.rb#46
63
+ Rack::LINK = T.let(T.unsafe(nil), String)
64
+
65
+ # For backwards compatibility with 1.1.0 and below
66
+ #
67
+ # source://rack-test//lib/rack/test.rb#413
68
+ Rack::MockSession = Rack::Test::Session
69
+
70
+ # source://rack/2.2.6.2/lib/rack.rb#45
71
+ Rack::OPTIONS = T.let(T.unsafe(nil), String)
72
+
73
+ # source://rack/2.2.6.2/lib/rack.rb#42
74
+ Rack::PATCH = T.let(T.unsafe(nil), String)
75
+
76
+ # source://rack/2.2.6.2/lib/rack.rb#21
77
+ Rack::PATH_INFO = T.let(T.unsafe(nil), String)
78
+
79
+ # source://rack/2.2.6.2/lib/rack.rb#40
80
+ Rack::POST = T.let(T.unsafe(nil), String)
81
+
82
+ # source://rack/2.2.6.2/lib/rack.rb#41
83
+ Rack::PUT = T.let(T.unsafe(nil), String)
84
+
85
+ # source://rack/2.2.6.2/lib/rack.rb#25
86
+ Rack::QUERY_STRING = T.let(T.unsafe(nil), String)
87
+
88
+ # source://rack/2.2.6.2/lib/rack.rb#53
89
+ Rack::RACK_ERRORS = T.let(T.unsafe(nil), String)
90
+
91
+ # source://rack/2.2.6.2/lib/rack.rb#63
92
+ Rack::RACK_HIJACK = T.let(T.unsafe(nil), String)
93
+
94
+ # source://rack/2.2.6.2/lib/rack.rb#65
95
+ Rack::RACK_HIJACK_IO = T.let(T.unsafe(nil), String)
96
+
97
+ # source://rack/2.2.6.2/lib/rack.rb#55
98
+ Rack::RACK_INPUT = T.let(T.unsafe(nil), String)
99
+
100
+ # source://rack/2.2.6.2/lib/rack.rb#64
101
+ Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String)
102
+
103
+ # source://rack/2.2.6.2/lib/rack.rb#54
104
+ Rack::RACK_LOGGER = T.let(T.unsafe(nil), String)
105
+
106
+ # source://rack/2.2.6.2/lib/rack.rb#76
107
+ Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String)
108
+
109
+ # source://rack/2.2.6.2/lib/rack.rb#67
110
+ Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String)
111
+
112
+ # source://rack/2.2.6.2/lib/rack.rb#68
113
+ Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String)
114
+
115
+ # source://rack/2.2.6.2/lib/rack.rb#60
116
+ Rack::RACK_MULTIPROCESS = T.let(T.unsafe(nil), String)
117
+
118
+ # source://rack/2.2.6.2/lib/rack.rb#59
119
+ Rack::RACK_MULTITHREAD = T.let(T.unsafe(nil), String)
120
+
121
+ # source://rack/2.2.6.2/lib/rack.rb#66
122
+ Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String)
123
+
124
+ # source://rack/2.2.6.2/lib/rack.rb#72
125
+ Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String)
126
+
127
+ # source://rack/2.2.6.2/lib/rack.rb#73
128
+ Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String)
129
+
130
+ # source://rack/2.2.6.2/lib/rack.rb#70
131
+ Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String)
132
+
133
+ # source://rack/2.2.6.2/lib/rack.rb#69
134
+ Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String)
135
+
136
+ # source://rack/2.2.6.2/lib/rack.rb#71
137
+ Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String)
138
+
139
+ # source://rack/2.2.6.2/lib/rack.rb#74
140
+ Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String)
141
+
142
+ # source://rack/2.2.6.2/lib/rack.rb#75
143
+ Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String)
144
+
145
+ # source://rack/2.2.6.2/lib/rack.rb#61
146
+ Rack::RACK_RUNONCE = T.let(T.unsafe(nil), String)
147
+
148
+ # source://rack/2.2.6.2/lib/rack.rb#56
149
+ Rack::RACK_SESSION = T.let(T.unsafe(nil), String)
150
+
151
+ # source://rack/2.2.6.2/lib/rack.rb#57
152
+ Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String)
153
+
154
+ # source://rack/2.2.6.2/lib/rack.rb#77
155
+ Rack::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String)
156
+
157
+ # source://rack/2.2.6.2/lib/rack.rb#58
158
+ Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String)
159
+
160
+ # source://rack/2.2.6.2/lib/rack.rb#52
161
+ Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String)
162
+
163
+ # source://rack/2.2.6.2/lib/rack.rb#62
164
+ Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String)
165
+
166
+ # source://rack/2.2.6.2/lib/rack.rb#51
167
+ Rack::RACK_VERSION = T.let(T.unsafe(nil), String)
168
+
169
+ # source://rack/2.2.6.2/lib/rack/version.rb#23
170
+ Rack::RELEASE = T.let(T.unsafe(nil), String)
171
+
172
+ # source://rack/2.2.6.2/lib/rack.rb#22
173
+ Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String)
174
+
175
+ # source://rack/2.2.6.2/lib/rack.rb#23
176
+ Rack::REQUEST_PATH = T.let(T.unsafe(nil), String)
177
+
178
+ # source://rack/2.2.6.2/lib/rack.rb#24
179
+ Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String)
180
+
181
+ # source://rack/2.2.6.2/lib/rack.rb#27
182
+ Rack::SERVER_NAME = T.let(T.unsafe(nil), String)
183
+
184
+ # source://rack/2.2.6.2/lib/rack.rb#28
185
+ Rack::SERVER_PORT = T.let(T.unsafe(nil), String)
186
+
187
+ # source://rack/2.2.6.2/lib/rack.rb#26
188
+ Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String)
189
+
190
+ # source://rack/2.2.6.2/lib/rack.rb#33
191
+ Rack::SET_COOKIE = T.let(T.unsafe(nil), String)
192
+
193
+ # source://rack/2.2.6.2/lib/rack.rb#48
194
+ Rack::TRACE = T.let(T.unsafe(nil), String)
195
+
196
+ # source://rack/2.2.6.2/lib/rack.rb#34
197
+ Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String)
198
+
199
+ # source://rack-test//lib/rack/test/cookie_jar.rb#7
200
+ module Rack::Test
201
+ class << self
202
+ # Whether the version of rack in use handles encodings.
203
+ #
204
+ # @return [Boolean]
205
+ #
206
+ # source://rack-test//lib/rack/test.rb#407
207
+ def encoding_aware_strings?; end
208
+ end
209
+ end
210
+
211
+ # Represents individual cookies in the cookie jar. This is considered private
212
+ # API and behavior of this class can change at any time.
213
+ #
214
+ # source://rack-test//lib/rack/test/cookie_jar.rb#10
215
+ class Rack::Test::Cookie
216
+ include ::Rack::Utils
217
+
218
+ # @return [Cookie] a new instance of Cookie
219
+ #
220
+ # source://rack-test//lib/rack/test/cookie_jar.rb#23
221
+ def initialize(raw, uri = T.unsafe(nil), default_host = T.unsafe(nil)); end
222
+
223
+ # Order cookies by name, path, and domain.
224
+ #
225
+ # source://rack-test//lib/rack/test/cookie_jar.rb#107
226
+ def <=>(other); end
227
+
228
+ # The explicit or implicit domain for the cookie.
229
+ #
230
+ # source://rack-test//lib/rack/test/cookie_jar.rb#58
231
+ def domain; end
232
+
233
+ # Whether the cookie has a value.
234
+ #
235
+ # @return [Boolean]
236
+ #
237
+ # source://rack-test//lib/rack/test/cookie_jar.rb#53
238
+ def empty?; end
239
+
240
+ # Whether the cookie is currently expired.
241
+ #
242
+ # @return [Boolean]
243
+ #
244
+ # source://rack-test//lib/rack/test/cookie_jar.rb#85
245
+ def expired?; end
246
+
247
+ # A Time value for when the cookie expires, if the expires option is set.
248
+ #
249
+ # source://rack-test//lib/rack/test/cookie_jar.rb#80
250
+ def expires; end
251
+
252
+ # Whether the cookie has the httponly flag, indicating it is not available via
253
+ # a javascript API.
254
+ #
255
+ # @return [Boolean]
256
+ #
257
+ # source://rack-test//lib/rack/test/cookie_jar.rb#70
258
+ def http_only?; end
259
+
260
+ # Cookies that do not match the URI will not be sent in requests to the URI.
261
+ #
262
+ # @return [Boolean]
263
+ #
264
+ # source://rack-test//lib/rack/test/cookie_jar.rb#102
265
+ def matches?(uri); end
266
+
267
+ # The name of the cookie, will be a string
268
+ #
269
+ # source://rack-test//lib/rack/test/cookie_jar.rb#14
270
+ def name; end
271
+
272
+ # The explicit or implicit path for the cookie.
273
+ #
274
+ # source://rack-test//lib/rack/test/cookie_jar.rb#75
275
+ def path; end
276
+
277
+ # The raw string for the cookie, without options. Will generally be in
278
+ # name=value format is name and value are provided.
279
+ #
280
+ # source://rack-test//lib/rack/test/cookie_jar.rb#21
281
+ def raw; end
282
+
283
+ # Wether the given cookie can replace the current cookie in the cookie jar.
284
+ #
285
+ # @return [Boolean]
286
+ #
287
+ # source://rack-test//lib/rack/test/cookie_jar.rb#48
288
+ def replaces?(other); end
289
+
290
+ # Whether the cookie has the secure flag, indicating it can only be sent over
291
+ # an encrypted connection.
292
+ #
293
+ # @return [Boolean]
294
+ #
295
+ # source://rack-test//lib/rack/test/cookie_jar.rb#64
296
+ def secure?; end
297
+
298
+ # A hash of cookie options, including the cookie value, but excluding the cookie name.
299
+ #
300
+ # source://rack-test//lib/rack/test/cookie_jar.rb#112
301
+ def to_h; end
302
+
303
+ # A hash of cookie options, including the cookie value, but excluding the cookie name.
304
+ #
305
+ # source://rack-test//lib/rack/test/cookie_jar.rb#112
306
+ def to_hash; end
307
+
308
+ # Whether the cookie is valid for the given URI.
309
+ #
310
+ # @return [Boolean]
311
+ #
312
+ # source://rack-test//lib/rack/test/cookie_jar.rb#90
313
+ def valid?(uri); end
314
+
315
+ # The value of the cookie, will be a string or nil if there is no value.
316
+ #
317
+ # source://rack-test//lib/rack/test/cookie_jar.rb#17
318
+ def value; end
319
+
320
+ private
321
+
322
+ # The default URI to use for the cookie, including just the host.
323
+ #
324
+ # source://rack-test//lib/rack/test/cookie_jar.rb#124
325
+ def default_uri; end
326
+ end
327
+
328
+ # Represents all cookies for a session, handling adding and
329
+ # removing cookies, and finding which cookies apply to a given
330
+ # request. This is considered private API and behavior of this
331
+ # class can change at any time.
332
+ #
333
+ # source://rack-test//lib/rack/test/cookie_jar.rb#133
334
+ class Rack::Test::CookieJar
335
+ # @return [CookieJar] a new instance of CookieJar
336
+ #
337
+ # source://rack-test//lib/rack/test/cookie_jar.rb#136
338
+ def initialize(cookies = T.unsafe(nil), default_host = T.unsafe(nil)); end
339
+
340
+ # Add a Cookie to the cookie jar.
341
+ #
342
+ # source://rack-test//lib/rack/test/cookie_jar.rb#192
343
+ def <<(new_cookie); end
344
+
345
+ # Return the value for first cookie with the given name, or nil
346
+ # if no such cookie exists.
347
+ #
348
+ # source://rack-test//lib/rack/test/cookie_jar.rb#143
349
+ def [](name); end
350
+
351
+ # Set a cookie with the given name and value in the
352
+ # cookie jar.
353
+ #
354
+ # source://rack-test//lib/rack/test/cookie_jar.rb#153
355
+ def []=(name, value); end
356
+
357
+ # Delete all cookies with the given name from the cookie jar.
358
+ #
359
+ # source://rack-test//lib/rack/test/cookie_jar.rb#167
360
+ def delete(name); end
361
+
362
+ # Return a raw cookie string for the cookie header to
363
+ # use for the given URI.
364
+ #
365
+ # source://rack-test//lib/rack/test/cookie_jar.rb#203
366
+ def for(uri); end
367
+
368
+ # Return the first cookie with the given name, or nil if
369
+ # no such cookie exists.
370
+ #
371
+ # source://rack-test//lib/rack/test/cookie_jar.rb#159
372
+ def get_cookie(name); end
373
+
374
+ # Add a string of raw cookie information to the cookie jar,
375
+ # if the cookie is valid for the given URI.
376
+ # Cookies should be separated with a newline.
377
+ #
378
+ # source://rack-test//lib/rack/test/cookie_jar.rb#177
379
+ def merge(raw_cookies, uri = T.unsafe(nil)); end
380
+
381
+ # Return a hash cookie names and cookie values for cookies in the jar.
382
+ #
383
+ # source://rack-test//lib/rack/test/cookie_jar.rb#220
384
+ def to_hash; end
385
+
386
+ private
387
+
388
+ # Yield each cookie that matches for the URI.
389
+ #
390
+ # The cookies are sorted by most specific first. So, we loop through
391
+ # all the cookies in order and add it to a hash by cookie name if
392
+ # the cookie can be sent to the current URI. It's added to the hash
393
+ # so that when we are done, the cookies will be unique by name and
394
+ # we'll have grabbed the most specific to the URI.
395
+ #
396
+ # source://rack-test//lib/rack/test/cookie_jar.rb#239
397
+ def each_cookie_for(uri); end
398
+ end
399
+
400
+ # source://rack-test//lib/rack/test/cookie_jar.rb#134
401
+ Rack::Test::CookieJar::DELIMITER = T.let(T.unsafe(nil), String)
402
+
403
+ # The default host to use for requests, when a full URI is not
404
+ # provided.
405
+ #
406
+ # source://rack-test//lib/rack/test.rb#33
407
+ Rack::Test::DEFAULT_HOST = T.let(T.unsafe(nil), String)
408
+
409
+ # The ending boundary in multipart requests
410
+ #
411
+ # source://rack-test//lib/rack/test.rb#42
412
+ Rack::Test::END_BOUNDARY = T.let(T.unsafe(nil), String)
413
+
414
+ # The common base class for exceptions raised by Rack::Test
415
+ #
416
+ # source://rack-test//lib/rack/test.rb#45
417
+ class Rack::Test::Error < ::StandardError; end
418
+
419
+ # The default multipart boundary to use for multipart request bodies
420
+ #
421
+ # source://rack-test//lib/rack/test.rb#36
422
+ Rack::Test::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String)
423
+
424
+ # This module serves as the primary integration point for using Rack::Test
425
+ # in a testing environment. It depends on an app method being defined in the
426
+ # same context, and provides the Rack::Test API methods (see Rack::Test::Session
427
+ # for their documentation). It defines the following methods that are delegated
428
+ # to the current session: :request, :get, :post, :put, :patch, :delete, :options,
429
+ # :head, :custom_request, :follow_redirect!, :header, :env, :set_cookie,
430
+ # :clear_cookies, :authorize, :basic_authorize, :last_response, and :last_request.
431
+ #
432
+ # Example:
433
+ #
434
+ # class HomepageTest < Test::Unit::TestCase
435
+ # include Rack::Test::Methods
436
+ #
437
+ # def app
438
+ # MyApp
439
+ # end
440
+ # end
441
+ #
442
+ # source://rack-test//lib/rack/test/methods.rb#24
443
+ module Rack::Test::Methods
444
+ extend ::Forwardable
445
+
446
+ # Private accessor to avoid uninitialized instance variable warning in Ruby 2.*
447
+ #
448
+ # source://rack-test//lib/rack/test/methods.rb#91
449
+ def _rack_test_current_session=(_arg0); end
450
+
451
+ # source://forwardable/1.3.2/forwardable.rb#229
452
+ def authorize(*args, **_arg1, &block); end
453
+
454
+ # source://forwardable/1.3.2/forwardable.rb#229
455
+ def basic_authorize(*args, **_arg1, &block); end
456
+
457
+ # Create a new Rack::Test::Session for #app.
458
+ #
459
+ # source://rack-test//lib/rack/test/methods.rb#40
460
+ def build_rack_test_session(_name); end
461
+
462
+ # source://forwardable/1.3.2/forwardable.rb#229
463
+ def clear_cookies(*args, **_arg1, &block); end
464
+
465
+ # Return the currently actively session. This is the session to
466
+ # which the delegated methods are sent.
467
+ #
468
+ # source://rack-test//lib/rack/test/methods.rb#51
469
+ def current_session; end
470
+
471
+ # source://forwardable/1.3.2/forwardable.rb#229
472
+ def custom_request(*args, **_arg1, &block); end
473
+
474
+ # source://forwardable/1.3.2/forwardable.rb#229
475
+ def delete(*args, **_arg1, &block); end
476
+
477
+ # source://rack-test//lib/rack/test/methods.rb#64
478
+ def digest_authorize(username, password); end
479
+
480
+ # source://forwardable/1.3.2/forwardable.rb#229
481
+ def env(*args, **_arg1, &block); end
482
+
483
+ # source://forwardable/1.3.2/forwardable.rb#229
484
+ def follow_redirect!(*args, **_arg1, &block); end
485
+
486
+ # source://forwardable/1.3.2/forwardable.rb#229
487
+ def get(*args, **_arg1, &block); end
488
+
489
+ # source://forwardable/1.3.2/forwardable.rb#229
490
+ def head(*args, **_arg1, &block); end
491
+
492
+ # source://forwardable/1.3.2/forwardable.rb#229
493
+ def header(*args, **_arg1, &block); end
494
+
495
+ # source://forwardable/1.3.2/forwardable.rb#229
496
+ def last_request(*args, **_arg1, &block); end
497
+
498
+ # source://forwardable/1.3.2/forwardable.rb#229
499
+ def last_response(*args, **_arg1, &block); end
500
+
501
+ # source://forwardable/1.3.2/forwardable.rb#229
502
+ def options(*args, **_arg1, &block); end
503
+
504
+ # source://forwardable/1.3.2/forwardable.rb#229
505
+ def patch(*args, **_arg1, &block); end
506
+
507
+ # source://forwardable/1.3.2/forwardable.rb#229
508
+ def post(*args, **_arg1, &block); end
509
+
510
+ # source://forwardable/1.3.2/forwardable.rb#229
511
+ def put(*args, **_arg1, &block); end
512
+
513
+ # Return the existing session with the given name, or a new
514
+ # rack session. Always use a new session if name is nil.
515
+ # For backwards compatibility with older rack-test versions.
516
+ #
517
+ # source://rack-test//lib/rack/test/methods.rb#29
518
+ def rack_mock_session(name = T.unsafe(nil)); end
519
+
520
+ # Return the existing session with the given name, or a new
521
+ # rack session. Always use a new session if name is nil.
522
+ #
523
+ # source://rack-test//lib/rack/test/methods.rb#29
524
+ def rack_test_session(name = T.unsafe(nil)); end
525
+
526
+ # source://forwardable/1.3.2/forwardable.rb#229
527
+ def request(*args, **_arg1, &block); end
528
+
529
+ # source://forwardable/1.3.2/forwardable.rb#229
530
+ def set_cookie(*args, **_arg1, &block); end
531
+
532
+ # Create a new session (or reuse an existing session with the given name),
533
+ # and make it the current session for the given block.
534
+ #
535
+ # source://rack-test//lib/rack/test/methods.rb#57
536
+ def with_session(name); end
537
+
538
+ private
539
+
540
+ # Private accessor to avoid uninitialized instance variable warning in Ruby 2.*
541
+ #
542
+ # source://rack-test//lib/rack/test/methods.rb#91
543
+ def _rack_test_current_session; end
544
+ end
545
+
546
+ # The starting boundary in multipart requests
547
+ #
548
+ # source://rack-test//lib/rack/test.rb#39
549
+ Rack::Test::START_BOUNDARY = T.let(T.unsafe(nil), String)
550
+
551
+ # Rack::Test::Session handles a series of requests issued to a Rack app.
552
+ # It keeps track of the cookies for the session, and allows for setting headers
553
+ # and a default rack environment that is used for future requests.
554
+ #
555
+ # Rack::Test::Session's methods are most often called through Rack::Test::Methods,
556
+ # which will automatically build a session when it's first used.
557
+ #
558
+ # source://rack-test//lib/rack/test.rb#53
559
+ class Rack::Test::Session
560
+ include ::Rack::Utils
561
+ include ::Rack::Test::Utils
562
+ extend ::Forwardable
563
+
564
+ # Creates a Rack::Test::Session for a given Rack app or Rack::Test::BasicSession.
565
+ #
566
+ # Note: Generally, you won't need to initialize a Rack::Test::Session directly.
567
+ # Instead, you should include Rack::Test::Methods into your testing context.
568
+ # (See README.rdoc for an example)
569
+ #
570
+ # The following methods are defined via metaprogramming: get, post, put, patch,
571
+ # delete, options, and head. Each method submits a request with the given request
572
+ # method, with the given URI and optional parameters and rack environment.
573
+ # Examples:
574
+ #
575
+ # # URI only:
576
+ # get("/") # GET /
577
+ # get("/?foo=bar") # GET /?foo=bar
578
+ #
579
+ # # URI and parameters
580
+ # get("/foo", 'bar'=>'baz') # GET /foo?bar=baz
581
+ # post("/foo", 'bar'=>'baz') # POST /foo (bar=baz in request body)
582
+ #
583
+ # # URI, parameters, and rack environment
584
+ # get("/bar", {}, 'CONTENT_TYPE'=>'foo')
585
+ # get("/bar", {'foo'=>'baz'}, 'HTTP_ACCEPT'=>'*')
586
+ #
587
+ # The above methods as well as #request and #custom_request store the Rack::Request
588
+ # submitted in #last_request. The methods store a Rack::MockResponse based on the
589
+ # response in #last_response. #last_response is also returned by the methods.
590
+ # If a block is given, #last_response is also yielded to the block.
591
+ #
592
+ # @return [Session] a new instance of Session
593
+ #
594
+ # source://rack-test//lib/rack/test.rb#99
595
+ def initialize(app, default_host = T.unsafe(nil)); end
596
+
597
+ # source://rack-test//lib/rack/test.rb#217
598
+ def _digest_authorize(username, password); end
599
+
600
+ # Run a block after the each request completes.
601
+ #
602
+ # source://rack-test//lib/rack/test.rb#120
603
+ def after_request(&block); end
604
+
605
+ # Set the username and password for HTTP Basic authorization, to be
606
+ # included in subsequent requests in the HTTP_AUTHORIZATION header.
607
+ #
608
+ # Example:
609
+ # basic_authorize "bryan", "secret"
610
+ #
611
+ # source://rack-test//lib/rack/test.rb#200
612
+ def authorize(username, password); end
613
+
614
+ # Set the username and password for HTTP Basic authorization, to be
615
+ # included in subsequent requests in the HTTP_AUTHORIZATION header.
616
+ #
617
+ # Example:
618
+ # basic_authorize "bryan", "secret"
619
+ #
620
+ # source://rack-test//lib/rack/test.rb#200
621
+ def basic_authorize(username, password); end
622
+
623
+ # Replace the current cookie jar with an empty cookie jar.
624
+ #
625
+ # source://rack-test//lib/rack/test.rb#125
626
+ def clear_cookies; end
627
+
628
+ # The Rack::Test::CookieJar for the cookies for the current session.
629
+ #
630
+ # source://rack-test//lib/rack/test.rb#67
631
+ def cookie_jar; end
632
+
633
+ # The Rack::Test::CookieJar for the cookies for the current session.
634
+ #
635
+ # source://rack-test//lib/rack/test.rb#67
636
+ def cookie_jar=(_arg0); end
637
+
638
+ # Issue a request using the given HTTP verb for the given URI, with optional
639
+ # params and rack environment. Example:
640
+ #
641
+ # custom_request "LINK", "/"
642
+ #
643
+ # source://rack-test//lib/rack/test.rb#162
644
+ def custom_request(verb, uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
645
+
646
+ # The default host used for the session for when using paths for URIs.
647
+ #
648
+ # source://rack-test//lib/rack/test.rb#70
649
+ def default_host; end
650
+
651
+ # source://rack-test//lib/rack/test.rb#113
652
+ def delete(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
653
+
654
+ # Set the username and password for HTTP Digest authorization, to be
655
+ # included in subsequent requests in the HTTP_AUTHORIZATION header.
656
+ # This method is deprecated and will be removed in rack-test 2.1
657
+ #
658
+ # Example:
659
+ # digest_authorize "bryan", "secret"
660
+ #
661
+ # source://rack-test//lib/rack/test.rb#213
662
+ def digest_authorize(username, password); end
663
+
664
+ # Set an entry in the rack environment to be included on all subsequent
665
+ # requests through the session. Use a value of nil to remove a previously
666
+ # value. Example:
667
+ #
668
+ # env "rack.session", {:csrf => 'token'}
669
+ #
670
+ # source://rack-test//lib/rack/test.rb#187
671
+ def env(name, value); end
672
+
673
+ # Rack::Test will not follow any redirects automatically. This method
674
+ # will follow the redirect returned (including setting the Referer header
675
+ # on the new request) in the last response. If the last response was not
676
+ # a redirect, an error will be raised.
677
+ #
678
+ # source://rack-test//lib/rack/test.rb#226
679
+ def follow_redirect!; end
680
+
681
+ # source://rack-test//lib/rack/test.rb#113
682
+ def get(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
683
+
684
+ # source://rack-test//lib/rack/test.rb#113
685
+ def head(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
686
+
687
+ # Set a header to be included on all subsequent requests through the
688
+ # session. Use a value of nil to remove a previously configured header.
689
+ #
690
+ # In accordance with the Rack spec, headers will be included in the Rack
691
+ # environment hash in HTTP_USER_AGENT form. Example:
692
+ #
693
+ # header "user-agent", "Firefox"
694
+ #
695
+ # source://rack-test//lib/rack/test.rb#175
696
+ def header(name, value); end
697
+
698
+ # Return the last request issued in the session. Raises an error if no
699
+ # requests have been sent yet.
700
+ #
701
+ # @raise [Error]
702
+ #
703
+ # source://rack-test//lib/rack/test.rb#136
704
+ def last_request; end
705
+
706
+ # Return the last response received in the session. Raises an error if
707
+ # no requests have been sent yet.
708
+ #
709
+ # @raise [Error]
710
+ #
711
+ # source://rack-test//lib/rack/test.rb#143
712
+ def last_response; end
713
+
714
+ # source://rack-test//lib/rack/test.rb#113
715
+ def options(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
716
+
717
+ # source://rack-test//lib/rack/test.rb#113
718
+ def patch(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
719
+
720
+ # source://rack-test//lib/rack/test.rb#113
721
+ def post(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
722
+
723
+ # source://rack-test//lib/rack/test.rb#113
724
+ def put(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
725
+
726
+ # Issue a request to the Rack app for the given URI and optional Rack
727
+ # environment. Example:
728
+ #
729
+ # request "/"
730
+ #
731
+ # source://rack-test//lib/rack/test.rb#152
732
+ def request(uri, env = T.unsafe(nil), &block); end
733
+
734
+ # Set a cookie in the current cookie jar.
735
+ #
736
+ # source://rack-test//lib/rack/test.rb#130
737
+ def set_cookie(cookie, uri = T.unsafe(nil)); end
738
+
739
+ private
740
+
741
+ # Append a string version of the query params to the array of query params.
742
+ #
743
+ # source://rack-test//lib/rack/test.rb#338
744
+ def append_query_params(query_array, query_params); end
745
+
746
+ # close() gets called automatically in newer Rack versions.
747
+ #
748
+ # source://rack-test//lib/rack/test.rb#264
749
+ def close_body(body); end
750
+
751
+ # @return [Boolean]
752
+ #
753
+ # source://rack-test//lib/rack/test.rb#401
754
+ def digest_auth_configured?; end
755
+
756
+ # source://rack-test//lib/rack/test.rb#378
757
+ def digest_auth_header; end
758
+
759
+ # Update environment to use based on given URI.
760
+ #
761
+ # source://rack-test//lib/rack/test.rb#291
762
+ def env_for(uri, env); end
763
+
764
+ # Return the multipart content type to use based on the environment.
765
+ #
766
+ # source://rack-test//lib/rack/test.rb#344
767
+ def multipart_content_type(env); end
768
+
769
+ # Normalize URI based on given URI/path and environment.
770
+ #
771
+ # source://rack-test//lib/rack/test.rb#269
772
+ def parse_uri(path, env); end
773
+
774
+ # Submit the request with the given URI and rack environment to
775
+ # the mock session. Returns and potentially yields the last response.
776
+ #
777
+ # source://rack-test//lib/rack/test.rb#355
778
+ def process_request(uri, env); end
779
+
780
+ # @return [Boolean]
781
+ #
782
+ # source://rack-test//lib/rack/test.rb#395
783
+ def retry_with_digest_auth?(env); end
784
+
785
+ class << self
786
+ # source://rack-test//lib/rack/test.rb#57
787
+ def new(app, default_host = T.unsafe(nil)); end
788
+ end
789
+ end
790
+
791
+ # source://rack-test//lib/rack/test.rb#277
792
+ Rack::Test::Session::DEFAULT_ENV = T.let(T.unsafe(nil), Hash)
793
+
794
+ # Wraps a Tempfile with a content type. Including one or more UploadedFile's
795
+ # in the params causes Rack::Test to build and issue a multipart request.
796
+ #
797
+ # Example:
798
+ # post "/photos", "file" => Rack::Test::UploadedFile.new("me.jpg", "image/jpeg")
799
+ #
800
+ # source://rack-test//lib/rack/test/uploaded_file.rb#14
801
+ class Rack::Test::UploadedFile
802
+ # Creates a new UploadedFile instance.
803
+ #
804
+ # Arguments:
805
+ # content :: is a path to a file, or an {IO} or {StringIO} object representing the content.
806
+ # content_type :: MIME type of the file
807
+ # binary :: Whether the file should be set to binmode (content treated as binary).
808
+ # original_filename :: The filename to use for the file if +content+ is a StringIO.
809
+ #
810
+ # @return [UploadedFile] a new instance of UploadedFile
811
+ #
812
+ # source://rack-test//lib/rack/test/uploaded_file.rb#31
813
+ def initialize(content, content_type = T.unsafe(nil), binary = T.unsafe(nil), original_filename: T.unsafe(nil)); end
814
+
815
+ # Append to given buffer in 64K chunks to avoid multiple large
816
+ # copies of file data in memory. Rewind tempfile before and
817
+ # after to make sure all data in tempfile is appended to the
818
+ # buffer.
819
+ #
820
+ # source://rack-test//lib/rack/test/uploaded_file.rb#58
821
+ def append_to(buffer); end
822
+
823
+ # The content type of the "uploaded" file
824
+ #
825
+ # source://rack-test//lib/rack/test/uploaded_file.rb#22
826
+ def content_type; end
827
+
828
+ # The content type of the "uploaded" file
829
+ #
830
+ # source://rack-test//lib/rack/test/uploaded_file.rb#22
831
+ def content_type=(_arg0); end
832
+
833
+ # The path to the tempfile. Will not work if the receiver's content is from a StringIO.
834
+ #
835
+ # source://rack-test//lib/rack/test/uploaded_file.rb#44
836
+ def local_path; end
837
+
838
+ # Delegate all methods not handled to the tempfile.
839
+ #
840
+ # source://rack-test//lib/rack/test/uploaded_file.rb#50
841
+ def method_missing(method_name, *args, &block); end
842
+
843
+ # The filename, *not* including the path, of the "uploaded" file
844
+ #
845
+ # source://rack-test//lib/rack/test/uploaded_file.rb#16
846
+ def original_filename; end
847
+
848
+ # The path to the tempfile. Will not work if the receiver's content is from a StringIO.
849
+ #
850
+ # source://rack-test//lib/rack/test/uploaded_file.rb#44
851
+ def path; end
852
+
853
+ # The tempfile
854
+ #
855
+ # source://rack-test//lib/rack/test/uploaded_file.rb#19
856
+ def tempfile; end
857
+
858
+ private
859
+
860
+ # Create a tempfile and copy the content from the given path into the tempfile.
861
+ #
862
+ # source://rack-test//lib/rack/test/uploaded_file.rb#94
863
+ def initialize_from_file_path(path); end
864
+
865
+ # Use the StringIO as the tempfile.
866
+ #
867
+ # source://rack-test//lib/rack/test/uploaded_file.rb#88
868
+ def initialize_from_stringio(stringio, original_filename); end
869
+
870
+ # @return [Boolean]
871
+ #
872
+ # source://rack-test//lib/rack/test/uploaded_file.rb#69
873
+ def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end
874
+
875
+ class << self
876
+ # Close and unlink the given file, used as a finalizer for the tempfile,
877
+ # if the tempfile is backed by a file in the filesystem.
878
+ #
879
+ # source://rack-test//lib/rack/test/uploaded_file.rb#80
880
+ def actually_finalize(file); end
881
+
882
+ # A proc that can be used as a finalizer to close and unlink the tempfile.
883
+ #
884
+ # source://rack-test//lib/rack/test/uploaded_file.rb#74
885
+ def finalize(file); end
886
+ end
887
+ end
888
+
889
+ # source://rack-test//lib/rack/test/utils.rb#5
890
+ module Rack::Test::Utils
891
+ include ::Rack::Utils
892
+ extend ::Rack::Utils
893
+ extend ::Rack::Test::Utils
894
+
895
+ # Build a multipart body for the given params.
896
+ #
897
+ # @raise [ArgumentError]
898
+ #
899
+ # source://rack-test//lib/rack/test/utils.rb#34
900
+ def build_multipart(params, _first = T.unsafe(nil), multipart = T.unsafe(nil)); end
901
+
902
+ # Build a query string for the given value and prefix. The value
903
+ # can be an array or hash of parameters.
904
+ #
905
+ # source://rack-test//lib/rack/test/utils.rb#11
906
+ def build_nested_query(value, prefix = T.unsafe(nil)); end
907
+
908
+ private
909
+
910
+ # Append each multipart parameter value to the buffer.
911
+ #
912
+ # source://rack-test//lib/rack/test/utils.rb#100
913
+ def _build_parts(buffer, parameters); end
914
+
915
+ # Append the multipart fragment for a parameter that is a file upload to the buffer.
916
+ #
917
+ # source://rack-test//lib/rack/test/utils.rb#133
918
+ def build_file_part(buffer, parameter_name, uploaded_file); end
919
+
920
+ # Build the multipart content for uploading.
921
+ #
922
+ # source://rack-test//lib/rack/test/utils.rb#94
923
+ def build_parts(buffer, parameters); end
924
+
925
+ # Append the multipart fragment for a parameter that isn't a file upload to the buffer.
926
+ #
927
+ # source://rack-test//lib/rack/test/utils.rb#121
928
+ def build_primitive_part(buffer, parameter_name, value); end
929
+
930
+ # Return a flattened hash of parameter values based on the given params.
931
+ #
932
+ # source://rack-test//lib/rack/test/utils.rb#62
933
+ def normalize_multipart_params(params, first = T.unsafe(nil)); end
934
+ end
935
+
936
+ # source://rack-test//lib/rack/test/version.rb#3
937
+ Rack::Test::VERSION = T.let(T.unsafe(nil), String)
938
+
939
+ # source://rack/2.2.6.2/lib/rack.rb#47
940
+ Rack::UNLINK = T.let(T.unsafe(nil), String)
941
+
942
+ # source://rack/2.2.6.2/lib/rack/version.rb#16
943
+ Rack::VERSION = T.let(T.unsafe(nil), Array)