packwerk 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +29 -20
  3. data/.github/workflows/cla.yml +22 -0
  4. data/.rubocop.yml +48 -19
  5. data/Gemfile +7 -2
  6. data/Gemfile.lock +202 -175
  7. data/README.md +1 -1
  8. data/RESOLVING_VIOLATIONS.md +81 -0
  9. data/Rakefile +1 -1
  10. data/USAGE.md +14 -5
  11. data/bin/m +1 -1
  12. data/bin/rake +1 -1
  13. data/bin/rubocop +1 -1
  14. data/bin/srb +1 -1
  15. data/bin/tapioca +1 -1
  16. data/gemfiles/Gemfile-rails-6-0 +1 -1
  17. data/gemfiles/Gemfile-rails-6-1 +22 -0
  18. data/lib/packwerk/application_load_paths.rb +1 -1
  19. data/lib/packwerk/application_validator.rb +7 -6
  20. data/lib/packwerk/association_inspector.rb +17 -15
  21. data/lib/packwerk/cache.rb +36 -29
  22. data/lib/packwerk/cli.rb +24 -20
  23. data/lib/packwerk/const_node_inspector.rb +8 -7
  24. data/lib/packwerk/constant_name_inspector.rb +2 -2
  25. data/lib/packwerk/deprecated_references.rb +40 -20
  26. data/lib/packwerk/file_processor.rb +14 -14
  27. data/lib/packwerk/files_for_processing.rb +27 -31
  28. data/lib/packwerk/formatters/offenses_formatter.rb +3 -3
  29. data/lib/packwerk/formatters/progress_formatter.rb +2 -2
  30. data/lib/packwerk/node.rb +1 -294
  31. data/lib/packwerk/node_helpers.rb +335 -0
  32. data/lib/packwerk/node_processor.rb +6 -5
  33. data/lib/packwerk/node_processor_factory.rb +3 -3
  34. data/lib/packwerk/node_visitor.rb +1 -1
  35. data/lib/packwerk/offense_collection.rb +27 -8
  36. data/lib/packwerk/offenses_formatter.rb +2 -2
  37. data/lib/packwerk/package.rb +3 -0
  38. data/lib/packwerk/package_set.rb +2 -0
  39. data/lib/packwerk/parse_run.rb +29 -20
  40. data/lib/packwerk/parsed_constant_definitions.rb +23 -20
  41. data/lib/packwerk/parsers/erb.rb +3 -3
  42. data/lib/packwerk/reference_checking/checkers/checker.rb +16 -3
  43. data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +16 -0
  44. data/lib/packwerk/reference_checking/checkers/privacy_checker.rb +18 -0
  45. data/lib/packwerk/reference_checking/reference_checker.rb +3 -1
  46. data/lib/packwerk/reference_extractor.rb +51 -48
  47. data/lib/packwerk/reference_offense.rb +3 -27
  48. data/lib/packwerk/run_context.rb +9 -8
  49. data/lib/packwerk/spring_command.rb +1 -1
  50. data/lib/packwerk/version.rb +1 -1
  51. data/lib/packwerk.rb +1 -0
  52. data/packwerk.gemspec +5 -12
  53. data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +2754 -0
  54. data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +1496 -0
  55. data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +2362 -0
  56. data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +19397 -0
  57. data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +1569 -0
  58. data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +14907 -0
  59. data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +2553 -0
  60. data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +5999 -0
  61. data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +37832 -0
  62. data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +2321 -0
  63. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +18818 -0
  64. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +11722 -0
  65. data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
  66. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  67. data/sorbet/rbi/gems/digest@3.1.0.rbi +189 -0
  68. data/sorbet/rbi/gems/erubi@1.11.0.rbi +140 -0
  69. data/sorbet/rbi/gems/globalid@1.0.0.rbi +572 -0
  70. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  71. data/sorbet/rbi/gems/json@2.6.2.rbi +1548 -0
  72. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +8 -0
  73. data/sorbet/rbi/gems/loofah@2.18.0.rbi +877 -0
  74. data/sorbet/rbi/gems/m@1.6.0.rbi +257 -0
  75. data/sorbet/rbi/gems/marcel@1.0.2.rbi +220 -0
  76. data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +170 -0
  77. data/sorbet/rbi/gems/mini_portile2@2.8.0.rbi +8 -0
  78. data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +104 -0
  79. data/sorbet/rbi/gems/minitest@5.16.2.rbi +2136 -0
  80. data/sorbet/rbi/gems/mocha@1.14.0.rbi +4177 -0
  81. data/sorbet/rbi/gems/net-imap@0.2.3.rbi +2147 -0
  82. data/sorbet/rbi/gems/net-pop@0.1.1.rbi +926 -0
  83. data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +11 -0
  84. data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +1108 -0
  85. data/sorbet/rbi/gems/netrc@0.11.0.rbi +153 -0
  86. data/sorbet/rbi/gems/nio4r@2.5.8.rbi +292 -0
  87. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +6478 -0
  88. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  89. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +9029 -0
  90. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +8 -0
  91. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  92. data/sorbet/rbi/gems/racc@1.6.0.rbi +152 -0
  93. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +953 -0
  94. data/sorbet/rbi/gems/rack@2.2.4.rbi +5636 -0
  95. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +688 -0
  96. data/sorbet/rbi/gems/rails@7.0.3.1.rbi +8 -0
  97. data/sorbet/rbi/gems/railties@7.0.3.1.rbi +3507 -0
  98. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +392 -0
  99. data/sorbet/rbi/gems/rake@13.0.6.rbi +2924 -0
  100. data/sorbet/rbi/gems/rbi@0.0.15.rbi +3007 -0
  101. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +3383 -0
  102. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4714 -0
  103. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +6961 -0
  104. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +2986 -0
  105. data/sorbet/rbi/gems/{rubocop-shopify@2.0.1.rbi → rubocop-shopify@2.9.0.rbi} +4 -4
  106. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +992 -0
  107. data/sorbet/rbi/gems/rubocop@1.34.1.rbi +51820 -0
  108. data/sorbet/rbi/gems/ruby-lsp@0.2.1.rbi +11 -0
  109. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
  110. data/sorbet/rbi/gems/spoom@1.1.11.rbi +2181 -0
  111. data/sorbet/rbi/gems/spring@4.0.0.rbi +411 -0
  112. data/sorbet/rbi/gems/strscan@3.0.4.rbi +8 -0
  113. data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +8 -0
  114. data/sorbet/rbi/gems/tapioca@0.9.2.rbi +3181 -0
  115. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  116. data/sorbet/rbi/gems/timeout@0.3.0.rbi +142 -0
  117. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5896 -0
  118. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +48 -0
  119. data/sorbet/rbi/gems/unparser@0.6.5.rbi +4529 -0
  120. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2582 -0
  121. data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +993 -0
  122. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +388 -0
  123. data/sorbet/rbi/gems/yard@0.9.28.rbi +18242 -0
  124. data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +867 -0
  125. data/sorbet/rbi/shims/psych.rbi +5 -0
  126. data/sorbet/tapioca/require.rb +2 -3
  127. metadata +91 -146
  128. data/.github/probots.yml +0 -2
  129. data/library.yml +0 -6
  130. data/service.yml +0 -1
  131. data/sorbet/rbi/gems/actioncable@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -860
  132. data/sorbet/rbi/gems/actionmailbox@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -568
  133. data/sorbet/rbi/gems/actionmailer@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -587
  134. data/sorbet/rbi/gems/actionpack@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -5314
  135. data/sorbet/rbi/gems/actiontext@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -699
  136. data/sorbet/rbi/gems/actionview@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -2515
  137. data/sorbet/rbi/gems/activejob@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -624
  138. data/sorbet/rbi/gems/activemodel@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -1248
  139. data/sorbet/rbi/gems/activerecord@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8363
  140. data/sorbet/rbi/gems/activestorage@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -876
  141. data/sorbet/rbi/gems/activesupport@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -3987
  142. data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -40
  143. data/sorbet/rbi/gems/commander@4.5.2.rbi +0 -8
  144. data/sorbet/rbi/gems/concurrent-ruby@1.1.8.rbi +0 -1969
  145. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +0 -26
  146. data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -41
  147. data/sorbet/rbi/gems/globalid@0.4.2.rbi +0 -178
  148. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
  149. data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -600
  150. data/sorbet/rbi/gems/loofah@2.9.0.rbi +0 -274
  151. data/sorbet/rbi/gems/m@1.5.1.rbi +0 -108
  152. data/sorbet/rbi/gems/marcel@1.0.0.rbi +0 -70
  153. data/sorbet/rbi/gems/mini_mime@1.0.3.rbi +0 -71
  154. data/sorbet/rbi/gems/minitest-focus@1.2.1.rbi +0 -8
  155. data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -544
  156. data/sorbet/rbi/gems/mocha@1.12.0.rbi +0 -953
  157. data/sorbet/rbi/gems/nio4r@2.5.7.rbi +0 -90
  158. data/sorbet/rbi/gems/nokogiri@1.11.2.rbi +0 -1647
  159. data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -117
  160. data/sorbet/rbi/gems/parlour@6.0.0.rbi +0 -1272
  161. data/sorbet/rbi/gems/parser@3.0.0.0.rbi +0 -1745
  162. data/sorbet/rbi/gems/pry@0.14.0.rbi +0 -8
  163. data/sorbet/rbi/gems/psych@3.3.2.rbi +0 -24
  164. data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -57
  165. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -335
  166. data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1718
  167. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -213
  168. data/sorbet/rbi/gems/rails@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8
  169. data/sorbet/rbi/gems/railties@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -880
  170. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -155
  171. data/sorbet/rbi/gems/rake@13.0.3.rbi +0 -837
  172. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
  173. data/sorbet/rbi/gems/rexml@3.2.4.rbi +0 -8
  174. data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +0 -8
  175. data/sorbet/rbi/gems/rubocop-performance@1.10.2.rbi +0 -8
  176. data/sorbet/rbi/gems/rubocop-sorbet@0.6.1.rbi +0 -8
  177. data/sorbet/rbi/gems/rubocop@1.12.0.rbi +0 -8
  178. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +0 -168
  179. data/sorbet/rbi/gems/spoom@1.1.0.rbi +0 -1061
  180. data/sorbet/rbi/gems/spring@2.1.1.rbi +0 -160
  181. data/sorbet/rbi/gems/sprockets-rails@3.2.2.rbi +0 -451
  182. data/sorbet/rbi/gems/sprockets@4.0.2.rbi +0 -1133
  183. data/sorbet/rbi/gems/tapioca@0.4.19.rbi +0 -603
  184. data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -893
  185. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -566
  186. data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
  187. data/sorbet/rbi/gems/websocket-driver@0.7.3.rbi +0 -438
  188. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -177
