orthoses 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -1
  3. data/Gemfile.lock +35 -22
  4. data/examples/rack-test/Gemfile.lock +3 -3
  5. data/examples/rack-test/out/rack/test/cookie.rbs +28 -0
  6. data/examples/rack-test/out/rack/test/cookie_jar.rbs +28 -0
  7. data/examples/rack-test/out/rack/test/fake_app.rbs +13 -0
  8. data/examples/rack-test/out/rack/test/input_rewinder.rbs +8 -0
  9. data/examples/rack-test/out/rack/test/methods.rbs +98 -0
  10. data/examples/rack-test/out/rack/test/session.rbs +186 -0
  11. data/examples/rack-test/out/rack/test/uploaded_file.rbs +18 -0
  12. data/examples/rack-test/out/rack/test/utils.rbs +112 -0
  13. data/examples/rack-test/out/rack/test.rbs +3 -0
  14. data/lib/orthoses/call_tracer/lazy.rb +12 -0
  15. data/lib/orthoses/content/duplication_checker.rb +40 -18
  16. data/lib/orthoses/content/environment.rb +17 -3
  17. data/lib/orthoses/content/header_builder.rb +4 -5
  18. data/lib/orthoses/content.rb +47 -45
  19. data/lib/orthoses/filter.rb +2 -2
  20. data/lib/orthoses/rbs_prototype_rb.rb +16 -2
  21. data/lib/orthoses/trace/method.rb +7 -2
  22. data/lib/orthoses/utils.rb +9 -25
  23. data/lib/orthoses/version.rb +1 -1
  24. data/orthoses.gemspec +1 -1
  25. data/sig/orthoses/builder.rbs +9 -0
  26. data/sig/orthoses/call_tracer/capture.rbs +1 -1
  27. data/sig/orthoses/call_tracer/lazy.rbs +14 -1
  28. data/sig/orthoses/call_tracer.rbs +1 -1
  29. data/sig/orthoses/content/duplication_checker.rbs +3 -0
  30. data/sig/orthoses/content/header_builder.rbs +1 -0
  31. data/sig/orthoses/content.rbs +1 -1
  32. data/sig/orthoses/filter.rbs +5 -0
  33. data/sig/orthoses/lazy_trace_point.rbs +9 -1
  34. data/sig/orthoses/outputable/avoid_recursive_ancestor_error.rbs +2 -0
  35. data/sig/orthoses/outputable/constantizable_filter.rbs +2 -0
  36. data/sig/orthoses/outputable/uniq_content_body.rbs +2 -0
  37. data/sig/orthoses/pp.rbs +2 -0
  38. data/sig/orthoses/rbs_prototype_rb.rbs +5 -0
  39. data/sig/orthoses/rbs_prototype_runtime.rbs +3 -0
  40. data/sig/orthoses/sort.rbs +1 -0
  41. data/sig/orthoses/store.rbs +2 -0
  42. data/sig/orthoses/tap.rbs +3 -0
  43. data/sig/orthoses/utils/type_list.rbs +1 -0
  44. data/sig/orthoses/utils.rbs +0 -2
  45. data/sig/orthoses.rbs +1 -1
  46. metadata +14 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 843da9ba9bba3cf5c84ec56041836cb9469ad5faffd188f8edc13a3920ca499e
4
- data.tar.gz: 791b0d87a885b327a41fff090f9dadce9b377712e9d7d51bd52fbaa997c98242
3
+ metadata.gz: e2915ad2b524676ac4ea67e61fcc90713bdaa8e79cb2ff01aeba74fe54b4885d
4
+ data.tar.gz: 0f8823a7e88b4030eb6554ac9f35a068730ac944378832f923c99cf3b4e8e6be
5
5
  SHA512:
6
- metadata.gz: 81438b5d94ce56d7164cdc781eaaa2c526cbba21cab147fc91d4e1b0c9b7992e31259d9bda2f5e2441a3dc59e3f7ec940c910e1cf63bbec6ef84ca4b046af0ee
7
- data.tar.gz: ec0049000f94a194747974233adaa1c51a7759c0d78fb84a11e543877ee15d01f212b59ed63c5cadbd221701de4bfa9c84c0f6fcc5feffdab0f954b1fd63e2d0
6
+ metadata.gz: '06038e9dd28433a1c9358915720fe942f597caee2d68651ce7c54b47136633cc1d55288c7b8053766f393bacda9974b1ee662337f80d78b0796d405453b2cc32'
7
+ data.tar.gz: 92074fd8665515453126f44627604f7fd3da1dcb7a85ec25b1ef51424c6797f9b1f67925d2349db05b7ce7aace06dc7f3f2d2be737cfb5399383bed4f846b11f
data/Gemfile CHANGED
@@ -8,4 +8,9 @@ gemspec
8
8
  gem "rbs"