@@ -0,0 +1,953 @@
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-2.0.2/lib/rack/test/cookie_jar.rb:6
10
+ module Rack
11
+ class << self
12
+ # Return the Rack release as a dotted string.
13
+ #
14
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack/version.rb:26
15
+ def release; end
16
+
17
+ # Return the Rack protocol version as a dotted string.
18
+ #
19
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack/version.rb:19
20
+ def version; end
21
+ end
22
+ end
23
+
24
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:29
25
+ Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String)
26
+
27
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:31
28
+ Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String)
29
+
30
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:32
31
+ Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String)
32
+
33
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:43
34
+ Rack::DELETE = T.let(T.unsafe(nil), String)
35
+
36
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:36
37
+ Rack::ETAG = T.let(T.unsafe(nil), String)
38
+
39
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:30
40
+ Rack::EXPIRES = T.let(T.unsafe(nil), String)
41
+
42
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack/file.rb:6
43
+ Rack::File = Rack::Files
44
+
45
+ # HTTP method verbs
46
+ #
47
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:39
48
+ Rack::GET = T.let(T.unsafe(nil), String)
49
+
50
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:44
51
+ Rack::HEAD = T.let(T.unsafe(nil), String)
52
+
53
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:20
54
+ Rack::HTTPS = T.let(T.unsafe(nil), String)
55
+
56
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:35
57
+ Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String)
58
+
59
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:17
60
+ Rack::HTTP_HOST = T.let(T.unsafe(nil), String)
61
+
62
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:18
63
+ Rack::HTTP_PORT = T.let(T.unsafe(nil), String)
64
+
65
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:19
66
+ Rack::HTTP_VERSION = T.let(T.unsafe(nil), String)
67
+
68
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:46
69
+ Rack::LINK = T.let(T.unsafe(nil), String)
70
+
71
+ # For backwards compatibility with 1.1.0 and below
72
+ #
73
+ # source://rack-test-2.0.2/lib/rack/test.rb:413
74
+ Rack::MockSession = Rack::Test::Session
75
+
76
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:45
77
+ Rack::OPTIONS = T.let(T.unsafe(nil), String)
78
+
79
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:42
80
+ Rack::PATCH = T.let(T.unsafe(nil), String)
81
+
82
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:21
83
+ Rack::PATH_INFO = T.let(T.unsafe(nil), String)
84
+
85
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:40
86
+ Rack::POST = T.let(T.unsafe(nil), String)
87
+
88
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:41
89
+ Rack::PUT = T.let(T.unsafe(nil), String)
90
+
91
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:25
92
+ Rack::QUERY_STRING = T.let(T.unsafe(nil), String)
93
+
94
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:53
95
+ Rack::RACK_ERRORS = T.let(T.unsafe(nil), String)
96
+
97
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:63
98
+ Rack::RACK_HIJACK = T.let(T.unsafe(nil), String)
99
+
100
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:65
101
+ Rack::RACK_HIJACK_IO = T.let(T.unsafe(nil), String)
102
+
103
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:55
104
+ Rack::RACK_INPUT = T.let(T.unsafe(nil), String)
105
+
106
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:64
107
+ Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String)
108
+
109
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:54
110
+ Rack::RACK_LOGGER = T.let(T.unsafe(nil), String)
111
+
112
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:76
113
+ Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String)
114
+
115
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:67
116
+ Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String)
117
+
118
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:68
119
+ Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String)
120
+
121
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:60
122
+ Rack::RACK_MULTIPROCESS = T.let(T.unsafe(nil), String)
123
+
124
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:59
125
+ Rack::RACK_MULTITHREAD = T.let(T.unsafe(nil), String)
126
+
127
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:66
128
+ Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String)
129
+
130
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:72
131
+ Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String)
132
+
133
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:73
134
+ Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String)
135
+
136
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:70
137
+ Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String)
138
+
139
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:69
140
+ Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String)
141
+
142
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:71
143
+ Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String)
144
+
145
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:74
146
+ Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String)
147
+
148
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:75
149
+ Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String)
150
+
151
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:61
152
+ Rack::RACK_RUNONCE = T.let(T.unsafe(nil), String)
153
+
154
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:56
155
+ Rack::RACK_SESSION = T.let(T.unsafe(nil), String)
156
+
157
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:57
158
+ Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String)
159
+
160
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:77
161
+ Rack::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String)
162
+
163
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:58
164
+ Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String)
165
+
166
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:52
167
+ Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String)
168
+
169
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:62
170
+ Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String)
171
+
172
+ # Rack environment variables
173
+ #
174
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:51
175
+ Rack::RACK_VERSION = T.let(T.unsafe(nil), String)
176
+
177
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack/version.rb:23
178
+ Rack::RELEASE = T.let(T.unsafe(nil), String)
179
+
180
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:22
181
+ Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String)
182
+
183
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:23
184
+ Rack::REQUEST_PATH = T.let(T.unsafe(nil), String)
185
+
186
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:24
187
+ Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String)
188
+
189
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:27
190
+ Rack::SERVER_NAME = T.let(T.unsafe(nil), String)
191
+
192
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:28
193
+ Rack::SERVER_PORT = T.let(T.unsafe(nil), String)
194
+
195
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:26
196
+ Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String)
197
+
198
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:33
199
+ Rack::SET_COOKIE = T.let(T.unsafe(nil), String)
200
+
201
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:48
202
+ Rack::TRACE = T.let(T.unsafe(nil), String)
203
+
204
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:34
205
+ Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String)
206
+
207
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:7
208
+ module Rack::Test
209
+ class << self
210
+ # Whether the version of rack in use handles encodings.
211
+ #
212
+ # @return [Boolean]
213
+ #
214
+ # source://rack-test-2.0.2/lib/rack/test.rb:407
215
+ def encoding_aware_strings?; end
216
+ end
217
+ end
218
+
219
+ # Represents individual cookies in the cookie jar. This is considered private
220
+ # API and behavior of this class can change at any time.
221
+ #
222
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:10
223
+ class Rack::Test::Cookie
224
+ include ::Rack::Utils
225
+
226
+ # @return [Cookie] a new instance of Cookie
227
+ #
228
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:23
229
+ def initialize(raw, uri = T.unsafe(nil), default_host = T.unsafe(nil)); end
230
+
231
+ # Order cookies by name, path, and domain.
232
+ #
233
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:107
234
+ def <=>(other); end
235
+
236
+ # The explicit or implicit domain for the cookie.
237
+ #
238
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:58
239
+ def domain; end
240
+
241
+ # Whether the cookie has a value.
242
+ #
243
+ # @return [Boolean]
244
+ #
245
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:53
246
+ def empty?; end
247
+
248
+ # Whether the cookie is currently expired.
249
+ #
250
+ # @return [Boolean]
251
+ #
252
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:85
253
+ def expired?; end
254
+
255
+ # A Time value for when the cookie expires, if the expires option is set.
256
+ #
257
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:80
258
+ def expires; end
259
+
260
+ # Whether the cookie has the httponly flag, indicating it is not available via
261
+ # a javascript API.
262
+ #
263
+ # @return [Boolean]
264
+ #
265
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:70
266
+ def http_only?; end
267
+
268
+ # Cookies that do not match the URI will not be sent in requests to the URI.
269
+ #
270
+ # @return [Boolean]
271
+ #
272
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:102
273
+ def matches?(uri); end
274
+
275
+ # The name of the cookie, will be a string
276
+ #
277
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:14
278
+ def name; end
279
+
280
+ # The explicit or implicit path for the cookie.
281
+ #
282
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:75
283
+ def path; end
284
+
285
+ # The raw string for the cookie, without options. Will generally be in
286
+ # name=value format is name and value are provided.
287
+ #
288
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:21
289
+ def raw; end
290
+
291
+ # Wether the given cookie can replace the current cookie in the cookie jar.
292
+ #
293
+ # @return [Boolean]
294
+ #
295
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:48
296
+ def replaces?(other); end
297
+
298
+ # Whether the cookie has the secure flag, indicating it can only be sent over
299
+ # an encrypted connection.
300
+ #
301
+ # @return [Boolean]
302
+ #
303
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:64
304
+ def secure?; end
305
+
306
+ # A hash of cookie options, including the cookie value, but excluding the cookie name.
307
+ #
308
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:112
309
+ def to_h; end
310
+
311
+ # A hash of cookie options, including the cookie value, but excluding the cookie name.
312
+ #
313
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:112
314
+ def to_hash; end
315
+
316
+ # Whether the cookie is valid for the given URI.
317
+ #
318
+ # @return [Boolean]
319
+ #
320
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:90
321
+ def valid?(uri); end
322
+
323
+ # The value of the cookie, will be a string or nil if there is no value.
324
+ #
325
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:17
326
+ def value; end
327
+
328
+ private
329
+
330
+ # The default URI to use for the cookie, including just the host.
331
+ #
332
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:124
333
+ def default_uri; end
334
+ end
335
+
336
+ # Represents all cookies for a session, handling adding and
337
+ # removing cookies, and finding which cookies apply to a given
338
+ # request. This is considered private API and behavior of this
339
+ # class can change at any time.
340
+ #
341
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:133
342
+ class Rack::Test::CookieJar
343
+ # @return [CookieJar] a new instance of CookieJar
344
+ #
345
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:136
346
+ def initialize(cookies = T.unsafe(nil), default_host = T.unsafe(nil)); end
347
+
348
+ # Add a Cookie to the cookie jar.
349
+ #
350
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:192
351
+ def <<(new_cookie); end
352
+
353
+ # Return the value for first cookie with the given name, or nil
354
+ # if no such cookie exists.
355
+ #
356
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:143
357
+ def [](name); end
358
+
359
+ # Set a cookie with the given name and value in the
360
+ # cookie jar.
361
+ #
362
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:153
363
+ def []=(name, value); end
364
+
365
+ # Delete all cookies with the given name from the cookie jar.
366
+ #
367
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:167
368
+ def delete(name); end
369
+
370
+ # Return a raw cookie string for the cookie header to
371
+ # use for the given URI.
372
+ #
373
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:203
374
+ def for(uri); end
375
+
376
+ # Return the first cookie with the given name, or nil if
377
+ # no such cookie exists.
378
+ #
379
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:159
380
+ def get_cookie(name); end
381
+
382
+ # Add a string of raw cookie information to the cookie jar,
383
+ # if the cookie is valid for the given URI.
384
+ # Cookies should be separated with a newline.
385
+ #
386
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:177
387
+ def merge(raw_cookies, uri = T.unsafe(nil)); end
388
+
389
+ # Return a hash cookie names and cookie values for cookies in the jar.
390
+ #
391
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:220
392
+ def to_hash; end
393
+
394
+ private
395
+
396
+ # Yield each cookie that matches for the URI.
397
+ #
398
+ # The cookies are sorted by most specific first. So, we loop through
399
+ # all the cookies in order and add it to a hash by cookie name if
400
+ # the cookie can be sent to the current URI. It's added to the hash
401
+ # so that when we are done, the cookies will be unique by name and
402
+ # we'll have grabbed the most specific to the URI.
403
+ #
404
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:239
405
+ def each_cookie_for(uri); end
406
+ end
407
+
408
+ # source://rack-test-2.0.2/lib/rack/test/cookie_jar.rb:134
409
+ Rack::Test::CookieJar::DELIMITER = T.let(T.unsafe(nil), String)
410
+
411
+ # The default host to use for requests, when a full URI is not
412
+ # provided.
413
+ #
414
+ # source://rack-test-2.0.2/lib/rack/test.rb:33
415
+ Rack::Test::DEFAULT_HOST = T.let(T.unsafe(nil), String)
416
+
417
+ # The ending boundary in multipart requests
418
+ #
419
+ # source://rack-test-2.0.2/lib/rack/test.rb:42
420
+ Rack::Test::END_BOUNDARY = T.let(T.unsafe(nil), String)
421
+
422
+ # The common base class for exceptions raised by Rack::Test
423
+ #
424
+ # source://rack-test-2.0.2/lib/rack/test.rb:45
425
+ class Rack::Test::Error < ::StandardError; end
426
+
427
+ # The default multipart boundary to use for multipart request bodies
428
+ #
429
+ # source://rack-test-2.0.2/lib/rack/test.rb:36
430
+ Rack::Test::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String)
431
+
432
+ # This module serves as the primary integration point for using Rack::Test
433
+ # in a testing environment. It depends on an app method being defined in the
434
+ # same context, and provides the Rack::Test API methods (see Rack::Test::Session
435
+ # for their documentation). It defines the following methods that are delegated
436
+ # to the current session: :request, :get, :post, :put, :patch, :delete, :options,
437
+ # :head, :custom_request, :follow_redirect!, :header, :env, :set_cookie,
438
+ # :clear_cookies, :authorize, :basic_authorize, :last_response, and :last_request.
439
+ #
440
+ # Example:
441
+ #
442
+ # class HomepageTest < Test::Unit::TestCase
443
+ # include Rack::Test::Methods
444
+ #
445
+ # def app
446
+ # MyApp
447
+ # end
448
+ # end
449
+ #
450
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:24
451
+ module Rack::Test::Methods
452
+ extend ::Forwardable
453
+
454
+ # Private accessor to avoid uninitialized instance variable warning in Ruby 2.*
455
+ #
456
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:91
457
+ def _rack_test_current_session=(_arg0); end
458
+
459
+ # source://RUBY_ROOT/forwardable.rb:226
460
+ def authorize(*args, &block); end
461
+
462
+ # source://RUBY_ROOT/forwardable.rb:226
463
+ def basic_authorize(*args, &block); end
464
+
465
+ # Create a new Rack::Test::Session for #app.
466
+ #
467
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:40
468
+ def build_rack_test_session(_name); end
469
+
470
+ # source://RUBY_ROOT/forwardable.rb:226
471
+ def clear_cookies(*args, &block); end
472
+
473
+ # Return the currently actively session. This is the session to
474
+ # which the delegated methods are sent.
475
+ #
476
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:51
477
+ def current_session; end
478
+
479
+ # source://RUBY_ROOT/forwardable.rb:226
480
+ def custom_request(*args, &block); end
481
+
482
+ # source://RUBY_ROOT/forwardable.rb:226
483
+ def delete(*args, &block); end
484
+
485
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:64
486
+ def digest_authorize(username, password); end
487
+
488
+ # source://RUBY_ROOT/forwardable.rb:226
489
+ def env(*args, &block); end
490
+
491
+ # source://RUBY_ROOT/forwardable.rb:226
492
+ def follow_redirect!(*args, &block); end
493
+
494
+ # source://RUBY_ROOT/forwardable.rb:226
495
+ def get(*args, &block); end
496
+
497
+ # source://RUBY_ROOT/forwardable.rb:226
498
+ def head(*args, &block); end
499
+
500
+ # source://RUBY_ROOT/forwardable.rb:226
501
+ def header(*args, &block); end
502
+
503
+ # source://RUBY_ROOT/forwardable.rb:226
504
+ def last_request(*args, &block); end
505
+
506
+ # source://RUBY_ROOT/forwardable.rb:226
507
+ def last_response(*args, &block); end
508
+
509
+ # source://RUBY_ROOT/forwardable.rb:226
510
+ def options(*args, &block); end
511
+
512
+ # source://RUBY_ROOT/forwardable.rb:226
513
+ def patch(*args, &block); end
514
+
515
+ # source://RUBY_ROOT/forwardable.rb:226
516
+ def post(*args, &block); end
517
+
518
+ # source://RUBY_ROOT/forwardable.rb:226
519
+ def put(*args, &block); end
520
+
521
+ # Return the existing session with the given name, or a new
522
+ # rack session. Always use a new session if name is nil.
523
+ # For backwards compatibility with older rack-test versions.
524
+ #
525
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:29
526
+ def rack_mock_session(name = T.unsafe(nil)); end
527
+
528
+ # Return the existing session with the given name, or a new
529
+ # rack session. Always use a new session if name is nil.
530
+ #
531
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:29
532
+ def rack_test_session(name = T.unsafe(nil)); end
533
+
534
+ # source://RUBY_ROOT/forwardable.rb:226
535
+ def request(*args, &block); end
536
+
537
+ # source://RUBY_ROOT/forwardable.rb:226
538
+ def set_cookie(*args, &block); end
539
+
540
+ # Create a new session (or reuse an existing session with the given name),
541
+ # and make it the current session for the given block.
542
+ #
543
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:57
544
+ def with_session(name); end
545
+
546
+ private
547
+
548
+ # Private accessor to avoid uninitialized instance variable warning in Ruby 2.*
549
+ #
550
+ # source://rack-test-2.0.2/lib/rack/test/methods.rb:91
551
+ def _rack_test_current_session; end
552
+ end
553
+
554
+ # The starting boundary in multipart requests
555
+ #
556
+ # source://rack-test-2.0.2/lib/rack/test.rb:39
557
+ Rack::Test::START_BOUNDARY = T.let(T.unsafe(nil), String)
558
+
559
+ # Rack::Test::Session handles a series of requests issued to a Rack app.
560
+ # It keeps track of the cookies for the session, and allows for setting headers
561
+ # and a default rack environment that is used for future requests.
562
+ #
563
+ # Rack::Test::Session's methods are most often called through Rack::Test::Methods,
564
+ # which will automatically build a session when it's first used.
565
+ #
566
+ # source://rack-test-2.0.2/lib/rack/test.rb:53
567
+ class Rack::Test::Session
568
+ include ::Rack::Utils
569
+ include ::Rack::Test::Utils
570
+ extend ::Forwardable
571
+
572
+ # Creates a Rack::Test::Session for a given Rack app or Rack::Test::BasicSession.
573
+ #
574
+ # Note: Generally, you won't need to initialize a Rack::Test::Session directly.
575
+ # Instead, you should include Rack::Test::Methods into your testing context.
576
+ # (See README.rdoc for an example)
577
+ #
578
+ # The following methods are defined via metaprogramming: get, post, put, patch,
579
+ # delete, options, and head. Each method submits a request with the given request
580
+ # method, with the given URI and optional parameters and rack environment.
581
+ # Examples:
582
+ #
583
+ # # URI only:
584
+ # get("/") # GET /
585
+ # get("/?foo=bar") # GET /?foo=bar
586
+ #
587
+ # # URI and parameters
588
+ # get("/foo", 'bar'=>'baz') # GET /foo?bar=baz
589
+ # post("/foo", 'bar'=>'baz') # POST /foo (bar=baz in request body)
590
+ #
591
+ # # URI, parameters, and rack environment
592
+ # get("/bar", {}, 'CONTENT_TYPE'=>'foo')
593
+ # get("/bar", {'foo'=>'baz'}, 'HTTP_ACCEPT'=>'*')
594
+ #
595
+ # The above methods as well as #request and #custom_request store the Rack::Request
596
+ # submitted in #last_request. The methods store a Rack::MockResponse based on the
597
+ # response in #last_response. #last_response is also returned by the methods.
598
+ # If a block is given, #last_response is also yielded to the block.
599
+ #
600
+ # @return [Session] a new instance of Session
601
+ #
602
+ # source://rack-test-2.0.2/lib/rack/test.rb:99
603
+ def initialize(app, default_host = T.unsafe(nil)); end
604
+
605
+ # source://rack-test-2.0.2/lib/rack/test.rb:217
606
+ def _digest_authorize(username, password); end
607
+
608
+ # Run a block after the each request completes.
609
+ #
610
+ # source://rack-test-2.0.2/lib/rack/test.rb:120
611
+ def after_request(&block); end
612
+
613
+ # Set the username and password for HTTP Basic authorization, to be
614
+ # included in subsequent requests in the HTTP_AUTHORIZATION header.
615
+ #
616
+ # Example:
617
+ # basic_authorize "bryan", "secret"
618
+ #
619
+ # source://rack-test-2.0.2/lib/rack/test.rb:200
620
+ def authorize(username, password); end
621
+
622
+ # Set the username and password for HTTP Basic authorization, to be
623
+ # included in subsequent requests in the HTTP_AUTHORIZATION header.
624
+ #
625
+ # Example:
626
+ # basic_authorize "bryan", "secret"
627
+ #
628
+ # source://rack-test-2.0.2/lib/rack/test.rb:200
629
+ def basic_authorize(username, password); end
630
+
631
+ # Replace the current cookie jar with an empty cookie jar.
632
+ #
633
+ # source://rack-test-2.0.2/lib/rack/test.rb:125
634
+ def clear_cookies; end
635
+
636
+ # The Rack::Test::CookieJar for the cookies for the current session.
637
+ #
638
+ # source://rack-test-2.0.2/lib/rack/test.rb:67
639
+ def cookie_jar; end
640
+
641
+ # The Rack::Test::CookieJar for the cookies for the current session.
642
+ #
643
+ # source://rack-test-2.0.2/lib/rack/test.rb:67
644
+ def cookie_jar=(_arg0); end
645
+
646
+ # Issue a request using the given HTTP verb for the given URI, with optional
647
+ # params and rack environment. Example:
648
+ #
649
+ # custom_request "LINK", "/"
650
+ #
651
+ # source://rack-test-2.0.2/lib/rack/test.rb:162
652
+ def custom_request(verb, uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
653
+
654
+ # The default host used for the session for when using paths for URIs.
655
+ #
656
+ # source://rack-test-2.0.2/lib/rack/test.rb:70
657
+ def default_host; end
658
+
659
+ # source://rack-test-2.0.2/lib/rack/test.rb:113
660
+ def delete(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
661
+
662
+ # Set the username and password for HTTP Digest authorization, to be
663
+ # included in subsequent requests in the HTTP_AUTHORIZATION header.
664
+ # This method is deprecated and will be removed in rack-test 2.1
665
+ #
666
+ # Example:
667
+ # digest_authorize "bryan", "secret"
668
+ #
669
+ # source://rack-test-2.0.2/lib/rack/test.rb:213
670
+ def digest_authorize(username, password); end
671
+
672
+ # Set an entry in the rack environment to be included on all subsequent
673
+ # requests through the session. Use a value of nil to remove a previously
674
+ # value. Example:
675
+ #
676
+ # env "rack.session", {:csrf => 'token'}
677
+ #
678
+ # source://rack-test-2.0.2/lib/rack/test.rb:187
679
+ def env(name, value); end
680
+
681
+ # Rack::Test will not follow any redirects automatically. This method
682
+ # will follow the redirect returned (including setting the Referer header
683
+ # on the new request) in the last response. If the last response was not
684
+ # a redirect, an error will be raised.
685
+ #
686
+ # source://rack-test-2.0.2/lib/rack/test.rb:226
687
+ def follow_redirect!; end
688
+
689
+ # source://rack-test-2.0.2/lib/rack/test.rb:113
690
+ def get(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
691
+
692
+ # source://rack-test-2.0.2/lib/rack/test.rb:113
693
+ def head(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
694
+
695
+ # Set a header to be included on all subsequent requests through the
696
+ # session. Use a value of nil to remove a previously configured header.
697
+ #
698
+ # In accordance with the Rack spec, headers will be included in the Rack
699
+ # environment hash in HTTP_USER_AGENT form. Example:
700
+ #
701
+ # header "user-agent", "Firefox"
702
+ #
703
+ # source://rack-test-2.0.2/lib/rack/test.rb:175
704
+ def header(name, value); end
705
+
706
+ # Return the last request issued in the session. Raises an error if no
707
+ # requests have been sent yet.
708
+ #
709
+ # @raise [Error]
710
+ #
711
+ # source://rack-test-2.0.2/lib/rack/test.rb:136
712
+ def last_request; end
713
+
714
+ # Return the last response received in the session. Raises an error if
715
+ # no requests have been sent yet.
716
+ #
717
+ # @raise [Error]
718
+ #
719
+ # source://rack-test-2.0.2/lib/rack/test.rb:143
720
+ def last_response; end
721
+
722
+ # source://rack-test-2.0.2/lib/rack/test.rb:113
723
+ def options(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
724
+
725
+ # source://rack-test-2.0.2/lib/rack/test.rb:113
726
+ def patch(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
727
+
728
+ # source://rack-test-2.0.2/lib/rack/test.rb:113
729
+ def post(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
730
+
731
+ # source://rack-test-2.0.2/lib/rack/test.rb:113
732
+ def put(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
733
+
734
+ # Issue a request to the Rack app for the given URI and optional Rack
735
+ # environment. Example:
736
+ #
737
+ # request "/"
738
+ #
739
+ # source://rack-test-2.0.2/lib/rack/test.rb:152
740
+ def request(uri, env = T.unsafe(nil), &block); end
741
+
742
+ # Set a cookie in the current cookie jar.
743
+ #
744
+ # source://rack-test-2.0.2/lib/rack/test.rb:130
745
+ def set_cookie(cookie, uri = T.unsafe(nil)); end
746
+
747
+ private
748
+
749
+ # Append a string version of the query params to the array of query params.
750
+ #
751
+ # source://rack-test-2.0.2/lib/rack/test.rb:338
752
+ def append_query_params(query_array, query_params); end
753
+
754
+ # close() gets called automatically in newer Rack versions.
755
+ #
756
+ # source://rack-test-2.0.2/lib/rack/test.rb:264
757
+ def close_body(body); end
758
+
759
+ # @return [Boolean]
760
+ #
761
+ # source://rack-test-2.0.2/lib/rack/test.rb:401
762
+ def digest_auth_configured?; end
763
+
764
+ # source://rack-test-2.0.2/lib/rack/test.rb:378
765
+ def digest_auth_header; end
766
+
767
+ # Update environment to use based on given URI.
768
+ #
769
+ # source://rack-test-2.0.2/lib/rack/test.rb:291
770
+ def env_for(uri, env); end
771
+
772
+ # Return the multipart content type to use based on the environment.
773
+ #
774
+ # source://rack-test-2.0.2/lib/rack/test.rb:344
775
+ def multipart_content_type(env); end
776
+
777
+ # Normalize URI based on given URI/path and environment.
778
+ #
779
+ # source://rack-test-2.0.2/lib/rack/test.rb:269
780
+ def parse_uri(path, env); end
781
+
782
+ # Submit the request with the given URI and rack environment to
783
+ # the mock session. Returns and potentially yields the last response.
784
+ #
785
+ # source://rack-test-2.0.2/lib/rack/test.rb:355
786
+ def process_request(uri, env); end
787
+
788
+ # @return [Boolean]
789
+ #
790
+ # source://rack-test-2.0.2/lib/rack/test.rb:395
791
+ def retry_with_digest_auth?(env); end
792
+
793
+ class << self
794
+ # source://rack-test-2.0.2/lib/rack/test.rb:57
795
+ def new(app, default_host = T.unsafe(nil)); end
796
+ end
797
+ end
798
+
799
+ # source://rack-test-2.0.2/lib/rack/test.rb:277
800
+ Rack::Test::Session::DEFAULT_ENV = T.let(T.unsafe(nil), Hash)
801
+
802
+ # Wraps a Tempfile with a content type. Including one or more UploadedFile's
803
+ # in the params causes Rack::Test to build and issue a multipart request.
804
+ #
805
+ # Example:
806
+ # post "/photos", "file" => Rack::Test::UploadedFile.new("me.jpg", "image/jpeg")
807
+ #
808
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:14
809
+ class Rack::Test::UploadedFile
810
+ # Creates a new UploadedFile instance.
811
+ #
812
+ # Arguments:
813
+ # content :: is a path to a file, or an {IO} or {StringIO} object representing the content.
814
+ # content_type :: MIME type of the file
815
+ # binary :: Whether the file should be set to binmode (content treated as binary).
816
+ # original_filename :: The filename to use for the file if +content+ is a StringIO.
817
+ #
818
+ # @return [UploadedFile] a new instance of UploadedFile
819
+ #
820
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:31
821
+ def initialize(content, content_type = T.unsafe(nil), binary = T.unsafe(nil), original_filename: T.unsafe(nil)); end
822
+
823
+ # Append to given buffer in 64K chunks to avoid multiple large
824
+ # copies of file data in memory. Rewind tempfile before and
825
+ # after to make sure all data in tempfile is appended to the
826
+ # buffer.
827
+ #
828
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:58
829
+ def append_to(buffer); end
830
+
831
+ # The content type of the "uploaded" file
832
+ #
833
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:22
834
+ def content_type; end
835
+
836
+ # The content type of the "uploaded" file
837
+ #
838
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:22
839
+ def content_type=(_arg0); end
840
+
841
+ # The path to the tempfile. Will not work if the receiver's content is from a StringIO.
842
+ #
843
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:44
844
+ def local_path; end
845
+
846
+ # Delegate all methods not handled to the tempfile.
847
+ #
848
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:50
849
+ def method_missing(method_name, *args, &block); end
850
+
851
+ # The filename, *not* including the path, of the "uploaded" file
852
+ #
853
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:16
854
+ def original_filename; end
855
+
856
+ # The path to the tempfile. Will not work if the receiver's content is from a StringIO.
857
+ #
858
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:44
859
+ def path; end
860
+
861
+ # The tempfile
862
+ #
863
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:19
864
+ def tempfile; end
865
+
866
+ private
867
+
868
+ # Create a tempfile and copy the content from the given path into the tempfile.
869
+ #
870
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:94
871
+ def initialize_from_file_path(path); end
872
+
873
+ # Use the StringIO as the tempfile.
874
+ #
875
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:88
876
+ def initialize_from_stringio(stringio, original_filename); end
877
+
878
+ # @return [Boolean]
879
+ #
880
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:69
881
+ def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end
882
+
883
+ class << self
884
+ # Close and unlink the given file, used as a finalizer for the tempfile,
885
+ # if the tempfile is backed by a file in the filesystem.
886
+ #
887
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:80
888
+ def actually_finalize(file); end
889
+
890
+ # A proc that can be used as a finalizer to close and unlink the tempfile.
891
+ #
892
+ # source://rack-test-2.0.2/lib/rack/test/uploaded_file.rb:74
893
+ def finalize(file); end
894
+ end
895
+ end
896
+
897
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:5
898
+ module Rack::Test::Utils
899
+ include ::Rack::Utils
900
+ extend ::Rack::Utils
901
+ extend ::Rack::Test::Utils
902
+
903
+ # Build a multipart body for the given params.
904
+ #
905
+ # @raise [ArgumentError]
906
+ #
907
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:34
908
+ def build_multipart(params, _first = T.unsafe(nil), multipart = T.unsafe(nil)); end
909
+
910
+ # Build a query string for the given value and prefix. The value
911
+ # can be an array or hash of parameters.
912
+ #
913
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:11
914
+ def build_nested_query(value, prefix = T.unsafe(nil)); end
915
+
916
+ private
917
+
918
+ # Append each multipart parameter value to the buffer.
919
+ #
920
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:100
921
+ def _build_parts(buffer, parameters); end
922
+
923
+ # Append the multipart fragment for a parameter that is a file upload to the buffer.
924
+ #
925
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:133
926
+ def build_file_part(buffer, parameter_name, uploaded_file); end
927
+
928
+ # Build the multipart content for uploading.
929
+ #
930
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:94
931
+ def build_parts(buffer, parameters); end
932
+
933
+ # Append the multipart fragment for a parameter that isn't a file upload to the buffer.
934
+ #
935
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:121
936
+ def build_primitive_part(buffer, parameter_name, value); end
937
+
938
+ # Return a flattened hash of parameter values based on the given params.
939
+ #
940
+ # source://rack-test-2.0.2/lib/rack/test/utils.rb:62
941
+ def normalize_multipart_params(params, first = T.unsafe(nil)); end
942
+ end
943
+
944
+ # source://rack-test-2.0.2/lib/rack/test/version.rb:3
945
+ Rack::Test::VERSION = T.let(T.unsafe(nil), String)
946
+
947
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack.rb:47
948
+ Rack::UNLINK = T.let(T.unsafe(nil), String)
949
+
950
+ # The Rack protocol version number implemented.
951
+ #
952
+ # source:///opt/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/rack-2.2.4/lib/rack/version.rb:16
953
+ Rack::VERSION = T.let(T.unsafe(nil), Array)