9
9
  gem "rake", "~> 13.0"
10
10
  gem "rgot", "~> 1.1"
11
- gem "steep"
11
+ gem "activesupport"
12
+ gem "debug"
13
+
14
+ group :steep do
15
+ gem "steep", "1.4.0.dev.2"
16
+ end
data/Gemfile.lock CHANGED
@@ -1,43 +1,52 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- orthoses (1.5.0)
5
- rbs (~> 2.0)
4
+ orthoses (1.7.0)
5
+ rbs (~> 3.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (7.0.4)
10
+ activesupport (7.0.4.3)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
14
14
  tzinfo (~> 2.0)
15
15
  ast (2.4.2)
16
- concurrent-ruby (1.1.10)
16
+ concurrent-ruby (1.2.2)
17
17
  csv (3.2.6)
18
+ debug (1.8.0)
19
+ irb (>= 1.5.0)
20
+ reline (>= 0.3.1)
18
21
  ffi (1.15.5)
19
- fileutils (1.7.0)
20
- i18n (1.12.0)
22
+ fileutils (1.7.1)
23
+ i18n (1.13.0)
21
24
  concurrent-ruby (~> 1.0)
25
+ io-console (0.6.0)
26
+ irb (1.6.4)
27
+ reline (>= 0.3.0)
22
28
  json (2.6.3)
23
- language_server-protocol (3.17.0.2)
24
- listen (3.7.1)
29
+ language_server-protocol (3.17.0.3)
30
+ listen (3.8.0)
25
31
  rb-fsevent (~> 0.10, >= 0.10.3)
26
32
  rb-inotify (~> 0.9, >= 0.9.10)
27
- logger (1.5.2)
28
- minitest (5.16.3)
29
- parallel (1.22.1)
30
- parser (3.1.3.0)
33
+ logger (1.5.3)
34
+ minitest (5.18.0)
35
+ parallel (1.23.0)
36
+ parser (3.2.2.1)
31
37
  ast (~> 2.4.1)
38
+ pathname (0.2.1)
32
39
  rainbow (3.1.1)
33
40
  rake (13.0.6)
34
41
  rb-fsevent (0.11.2)
35
42
  rb-inotify (0.10.1)
36
43
  ffi (~> 1.0)
37
- rbs (2.8.1)
38
- rgot (1.1.0)
39
- securerandom (0.2.1)
40
- steep (1.3.0)
44
+ rbs (3.1.0)
45
+ reline (0.3.3)
46
+ io-console (~> 0.5)
47
+ rgot (1.3.0)
48
+ securerandom (0.2.2)
49
+ steep (1.4.0.dev.2)
41
50
  activesupport (>= 5.1)
42
51
  csv (>= 3.0.9)
43
52
  fileutils (>= 1.1.0)
@@ -47,27 +56,31 @@ GEM
47
56
  logger (>= 1.3.0)
48
57
  parallel (>= 1.0.0)
49
58
  parser (>= 3.1)
59
+ pathname (>= 0.2.1)
50
60
  rainbow (>= 2.2.2, < 4.0)
51
61
  rbs (>= 2.8.0)
52
62
  securerandom (>= 0.1)
53
63
  strscan (>= 1.0.0)
54
64
  terminal-table (>= 2, < 4)
55
- strscan (3.0.5)
65
+ strscan (3.0.6)
56
66
  terminal-table (3.0.2)
57
67
  unicode-display_width (>= 1.1.1, < 3)
58
- tzinfo (2.0.5)
68
+ tzinfo (2.0.6)
59
69
  concurrent-ruby (~> 1.0)
60
- unicode-display_width (2.3.0)
70
+ unicode-display_width (2.4.2)
61
71
 
62
72
  PLATFORMS
63
- ruby
73
+ x86_64-darwin-21
74
+ x86_64-linux
64
75
 
65
76
  DEPENDENCIES
77
+ activesupport
78
+ debug
66
79
  orthoses!
67
80
  rake (~> 13.0)
68
81
  rbs
69
82
  rgot (~> 1.1)
70
- steep
83
+ steep (= 1.4.0.dev.2)
71
84
 
72
85
  BUNDLED WITH
73
- 2.3.9
86
+ 2.4.8
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- orthoses (1.4.0)
5
- rbs (~> 2.0)
4
+ orthoses (1.6.0)
5
+ rbs (~> 3.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -13,7 +13,7 @@ GEM
13
13
  minitest (> 5)
14
14
  rack (3.0.2)
15
15
  rake (13.0.6)
16
- rbs (2.8.1)
16
+ rbs (3.0.4)
17
17
 
18
18
  PLATFORMS
19
19
  arm64-darwin-21
@@ -0,0 +1,28 @@
1
+ class Rack::Test::Cookie
2
+ attr_reader name: String
3
+ attr_reader value: String
4
+ attr_reader raw: String
5
+ private def initialize: (String raw, ?URI::Generic uri, ?String default_host) -> void
6
+ | (String raw, ?nil uri, ?String default_host) -> void
7
+ | (String raw, ?URI::HTTPS uri, ?String default_host) -> void
8
+ | (String raw, ?URI::HTTP uri, ?String default_host) -> void
9
+ def domain: () -> String
10
+ def secure?: () -> bool
11
+ def valid?: (URI::Generic uri) -> (bool | URI::RFC3986_Parser)
12
+ | (URI::HTTPS uri) -> bool
13
+ | (nil uri) -> nil
14
+ | (URI::HTTP uri) -> bool
15
+ private def default_uri: () -> Array[String?]
16
+ def http_only?: () -> bool
17
+ def empty?: () -> bool
18
+ def to_h: () -> Hash[String, String | bool]
19
+ def expires: () -> Time?
20
+ def expired?: () -> Integer?
21
+ def matches?: (URI::HTTPS uri) -> (Array[Integer] | bool)
22
+ | (URI::Generic uri) -> (Array[Integer] | bool)
23
+ | (URI::HTTP uri) -> (Array[Integer] | bool)
24
+ def path: () -> String
25
+ def replaces?: (Rack::Test::Cookie other) -> String
26
+ def <=>: (Rack::Test::Cookie other) -> String
27
+ alias to_hash to_h
28
+ end
@@ -0,0 +1,28 @@
1
+ class Rack::Test::CookieJar
2
+ private def initialize: (?Array[untyped] cookies, ?String default_host) -> void
3
+ private def each_cookie_for: (URI::Generic uri) -> (Array[untyped] | String | bool)
4
+ | (URI::HTTP uri) -> (Array[untyped] | String | bool)
5
+ | (nil uri) -> String
6
+ | (URI::HTTPS uri) -> (Array[untyped] | String)
7
+ def for: (URI::Generic uri) -> (Array[Rack::Test::Cookie] | String | Time)
8
+ | (URI::HTTP uri) -> (Array[Rack::Test::Cookie] | String | Time)
9
+ | (nil uri) -> String
10
+ | (URI::HTTPS uri) -> (Array[Rack::Test::Cookie] | String)
11
+ def merge: (nil raw_cookies, ?URI::Generic uri) -> nil
12
+ | (String raw_cookies, ?URI::Generic uri) -> Rack::QueryParser::Params
13
+ | (nil raw_cookies, ?URI::HTTP uri) -> nil
14
+ | (String raw_cookies, ?nil uri) -> Array[nil]
15
+ | (nil raw_cookies, ?URI::HTTPS uri) -> nil
16
+ | (Array[String] raw_cookies, ?URI::Generic uri) -> Rack::QueryParser::Params
17
+ | (String raw_cookies, ?URI::HTTPS uri) -> Rack::QueryParser::Params
18
+ | (String raw_cookies, ?URI::HTTP uri) -> Rack::QueryParser::Params
19
+ | (Array[String] raw_cookies, ?nil uri) -> Array[nil]
20
+ def []: (String name) -> String?
21
+ | (Symbol name) -> String
22
+ private def initialize_copy: (Rack::Test::CookieJar other) -> Array[untyped]
23
+ def <<: (Rack::Test::Cookie new_cookie) -> (Array[Rack::Test::Cookie] | String)
24
+ def []=: (String name, String value) -> String
25
+ def to_hash: () -> (Hash[untyped, untyped] | String)
26
+ def get_cookie: (String name) -> String?
27
+ def delete: (String name) -> String
28
+ end
@@ -0,0 +1,13 @@
1
+ class Rack::Test::FakeApp
2
+ private def handle: (Hash[String, Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
3
+ | (Hash[String, Hash[Symbol, Symbol] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
4
+ | (Hash[String, Hash[Symbol, String] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
5
+ | (Hash[String, Hash[untyped, untyped] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
6
+ | (Hash[String, Hash[String, String] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
7
+ def call: (Hash[String, Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
8
+ | (Hash[String, Hash[Symbol, Symbol] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
9
+ | (Hash[String, Hash[Symbol, String] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
10
+ | (Hash[String, Hash[untyped, untyped] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
11
+ | (Hash[String, Hash[String, String] | Rack::Lint::Wrapper::InputWrapper | Rack::Lint::Wrapper::ErrorWrapper | String | bool] env) -> nil
12
+ private def new_cookie_count: (Rack::Request req) -> Hash[untyped, untyped]
13
+ end
@@ -0,0 +1,8 @@
1
+ class Rack::Test::InputRewinder
2
+ private def initialize: (Rack::Lint app) -> void
3
+ def call: (Hash[String, StringIO | String | bool] env) -> Integer
4
+ | (Hash[String, Hash[Symbol, Symbol] | StringIO | String | bool] env) -> Integer
5
+ | (Hash[String, Hash[Symbol, String] | StringIO | String | bool] env) -> Integer
6
+ | (Hash[String, Hash[untyped, untyped] | StringIO | String | bool] env) -> Integer
7
+ | (Hash[String, Hash[String, String] | StringIO | String | bool] env) -> Integer
8
+ end
@@ -0,0 +1,98 @@
1
+ module Rack::Test::Methods
2
+ attr_accessor _rack_test_current_session: Rack::Test::Session?
3
+
4
+ def build_rack_test_session: (Symbol _name) -> (Rack::Test::InputRewinder | Proc | Rack::Test::Session)
5
+ | (bool _name) -> Rack::Test::InputRewinder
6
+ | (nil _name) -> Rack::Test::InputRewinder
7
+
8
+ def rack_test_session: (?Symbol name) -> (Rack::Test::Session | String)
9
+ | (?bool name) -> Rack::Test::Session
10
+ | (?nil name) -> Rack::Test::Session
11
+
12
+ def current_session: () -> Rack::Test::Session
13
+
14
+ def request: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> (Array[nil] | Rack::Test::Session)
15
+ | (*Array[Hash[String, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> (Array[nil] | Rack::Test::Session)
16
+ | (*Array[Hash[Symbol, Hash[String, String]] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
17
+ | (*Array[Hash[Symbol, Hash[untyped, untyped]] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
18
+ | (*Array[Hash[Symbol, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
19
+ | (*Array[Hash[Symbol, Hash[String, String] | Symbol] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
20
+ | (*Array[Hash[Symbol, Hash[Symbol, Hash[Symbol, String]]] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
21
+ | (*Array[Hash[Symbol, Symbol] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
22
+ | (*Array[Hash[Symbol, Hash[Symbol, Hash[Symbol, String]] | Symbol] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
23
+ | (*Array[Hash[Symbol, Symbol | String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
24
+ | (*Array[Hash[Symbol | String, Hash[String, String] | Symbol | String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
25
+ | (*Array[Hash[Symbol, Hash[String, String] | Symbol | bool] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
26
+ | (*Array[Hash[Symbol, Hash[Symbol, Integer]] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
27
+ | (*Array[Hash[Symbol, bool] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
28
+ | (*Array[Hash[String, Hash[Symbol, Symbol]] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Array[nil]
29
+
30
+ def last_request: (*Array[untyped] args, **untyped) ?{ (*untyped) -> untyped } -> (Rack::Request | Rack::Test::Session)
31
+
32
+ def get: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> (Array[nil] | Rack::Test::Session)
33
+ | (*Array[Hash[String, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> (Array[nil] | Rack::Test::Session)
34
+ | (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
35
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
36
+ | (*Array[Hash[Symbol, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
37
+ | (*Array[Hash[String, Hash[String, String]] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
38
+ | (*Array[(Hash[String, String] | String)?] args, **untyped) ?{ (*untyped) -> untyped } -> Array[nil]
39
+
40
+ def last_response: (*Array[untyped] args, **untyped) ?{ (*untyped) -> untyped } -> (Rack::MockResponse | Rack::Test::Session)
41
+
42
+ def options: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
43
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
44
+ | (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
45
+
46
+ def custom_request: (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
47
+ | (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
48
+
49
+ def delete: (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
50
+ | (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
51
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
52
+ | (*Array[Hash[Symbol, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
53
+
54
+ def patch: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
55
+ | (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
56
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
57
+
58
+ def put: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
59
+ | (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
60
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
61
+
62
+ def post: (*Array[Hash[String, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
63
+ | (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
64
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
65
+ | (*Array[Hash[Symbol, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
66
+ | (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
67
+ | (*Array[Hash[String, Array[Rack::Test::UploadedFile]] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
68
+ | (*Array[Hash[String, Hash[String, Hash[String, String]] | Rack::Test::UploadedFile] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
69
+ | (*Array[Hash[String, Hash[String, String] | Rack::Test::UploadedFile] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
70
+ | (*Array[Hash[String, Rack::Test::UploadedFile | String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
71
+ | (*Array[Hash[String, Rack::Test::UploadedFile] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
72
+ | (*Array[Hash[String, Rack::Test::UploadedFile] | Hash[String, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
73
+ | (*Array[Hash[String, Array[String] | Rack::Test::UploadedFile] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
74
+
75
+ def env: (*Array[Hash[Symbol, String] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
76
+ | (*Array[Hash[Symbol, Symbol] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Hash[Symbol, Symbol]
77
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Hash[Symbol, String]
78
+
79
+ def follow_redirect!: (*Array[untyped] args, **untyped) ?{ (*untyped) -> untyped } -> (Rack::Test::Session | String)
80
+
81
+ def header: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> (Rack::Test::Session | String)
82
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> String
83
+
84
+ def head: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
85
+ | (*Array[String?] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
86
+ | (*Array[Hash[untyped, untyped] | String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
87
+
88
+ def basic_authorize: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
89
+
90
+ def set_cookie: (*Array[String] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
91
+ | (*Array[Array[String]] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::Session
92
+
93
+ def with_session: (Symbol name) -> Rack::Test::Session?
94
+
95
+ def clear_cookies: (*Array[untyped] args, **untyped) ?{ (*untyped) -> untyped } -> Rack::Test::CookieJar
96
+
97
+ alias rack_mock_session rack_test_session
98
+ end
@@ -0,0 +1,186 @@
1
+ class Rack::Test::Session
2
+ attr_accessor cookie_jar: Rack::Test::CookieJar
3
+ def clear_cookies: () -> Rack::Test::CookieJar
4
+ private def initialize: (Rack::Test::InputRewinder app, ?String default_host) -> void
5
+ | (Proc app, ?String default_host) -> void
6
+ def self.new: (Rack::Test::InputRewinder app, ?String default_host) -> Rack::Test::Session
7
+ | (Proc app, ?String default_host) -> Rack::Test::Session
8
+ | (Rack::Test::Session app, ?String default_host) -> Rack::Test::Session
9
+ private def parse_uri: (String path, Hash[untyped, untyped] env) -> Array[String?]
10
+ | (String path, Hash[String, String] env) -> Array[String?]
11
+ | (String path, Hash[Symbol, bool] env) -> Array[String?]
12
+ | (String path, Hash[Symbol, Hash[String, String]] env) -> Array[String?]
13
+ | (String path, Hash[Symbol, Hash[untyped, untyped]] env) -> Array[String?]
14
+ | (String path, Hash[Symbol, String] env) -> Array[String?]
15
+ | (String path, Hash[Symbol, Hash[String, String] | Symbol] env) -> Array[String?]
16
+ | (String path, Hash[Symbol, Hash[Symbol, Hash[Symbol, String]]] env) -> Array[String?]
17
+ | (String path, Hash[Symbol, Symbol] env) -> Array[String?]
18
+ | (String path, Hash[Symbol, Hash[Symbol, Hash[Symbol, String]] | Symbol] env) -> Array[String?]
19
+ | (String path, Hash[Symbol, Symbol | String] env) -> Array[String?]
20
+ | (String path, Hash[Symbol | String, Hash[String, String] | Symbol | String] env) -> Array[String?]
21
+ | (String path, Hash[Symbol, Hash[String, String] | Symbol | bool] env) -> Array[String?]
22
+ | (String path, Hash[Symbol, Hash[Symbol, Integer]] env) -> Array[String?]
23
+ | (String path, Hash[String, Hash[Symbol, Symbol]] env) -> Array[String?]
24
+ | (String path, Hash[String, Hash[untyped, untyped] | String] env) -> Array[String?]
25
+ | (String path, Hash[String, Hash[String, String]] env) -> Array[String?]
26
+ def request: (String uri, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> String?
27
+ | (String uri, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> nil
28
+ | (String uri, ?Hash[Symbol, Hash[String, String]] env) ?{ (*untyped) -> untyped } -> nil
29
+ | (String uri, ?Hash[Symbol, Hash[untyped, untyped]] env) ?{ (*untyped) -> untyped } -> nil
30
+ | (String uri, ?Hash[Symbol, String] env) ?{ (*untyped) -> untyped } -> nil
31
+ | (String uri, ?Hash[Symbol, Hash[String, String] | Symbol] env) ?{ (*untyped) -> untyped } -> nil
32
+ | (String uri, ?Hash[Symbol, Hash[Symbol, Hash[Symbol, String]]] env) ?{ (*untyped) -> untyped } -> nil
33
+ | (String uri, ?Hash[Symbol, Symbol] env) ?{ (*untyped) -> untyped } -> nil
34
+ | (String uri, ?Hash[Symbol, Hash[Symbol, Hash[Symbol, String]] | Symbol] env) ?{ (*untyped) -> untyped } -> nil
35
+ | (String uri, ?Hash[Symbol, Symbol | String] env) ?{ (*untyped) -> untyped } -> nil
36
+ | (String uri, ?Hash[Symbol | String, Hash[String, String] | Symbol | String] env) ?{ (*untyped) -> untyped } -> nil
37
+ | (String uri, ?Hash[Symbol, Hash[String, String] | Symbol | bool] env) ?{ (*untyped) -> untyped } -> nil
38
+ | (String uri, ?Hash[Symbol, Hash[Symbol, Integer]] env) ?{ (*untyped) -> untyped } -> nil
39
+ | (String uri, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> nil
40
+ | (String uri, ?Hash[String, Hash[Symbol, Symbol]] env) ?{ (*untyped) -> untyped } -> nil
41
+ private def env_for: (URI::Generic uri, Hash[untyped, untyped] env) -> (singleton(URI::Generic) | String)
42
+ | (URI::Generic uri, Hash[Symbol, Hash[untyped, untyped] | String] env) -> singleton(URI::Generic)
43
+ | (URI::Generic uri, Hash[Symbol, String?] env) -> singleton(URI::Generic)
44
+ | (URI::Generic uri, Hash[String | Symbol, Hash[untyped, untyped] | String] env) -> singleton(URI::Generic)
45
+ | (URI::HTTP uri, Hash[Symbol, Hash[untyped, untyped] | String] env) -> singleton(URI::HTTP)
46
+ | (URI::Generic uri, Hash[Symbol, Hash[untyped, untyped] | bool | String] env) -> singleton(URI::Generic)
47
+ | (URI::Generic uri, Hash[Symbol, String] env) -> singleton(URI::Generic)
48
+ | (URI::Generic uri, Hash[Symbol, Hash[Symbol, String] | String] env) -> singleton(URI::Generic)
49
+ | (URI::Generic uri, Hash[Symbol, Hash[String, String] | String] env) -> singleton(URI::Generic)
50
+ | (URI::Generic uri, Hash[Symbol, Hash[String, Array[Rack::Test::UploadedFile]] | String] env) -> singleton(URI::Generic)
51
+ | (URI::Generic uri, Hash[String, String] env) -> (singleton(URI::Generic) | String)
52
+ | (URI::Generic uri, Hash[Symbol, Hash[String, String]] env) -> singleton(URI::Generic)
53
+ | (URI::HTTPS uri, Hash[untyped, untyped] env) -> singleton(URI::HTTPS)
54
+ | (URI::Generic uri, Hash[Symbol, Hash[untyped, untyped]] env) -> singleton(URI::Generic)
55
+ | (URI::HTTP uri, Hash[untyped, untyped] env) -> singleton(URI::HTTP)
56
+ | (URI::Generic uri, Hash[Symbol, Hash[String, String] | Symbol] env) -> singleton(URI::Generic)
57
+ | (URI::Generic uri, Hash[Symbol, Hash[Symbol, Hash[Symbol, String]]] env) -> singleton(URI::Generic)
58
+ | (URI::Generic uri, Hash[Symbol, Symbol] env) -> singleton(URI::Generic)
59
+ | (URI::Generic uri, Hash[Symbol, Hash[Symbol, Hash[Symbol, String]] | Symbol] env) -> singleton(URI::Generic)
60
+ | (URI::Generic uri, Hash[Symbol, Symbol | String] env) -> singleton(URI::Generic)
61
+ | (URI::Generic uri, Hash[Symbol | String, Hash[String, String] | Symbol | String] env) -> singleton(URI::Generic)
62
+ | (URI::Generic uri, Hash[Symbol, Hash[String, String] | Symbol | bool] env) -> singleton(URI::Generic)
63
+ | (URI::Generic uri, Hash[Symbol, Hash[Symbol, Integer]] env) -> singleton(URI::Generic)
64
+ | (URI::Generic uri, Hash[Symbol, bool] env) -> singleton(URI::Generic)
65
+ | (URI::Generic uri, Hash[Symbol, Hash[String, Hash[String, Hash[String, String]] | Rack::Test::UploadedFile] | String] env) -> singleton(URI::Generic)
66
+ | (URI::Generic uri, Hash[Symbol, Hash[String, Hash[String, String] | Rack::Test::UploadedFile] | String] env) -> singleton(URI::Generic)
67
+ | (URI::Generic uri, Hash[Symbol, Hash[String, Rack::Test::UploadedFile | String] | String] env) -> singleton(URI::Generic)
68
+ | (URI::Generic uri, Hash[Symbol, Hash[String, Rack::Test::UploadedFile] | String] env) -> singleton(URI::Generic)
69
+ | (URI::Generic uri, Hash[String | Symbol, Hash[String, Rack::Test::UploadedFile] | String] env) -> singleton(URI::Generic)
70
+ | (URI::Generic uri, Hash[Symbol, Hash[String, Array[String] | Rack::Test::UploadedFile] | String] env) -> singleton(URI::Generic)
71
+ | (URI::Generic uri, Hash[String, Hash[Symbol, Symbol]] env) -> singleton(URI::Generic)
72
+ | (URI::HTTP uri, Hash[String | Symbol, Hash[untyped, untyped] | String] env) -> singleton(URI::HTTP)
73
+ | (URI::HTTPS uri, Hash[String | Symbol, Hash[untyped, untyped] | String] env) -> singleton(URI::HTTPS)
74
+ | (URI::Generic uri, Hash[Symbol, Hash[String, Hash[String, String]] | String] env) -> singleton(URI::Generic)
75
+ | (URI::Generic uri, Hash[String | Symbol, Hash[String, String] | String] env) -> singleton(URI::Generic)
76
+ | (URI::Generic uri, Hash[String | Symbol, String?] env) -> singleton(URI::Generic)
77
+ | (URI::HTTPS uri, Hash[Symbol, Hash[String, String] | String] env) -> singleton(URI::HTTPS)
78
+ | (URI::HTTPS uri, Hash[Symbol, Hash[untyped, untyped] | String] env) -> singleton(URI::HTTPS)
79
+ | (URI::HTTP uri, Hash[Symbol, Hash[String, String] | String] env) -> singleton(URI::HTTP)
80
+ private def process_request: (URI::Generic uri, Hash[String, StringIO | String | bool] env) -> Rack::Test::CookieJar
81
+ | (URI::HTTP uri, Hash[String, StringIO | String | bool] env) -> Rack::Test::CookieJar
82
+ | (URI::HTTPS uri, Hash[String, StringIO | String | bool] env) -> Rack::Test::CookieJar
83
+ | (URI::Generic uri, Hash[String, Hash[Symbol, Symbol] | StringIO | String | bool] env) -> Rack::Test::CookieJar
84
+ | (URI::Generic uri, Hash[String, Hash[Symbol, String] | StringIO | String | bool] env) -> Rack::Test::CookieJar
85
+ | (URI::HTTP uri, Hash[String, Hash[untyped, untyped] | StringIO | String | bool] env) -> Rack::Test::CookieJar
86
+ | (URI::HTTPS uri, Hash[String, Hash[untyped, untyped] | StringIO | String | bool] env) -> Rack::Test::CookieJar
87
+ | (URI::Generic uri, Hash[String, Hash[String, String] | StringIO | String | bool] env) -> Rack::Test::CookieJar
88
+ private def close_body: (Rack::Lint::Wrapper body) -> nil
89
+ | (untyped body) -> nil
90
+ | (Array[String] body) -> nil
91
+ | (Array[untyped] body) -> nil
92
+ def last_response: () -> Rack::MockResponse
93
+ def last_request: () -> Rack::Request
94
+ def after_request: () ?{ (*untyped) -> untyped } -> Array[Proc]
95
+ def custom_request: (String verb, String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> String?
96
+ | (String verb, String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
97
+ | (String verb, String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> nil
98
+ | (String verb, String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> nil
99
+ | (String verb, String uri, ?String params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
100
+ | (String verb, String uri, ?Hash[Symbol, String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
101
+ | (String verb, String uri, ?Hash[String, String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> String?
102
+ | (String verb, String uri, ?Hash[String, Array[Rack::Test::UploadedFile]] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
103
+ | (String verb, String uri, ?Hash[String, Hash[String, Hash[String, String]] | Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
104
+ | (String verb, String uri, ?Hash[String, Hash[String, String] | Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
105
+ | (String verb, String uri, ?Hash[String, Rack::Test::UploadedFile | String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
106
+ | (String verb, String uri, ?Hash[String, Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
107
+ | (String verb, String uri, ?Hash[String, Rack::Test::UploadedFile] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> nil
108
+ | (String verb, String uri, ?Hash[String, Array[String] | Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
109
+ | (String verb, String uri, ?Hash[untyped, untyped] params, ?Hash[String, Hash[untyped, untyped] | String] env) ?{ (*untyped) -> untyped } -> String
110
+ | (String verb, String uri, ?Hash[String, String] params, ?Hash[String, Hash[untyped, untyped] | String] env) ?{ (*untyped) -> untyped } -> String
111
+ | (String verb, String uri, ?Hash[untyped, untyped] params, ?Hash[String, Hash[String, String]] env) ?{ (*untyped) -> untyped } -> nil
112
+ | (String verb, String uri, ?Hash[String, Hash[String, String]] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> nil
113
+ | (String verb, String uri, ?Hash[String, String] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> nil
114
+ | (String verb, String uri, ?nil params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> nil
115
+ def get: (String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
116
+ | (String uri, ?Hash[String, String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
117
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[String, Hash[String, String]] env) ?{ (*untyped) -> untyped } -> Array[nil]
118
+ | (String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
119
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
120
+ | (String uri, ?Hash[Symbol, String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
121
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> Array[nil]
122
+ | (String uri, ?Hash[String, Hash[String, String]] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
123
+ | (String uri, ?Hash[String, String] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
124
+ | (String uri, ?nil params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
125
+ private def append_query_params: (Array[nil] query_array, Hash[untyped, untyped] query_params) -> Array[String?]
126
+ | (Array[String] query_array, Hash[untyped, untyped] query_params) -> Array[String]
127
+ | (Array[nil] query_array, Hash[String, String] query_params) -> String
128
+ | (Array[String] query_array, String query_params) -> Hash[untyped, untyped]
129
+ | (Array[String?] query_array, Hash[String, String] query_params) -> String
130
+ | (Array[String] query_array, Hash[Symbol, Hash[Symbol, String]] query_params) -> String
131
+ | (Array[String] query_array, Hash[Symbol, Integer] query_params) -> String
132
+ | (Array[nil] query_array, Hash[Symbol, String] query_params) -> String
133
+ | (Array[nil] query_array, Hash[String, Hash[String, String]] query_params) -> String
134
+ def restore_state: () -> nil
135
+ def options: (String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
136
+ | (String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
137
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
138
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> Array[nil]
139
+ def delete: (String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
140
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
141
+ | (String uri, ?String params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
142
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> Array[nil]
143
+ | (String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
144
+ | (String uri, ?Hash[Symbol, String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
145
+ def patch: (String uri, ?String params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
146
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
147
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
148
+ | (String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
149
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> Array[nil]
150
+ def put: (String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
151
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
152
+ | (String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
153
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> Array[nil]
154
+ | (String uri, ?String params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
155
+ def post: (String uri, ?Hash[String, String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
156
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
157
+ | (String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
158
+ | (String uri, ?Hash[Symbol, String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
159
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> Array[nil]
160
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
161
+ | (String uri, ?String params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
162
+ | (String uri, ?Hash[String, Array[Rack::Test::UploadedFile]] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
163
+ | (String uri, ?Hash[String, Hash[String, Hash[String, String]] | Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
164
+ | (String uri, ?Hash[String, Hash[String, String] | Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
165
+ | (String uri, ?Hash[String, Rack::Test::UploadedFile | String] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
166
+ | (String uri, ?Hash[String, Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
167
+ | (String uri, ?Hash[String, Rack::Test::UploadedFile] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
168
+ | (String uri, ?Hash[String, Array[String] | Rack::Test::UploadedFile] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
169
+ private def multipart_content_type: (Hash[String | Symbol, bool | String] env) -> String
170
+ | (Hash[String | Symbol, bool | String | Symbol] env) -> String
171
+ def env: (String name, Hash[Symbol, String] value) -> Hash[Symbol, String]
172
+ | (String name, Hash[Symbol, Symbol] value) -> Hash[Symbol, Symbol]
173
+ | (String name, nil value) -> (Hash[Symbol, String] | String)
174
+ | (String name, String value) -> String
175
+ def follow_redirect!: () -> bool?
176
+ def header: (String name, String value) -> String
177
+ | (String name, nil value) -> String
178
+ def head: (String uri, ?Hash[untyped, untyped] params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
179
+ | (String uri, ?nil params, ?Hash[untyped, untyped] env) ?{ (*untyped) -> untyped } -> Array[nil]
180
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[String, String] env) ?{ (*untyped) -> untyped } -> Array[nil]
181
+ | (String uri, ?Hash[untyped, untyped] params, ?Hash[Symbol, bool] env) ?{ (*untyped) -> untyped } -> Array[nil]
182
+ def basic_authorize: (String username, String password) -> String
183
+ def set_cookie: (String cookie, ?nil uri) -> Rack::Test::CookieJar
184
+ | (String cookie, ?URI::Generic uri) -> Rack::Test::CookieJar
185
+ | (Array[String] cookie, ?nil uri) -> Rack::Test::CookieJar
186
+ end
@@ -0,0 +1,18 @@
1
+ class Rack::Test::UploadedFile
2
+ attr_reader tempfile: Tempfile?
3
+ attr_reader original_filename: String
4
+ attr_accessor content_type: String
5
+ private def initialize_from_file_path: (String path) -> singleton(File)
6
+ private def initialize: (String content, ?String content_type, ?bool binary, ?original_filename: nil) -> void
7
+ | (StringIO content, ?String content_type, ?bool binary, ?original_filename: String) -> void
8
+ | (String content, ?String content_type, ?bool binary, ?original_filename: String) -> void
9
+ | (StringIO content, ?String content_type, ?bool binary, ?original_filename: nil) -> void
10
+ def self.finalize: (Tempfile file) -> Proc
11
+ private def respond_to_missing?: (Symbol method_name, ?bool include_private) -> Tempfile?
12
+ def method_missing: (Symbol method_name, *Array[untyped] args) ?{ (*untyped) -> untyped } -> Tempfile
13
+ | (Symbol method_name, *Array[Encoding] args) ?{ (*untyped) -> untyped } -> Tempfile
14
+ def append_to: (String buffer) -> Tempfile
15
+ private def initialize_from_stringio: (StringIO stringio) -> StringIO
16
+ def path: () -> Tempfile
17
+ def self.actually_finalize: (Tempfile file) -> nil
18
+ end