checkoff 0.200.0 → 0.203.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +130 -28
- data/.git-hooks/pre_commit/solargraph_typecheck.rb +12 -11
- data/.overcommit.yml +27 -2
- data/.rubocop.yml +20 -2
- data/.rubocop_todo.yml +90 -0
- data/.solargraph.yml +10 -1
- data/DEVELOPMENT.md +1 -1
- data/Gemfile +11 -8
- data/Gemfile.lock +66 -42
- data/LICENSE +1 -1
- data/Makefile +14 -12
- data/bin/brakeman +27 -0
- data/bin/overcommit_branch +117 -0
- data/bin/spoom +27 -0
- data/bin/srb +27 -0
- data/bin/srb-rbi +27 -0
- data/bin/tapioca +27 -0
- data/config/annotations_misc.rb +35 -0
- data/docs/cookiecutter_input.json +1 -0
- data/fix.sh +14 -6
- data/lib/checkoff/custom_fields.rb +3 -2
- data/lib/checkoff/internal/search_url/simple_param_converter.rb +11 -0
- data/lib/checkoff/version.rb +1 -1
- data/requirements_dev.txt +1 -1
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/activesupport.rbi +453 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/mocha.rbi +34 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/annotations/webmock.rbi +9 -0
- data/sorbet/rbi/dsl/.gitattributes +1 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18749 -0
- data/sorbet/rbi/gems/addressable@2.8.6.rbi +1994 -0
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
- data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +6142 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
- data/sorbet/rbi/gems/backport@1.2.0.rbi +523 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +78 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +505 -0
- data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
- data/sorbet/rbi/gems/cache@0.4.1.rbi +211 -0
- data/sorbet/rbi/gems/cache_method@0.2.7.rbi +293 -0
- data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +9 -0
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +383 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11591 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
- data/sorbet/rbi/gems/crack@0.4.5.rbi +145 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +969 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
- data/sorbet/rbi/gems/drb@2.2.0.rbi +1347 -0
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +9 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +152 -0
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +222 -0
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +126 -0
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +136 -0
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +145 -0
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +259 -0
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +142 -0
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +118 -0
- data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +125 -0
- data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +133 -0
- data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +198 -0
- data/sorbet/rbi/gems/faraday@1.10.3.rbi +2729 -0
- data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +29 -0
- data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +1004 -0
- data/sorbet/rbi/gems/gli@2.21.1.rbi +9 -0
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +351 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +2326 -0
- data/sorbet/rbi/gems/imagen@0.1.8.rbi +340 -0
- data/sorbet/rbi/gems/iniparse@1.5.0.rbi +899 -0
- data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +22 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1562 -0
- data/sorbet/rbi/gems/jwt@2.7.1.rbi +1405 -0
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +128 -0
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3272 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
- data/sorbet/rbi/gems/mdl@0.13.0.rbi +445 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +273 -0
- data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +127 -0
- data/sorbet/rbi/gems/mime-types@3.5.1.rbi +1252 -0
- data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +136 -0
- data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1014 -0
- data/sorbet/rbi/gems/minitest@5.21.1.rbi +1539 -0
- data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +314 -0
- data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +581 -0
- data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +629 -0
- data/sorbet/rbi/gems/mocha@2.1.0.rbi +12 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +102 -0
- data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +234 -0
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +94 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
- data/sorbet/rbi/gems/oauth2@1.4.11.rbi +833 -0
- data/sorbet/rbi/gems/ostruct@0.6.1.rbi +354 -0
- data/sorbet/rbi/gems/overcommit@0.64.0.rbi +2400 -0
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +274 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
- data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10070 -0
- data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +936 -0
- data/sorbet/rbi/gems/punchlist@1.3.2.rbi +173 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
- data/sorbet/rbi/gems/rack@3.0.8.rbi +5184 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3022 -0
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
- data/sorbet/rbi/gems/rbs@2.8.4.rbi +5613 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3750 -0
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +390 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4888 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7061 -0
- data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2577 -0
- data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +3262 -0
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
- data/sorbet/rbi/gems/rubocop@1.59.0.rbi +57238 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
- data/sorbet/rbi/gems/rugged@1.6.3.rbi +1577 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
- data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +256 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
- data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +9396 -0
- data/sorbet/rbi/gems/source_finder@3.2.1.rbi +317 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3604 -0
- data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
- data/sorbet/rbi/gems/tilt@2.4.0.rbi +933 -0
- data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +9 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
- data/sorbet/rbi/gems/undercover@0.5.0.rbi +433 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
- data/sorbet/rbi/gems/webmock@3.19.1.rbi +1769 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18247 -0
- data/sorbet/rbi/todo.rbi +11 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +134 -3
@@ -0,0 +1,1004 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `faraday_middleware` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem faraday_middleware`.
|
6
|
+
|
7
|
+
|
8
|
+
# source://faraday_middleware//lib/faraday_middleware/backwards_compatibility.rb#3
|
9
|
+
module Faraday
|
10
|
+
class << self
|
11
|
+
# source://faraday/1.10.3/lib/faraday.rb#81
|
12
|
+
def default_adapter; end
|
13
|
+
|
14
|
+
# source://faraday/1.10.3/lib/faraday.rb#137
|
15
|
+
def default_adapter=(adapter); end
|
16
|
+
|
17
|
+
# source://faraday/1.10.3/lib/faraday.rb#155
|
18
|
+
def default_connection; end
|
19
|
+
|
20
|
+
# source://faraday/1.10.3/lib/faraday.rb#84
|
21
|
+
def default_connection=(_arg0); end
|
22
|
+
|
23
|
+
# source://faraday/1.10.3/lib/faraday.rb#162
|
24
|
+
def default_connection_options; end
|
25
|
+
|
26
|
+
# source://faraday/1.10.3/lib/faraday.rb#169
|
27
|
+
def default_connection_options=(options); end
|
28
|
+
|
29
|
+
# source://faraday/1.10.3/lib/faraday.rb#89
|
30
|
+
def ignore_env_proxy; end
|
31
|
+
|
32
|
+
# source://faraday/1.10.3/lib/faraday.rb#89
|
33
|
+
def ignore_env_proxy=(_arg0); end
|
34
|
+
|
35
|
+
# source://faraday/1.10.3/lib/faraday.rb#72
|
36
|
+
def lib_path; end
|
37
|
+
|
38
|
+
# source://faraday/1.10.3/lib/faraday.rb#72
|
39
|
+
def lib_path=(_arg0); end
|
40
|
+
|
41
|
+
# source://faraday/1.10.3/lib/faraday.rb#118
|
42
|
+
def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end
|
43
|
+
|
44
|
+
# source://faraday/1.10.3/lib/faraday.rb#128
|
45
|
+
def require_lib(*libs); end
|
46
|
+
|
47
|
+
# source://faraday/1.10.3/lib/faraday.rb#128
|
48
|
+
def require_libs(*libs); end
|
49
|
+
|
50
|
+
# source://faraday/1.10.3/lib/faraday.rb#142
|
51
|
+
def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end
|
52
|
+
|
53
|
+
# source://faraday/1.10.3/lib/faraday.rb#68
|
54
|
+
def root_path; end
|
55
|
+
|
56
|
+
# source://faraday/1.10.3/lib/faraday.rb#68
|
57
|
+
def root_path=(_arg0); end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
# source://faraday/1.10.3/lib/faraday.rb#178
|
62
|
+
def method_missing(name, *args, &block); end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Autoload classes for Faraday::Request.
|
67
|
+
#
|
68
|
+
# source://faraday_middleware//lib/faraday_middleware/backwards_compatibility.rb#5
|
69
|
+
class Faraday::Request < ::Struct
|
70
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#112
|
71
|
+
def [](key); end
|
72
|
+
|
73
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#118
|
74
|
+
def []=(key, value); end
|
75
|
+
|
76
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#60
|
77
|
+
def _deprecated_method; end
|
78
|
+
|
79
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#81
|
80
|
+
def headers=(hash); end
|
81
|
+
|
82
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#125
|
83
|
+
def marshal_dump; end
|
84
|
+
|
85
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#139
|
86
|
+
def marshal_load(serialised); end
|
87
|
+
|
88
|
+
# source://faraday/1.10.3/lib/faraday/deprecate.rb#86
|
89
|
+
def method(*args, &block); end
|
90
|
+
|
91
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#70
|
92
|
+
def params=(hash); end
|
93
|
+
|
94
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#149
|
95
|
+
def to_env(connection); end
|
96
|
+
|
97
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#94
|
98
|
+
def url(path, params = T.unsafe(nil)); end
|
99
|
+
|
100
|
+
class << self
|
101
|
+
# source://faraday/1.10.3/lib/faraday/request.rb#54
|
102
|
+
def create(request_method); end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# deprecated alias
|
107
|
+
#
|
108
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#90
|
109
|
+
Faraday::Request::OAuth = FaradayMiddleware::OAuth
|
110
|
+
|
111
|
+
# deprecated alias
|
112
|
+
#
|
113
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#88
|
114
|
+
Faraday::Request::OAuth2 = FaradayMiddleware::OAuth2
|
115
|
+
|
116
|
+
class Faraday::RequestOptions < ::Faraday::Options
|
117
|
+
include ::FaradayMiddleware::OptionsExtension
|
118
|
+
end
|
119
|
+
|
120
|
+
# Autoload classes for Faraday::Request.
|
121
|
+
#
|
122
|
+
# source://faraday_middleware//lib/faraday_middleware/backwards_compatibility.rb#11
|
123
|
+
class Faraday::Response
|
124
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#28
|
125
|
+
def initialize(env = T.unsafe(nil)); end
|
126
|
+
|
127
|
+
# source://forwardable/1.3.2/forwardable.rb#229
|
128
|
+
def [](*args, **_arg1, &block); end
|
129
|
+
|
130
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#96
|
131
|
+
def apply_request(request_env); end
|
132
|
+
|
133
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#49
|
134
|
+
def body; end
|
135
|
+
|
136
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#33
|
137
|
+
def env; end
|
138
|
+
|
139
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#66
|
140
|
+
def finish(env); end
|
141
|
+
|
142
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#53
|
143
|
+
def finished?; end
|
144
|
+
|
145
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#43
|
146
|
+
def headers; end
|
147
|
+
|
148
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#86
|
149
|
+
def marshal_dump; end
|
150
|
+
|
151
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#90
|
152
|
+
def marshal_load(env); end
|
153
|
+
|
154
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#57
|
155
|
+
def on_complete(&block); end
|
156
|
+
|
157
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#39
|
158
|
+
def reason_phrase; end
|
159
|
+
|
160
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#35
|
161
|
+
def status; end
|
162
|
+
|
163
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#74
|
164
|
+
def success?; end
|
165
|
+
|
166
|
+
# source://faraday/1.10.3/lib/faraday/response.rb#78
|
167
|
+
def to_hash; end
|
168
|
+
end
|
169
|
+
|
170
|
+
# deprecated alias
|
171
|
+
#
|
172
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#39
|
173
|
+
Faraday::Response::Mashify = FaradayMiddleware::Mashify
|
174
|
+
|
175
|
+
# deprecated alias
|
176
|
+
#
|
177
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#50
|
178
|
+
Faraday::Response::ParseJson = FaradayMiddleware::ParseJson
|
179
|
+
|
180
|
+
# deprecated alias
|
181
|
+
#
|
182
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_marshal.rb#15
|
183
|
+
Faraday::Response::ParseMarshal = FaradayMiddleware::ParseMarshal
|
184
|
+
|
185
|
+
# deprecated alias
|
186
|
+
#
|
187
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_xml.rb#17
|
188
|
+
Faraday::Response::ParseXml = FaradayMiddleware::ParseXml
|
189
|
+
|
190
|
+
# deprecated alias
|
191
|
+
#
|
192
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_yaml.rb#39
|
193
|
+
Faraday::Response::ParseYaml = FaradayMiddleware::ParseYaml
|
194
|
+
|
195
|
+
# deprecated alias
|
196
|
+
#
|
197
|
+
# source://faraday_middleware//lib/faraday_middleware/response/rashify.rb#17
|
198
|
+
Faraday::Response::Rashify = FaradayMiddleware::Rashify
|
199
|
+
|
200
|
+
# Main FaradayMiddleware module.
|
201
|
+
#
|
202
|
+
# source://faraday_middleware//lib/faraday_middleware.rb#6
|
203
|
+
module FaradayMiddleware; end
|
204
|
+
|
205
|
+
# Public: Caches GET responses and pulls subsequent ones from the cache.
|
206
|
+
#
|
207
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#9
|
208
|
+
class FaradayMiddleware::Caching < ::Faraday::Middleware
|
209
|
+
extend ::Forwardable
|
210
|
+
|
211
|
+
# Public: initialize the middleware.
|
212
|
+
#
|
213
|
+
# cache - An object that responds to read and write (default: nil).
|
214
|
+
# options - An options Hash (default: {}):
|
215
|
+
# :ignore_params - String name or Array names of query
|
216
|
+
# params that should be ignored when forming
|
217
|
+
# the cache key (default: []).
|
218
|
+
# :write_options - Hash of settings that should be passed as the
|
219
|
+
# third options parameter to the cache's #write
|
220
|
+
# method. If not specified, no options parameter
|
221
|
+
# will be passed.
|
222
|
+
# :full_key - Boolean - use full URL as cache key:
|
223
|
+
# (url.host + url.request_uri)
|
224
|
+
# :status_codes - Array of http status code to be cache
|
225
|
+
# (default: CACHEABLE_STATUS_CODE)
|
226
|
+
#
|
227
|
+
# Yields if no cache is given. The block should return a cache object.
|
228
|
+
#
|
229
|
+
# @return [Caching] a new instance of Caching
|
230
|
+
#
|
231
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#42
|
232
|
+
def initialize(app, cache = T.unsafe(nil), options = T.unsafe(nil)); end
|
233
|
+
|
234
|
+
# source://forwardable/1.3.2/forwardable.rb#229
|
235
|
+
def build_query(*args, **_arg1, &block); end
|
236
|
+
|
237
|
+
# Returns the value of attribute cache.
|
238
|
+
#
|
239
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#10
|
240
|
+
def cache; end
|
241
|
+
|
242
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#71
|
243
|
+
def cache_key(env); end
|
244
|
+
|
245
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#98
|
246
|
+
def cache_on_complete(env); end
|
247
|
+
|
248
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#52
|
249
|
+
def call(env); end
|
250
|
+
|
251
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#91
|
252
|
+
def custom_status_codes; end
|
253
|
+
|
254
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#122
|
255
|
+
def finalize_response(response, env); end
|
256
|
+
|
257
|
+
# @return [Boolean]
|
258
|
+
#
|
259
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#87
|
260
|
+
def full_key?; end
|
261
|
+
|
262
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#83
|
263
|
+
def params_to_ignore; end
|
264
|
+
|
265
|
+
# source://forwardable/1.3.2/forwardable.rb#229
|
266
|
+
def parse_query(*args, **_arg1, &block); end
|
267
|
+
|
268
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#112
|
269
|
+
def store_response_in_cache(key, response); end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Internal: List of status codes that can be cached:
|
273
|
+
# * 200 - 'OK'
|
274
|
+
# * 203 - 'Non-Authoritative Information'
|
275
|
+
# * 300 - 'Multiple Choices'
|
276
|
+
# * 301 - 'Moved Permanently'
|
277
|
+
# * 302 - 'Found'
|
278
|
+
# * 404 - 'Not Found'
|
279
|
+
# * 410 - 'Gone'
|
280
|
+
#
|
281
|
+
# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#20
|
282
|
+
FaradayMiddleware::Caching::CACHEABLE_STATUS_CODES = T.let(T.unsafe(nil), Array)
|
283
|
+
|
284
|
+
# Public: Parse a Transfer-Encoding. Chunks response to just the original data
|
285
|
+
#
|
286
|
+
# source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#7
|
287
|
+
class FaradayMiddleware::Chunked < ::FaradayMiddleware::ResponseMiddleware
|
288
|
+
# @return [Boolean]
|
289
|
+
#
|
290
|
+
# source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#28
|
291
|
+
def chunked_encoding?(headers); end
|
292
|
+
|
293
|
+
# @return [Boolean]
|
294
|
+
#
|
295
|
+
# source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#24
|
296
|
+
def parse_response?(env); end
|
297
|
+
end
|
298
|
+
|
299
|
+
# source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#8
|
300
|
+
FaradayMiddleware::Chunked::TRANSFER_ENCODING = T.let(T.unsafe(nil), String)
|
301
|
+
|
302
|
+
# Request middleware that encodes the body as JSON.
|
303
|
+
#
|
304
|
+
# Processes only requests with matching Content-type or those without a type.
|
305
|
+
# If a request doesn't have a type but has a body, it sets the Content-type
|
306
|
+
# to JSON MIME-type.
|
307
|
+
#
|
308
|
+
# Doesn't try to encode bodies that already are in string form.
|
309
|
+
#
|
310
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#13
|
311
|
+
class FaradayMiddleware::EncodeJson < ::Faraday::Middleware
|
312
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#22
|
313
|
+
def call(env); end
|
314
|
+
|
315
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#29
|
316
|
+
def encode(data); end
|
317
|
+
|
318
|
+
# @return [Boolean]
|
319
|
+
#
|
320
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#45
|
321
|
+
def has_body?(env); end
|
322
|
+
|
323
|
+
# @yield []
|
324
|
+
#
|
325
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#33
|
326
|
+
def match_content_type(env); end
|
327
|
+
|
328
|
+
# @return [Boolean]
|
329
|
+
#
|
330
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#40
|
331
|
+
def process_request?(env); end
|
332
|
+
|
333
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#49
|
334
|
+
def request_type(env); end
|
335
|
+
end
|
336
|
+
|
337
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#14
|
338
|
+
FaradayMiddleware::EncodeJson::CONTENT_TYPE = T.let(T.unsafe(nil), String)
|
339
|
+
|
340
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#15
|
341
|
+
FaradayMiddleware::EncodeJson::MIME_TYPE = T.let(T.unsafe(nil), String)
|
342
|
+
|
343
|
+
# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#16
|
344
|
+
FaradayMiddleware::EncodeJson::MIME_TYPE_REGEX = T.let(T.unsafe(nil), Regexp)
|
345
|
+
|
346
|
+
# Public: Follow HTTP 301, 302, 303, 307, and 308 redirects.
|
347
|
+
#
|
348
|
+
# For HTTP 301, 302, and 303, the original GET, POST, PUT, DELETE, or PATCH
|
349
|
+
# request gets converted into a GET. With `:standards_compliant => true`,
|
350
|
+
# however, the HTTP method after 301/302 remains unchanged. This allows you
|
351
|
+
# to opt into HTTP/1.1 compliance and act unlike the major web browsers.
|
352
|
+
#
|
353
|
+
# This middleware currently only works with synchronous requests; i.e. it
|
354
|
+
# doesn't support parallelism.
|
355
|
+
#
|
356
|
+
# If you wish to persist cookies across redirects, you could use
|
357
|
+
# the faraday-cookie_jar gem:
|
358
|
+
#
|
359
|
+
# Faraday.new(:url => url) do |faraday|
|
360
|
+
# faraday.use FaradayMiddleware::FollowRedirects
|
361
|
+
# faraday.use :cookie_jar
|
362
|
+
# faraday.adapter Faraday.default_adapter
|
363
|
+
# end
|
364
|
+
#
|
365
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#26
|
366
|
+
class FaradayMiddleware::FollowRedirects < ::Faraday::Middleware
|
367
|
+
# Public: Initialize the middleware.
|
368
|
+
#
|
369
|
+
# options - An options Hash (default: {}):
|
370
|
+
# :limit - A Numeric redirect limit (default: 3)
|
371
|
+
# :standards_compliant - A Boolean indicating whether to respect
|
372
|
+
# the HTTP spec when following 301/302
|
373
|
+
# (default: false)
|
374
|
+
# :callback - A callable used on redirects
|
375
|
+
# with the old and new envs
|
376
|
+
# :cookies - An Array of Strings (e.g.
|
377
|
+
# ['cookie1', 'cookie2']) to choose
|
378
|
+
# cookies to be kept, or :all to keep
|
379
|
+
# all cookies (default: []).
|
380
|
+
# :clear_authorization_header - A Boolean indicating whether the request
|
381
|
+
# Authorization header should be cleared on
|
382
|
+
# redirects (default: true)
|
383
|
+
#
|
384
|
+
# @return [FollowRedirects] a new instance of FollowRedirects
|
385
|
+
#
|
386
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#58
|
387
|
+
def initialize(app, options = T.unsafe(nil)); end
|
388
|
+
|
389
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#66
|
390
|
+
def call(env); end
|
391
|
+
|
392
|
+
private
|
393
|
+
|
394
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#125
|
395
|
+
def callback; end
|
396
|
+
|
397
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#140
|
398
|
+
def clear_authorization_header(env, from_url, to_url); end
|
399
|
+
|
400
|
+
# @return [Boolean]
|
401
|
+
#
|
402
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#72
|
403
|
+
def convert_to_get?(response); end
|
404
|
+
|
405
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#117
|
406
|
+
def follow_limit; end
|
407
|
+
|
408
|
+
# @return [Boolean]
|
409
|
+
#
|
410
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#112
|
411
|
+
def follow_redirect?(env, response); end
|
412
|
+
|
413
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#77
|
414
|
+
def perform_with_redirection(env, follows); end
|
415
|
+
|
416
|
+
# @return [Boolean]
|
417
|
+
#
|
418
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#147
|
419
|
+
def redirect_to_same_host?(from_url, to_url); end
|
420
|
+
|
421
|
+
# Internal: escapes unsafe characters from an URL which might be a path
|
422
|
+
# component only or a fully qualified URI so that it can be joined onto an
|
423
|
+
# URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not
|
424
|
+
# risk double-escaping.
|
425
|
+
#
|
426
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#133
|
427
|
+
def safe_escape(uri); end
|
428
|
+
|
429
|
+
# @return [Boolean]
|
430
|
+
#
|
431
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#121
|
432
|
+
def standards_compliant?; end
|
433
|
+
|
434
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#93
|
435
|
+
def update_env(env, request_body, response); end
|
436
|
+
end
|
437
|
+
|
438
|
+
# HTTP methods for which 30x redirects can be followed
|
439
|
+
#
|
440
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#27
|
441
|
+
FaradayMiddleware::FollowRedirects::ALLOWED_METHODS = T.let(T.unsafe(nil), Set)
|
442
|
+
|
443
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#40
|
444
|
+
FaradayMiddleware::FollowRedirects::AUTH_HEADER = T.let(T.unsafe(nil), String)
|
445
|
+
|
446
|
+
# Keys in env hash which will get cleared between requests
|
447
|
+
#
|
448
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#31
|
449
|
+
FaradayMiddleware::FollowRedirects::ENV_TO_CLEAR = T.let(T.unsafe(nil), Set)
|
450
|
+
|
451
|
+
# Default value for max redirects followed
|
452
|
+
#
|
453
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#34
|
454
|
+
FaradayMiddleware::FollowRedirects::FOLLOW_LIMIT = T.let(T.unsafe(nil), Integer)
|
455
|
+
|
456
|
+
# HTTP redirect status codes that this middleware implements
|
457
|
+
#
|
458
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#29
|
459
|
+
FaradayMiddleware::FollowRedirects::REDIRECT_CODES = T.let(T.unsafe(nil), Set)
|
460
|
+
|
461
|
+
# Regex that matches characters that need to be escaped in URLs, sans
|
462
|
+
# the "%" character which we assume already represents an escaped sequence.
|
463
|
+
#
|
464
|
+
# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#38
|
465
|
+
FaradayMiddleware::FollowRedirects::URI_UNSAFE = T.let(T.unsafe(nil), Regexp)
|
466
|
+
|
467
|
+
# Middleware to automatically decompress response bodies. If the
|
468
|
+
# "Accept-Encoding" header wasn't set in the request, this sets it to
|
469
|
+
# "gzip,deflate" and appropriately handles the compressed response from the
|
470
|
+
# server. This resembles what Ruby 1.9+ does internally in Net::HTTP#get.
|
471
|
+
#
|
472
|
+
# This middleware is NOT necessary when these adapters are used:
|
473
|
+
# - net_http on Ruby 1.9+
|
474
|
+
# - net_http_persistent on Ruby 2.0+
|
475
|
+
# - em_http
|
476
|
+
#
|
477
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#15
|
478
|
+
class FaradayMiddleware::Gzip < ::Faraday::Middleware
|
479
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#82
|
480
|
+
def brotli_inflate(body); end
|
481
|
+
|
482
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#38
|
483
|
+
def call(env); end
|
484
|
+
|
485
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#68
|
486
|
+
def inflate(body); end
|
487
|
+
|
488
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#86
|
489
|
+
def raw_body(body); end
|
490
|
+
|
491
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#56
|
492
|
+
def reset_body(env); end
|
493
|
+
|
494
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#62
|
495
|
+
def uncompress_gzip(body); end
|
496
|
+
|
497
|
+
class << self
|
498
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#18
|
499
|
+
def optional_dependency(lib = T.unsafe(nil)); end
|
500
|
+
|
501
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#27
|
502
|
+
def supported_encodings; end
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#33
|
507
|
+
FaradayMiddleware::Gzip::ACCEPT_ENCODING = T.let(T.unsafe(nil), String)
|
508
|
+
|
509
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#25
|
510
|
+
FaradayMiddleware::Gzip::BROTLI_SUPPORTED = T.let(T.unsafe(nil), FalseClass)
|
511
|
+
|
512
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#34
|
513
|
+
FaradayMiddleware::Gzip::CONTENT_ENCODING = T.let(T.unsafe(nil), String)
|
514
|
+
|
515
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#35
|
516
|
+
FaradayMiddleware::Gzip::CONTENT_LENGTH = T.let(T.unsafe(nil), String)
|
517
|
+
|
518
|
+
# source://faraday_middleware//lib/faraday_middleware/gzip.rb#36
|
519
|
+
FaradayMiddleware::Gzip::SUPPORTED_ENCODINGS = T.let(T.unsafe(nil), String)
|
520
|
+
|
521
|
+
# Public: Instruments requests using Active Support.
|
522
|
+
#
|
523
|
+
# Measures time spent only for synchronous requests.
|
524
|
+
#
|
525
|
+
# Examples
|
526
|
+
#
|
527
|
+
# ActiveSupport::Notifications.
|
528
|
+
# subscribe('request.faraday') do |name, starts, ends, _, env|
|
529
|
+
# url = env[:url]
|
530
|
+
# http_method = env[:method].to_s.upcase
|
531
|
+
# duration = ends - starts
|
532
|
+
# $stderr.puts '[%s] %s %s (%.3f s)' % [url.host,
|
533
|
+
# http_method,
|
534
|
+
# url.request_uri,
|
535
|
+
# duration]
|
536
|
+
# end
|
537
|
+
#
|
538
|
+
# source://faraday_middleware//lib/faraday_middleware/instrumentation.rb#22
|
539
|
+
class FaradayMiddleware::Instrumentation < ::Faraday::Middleware
|
540
|
+
# @return [Instrumentation] a new instance of Instrumentation
|
541
|
+
#
|
542
|
+
# source://faraday_middleware//lib/faraday_middleware/instrumentation.rb#25
|
543
|
+
def initialize(app, options = T.unsafe(nil)); end
|
544
|
+
|
545
|
+
# source://faraday_middleware//lib/faraday_middleware/instrumentation.rb#30
|
546
|
+
def call(env); end
|
547
|
+
end
|
548
|
+
|
549
|
+
# Public: Converts parsed response bodies to a Hashie::Mash if they were of
|
550
|
+
# Hash or Array type.
|
551
|
+
#
|
552
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#8
|
553
|
+
class FaradayMiddleware::Mashify < ::Faraday::Response::Middleware
|
554
|
+
# @return [Mashify] a new instance of Mashify
|
555
|
+
#
|
556
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#20
|
557
|
+
def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end
|
558
|
+
|
559
|
+
# Returns the value of attribute mash_class.
|
560
|
+
#
|
561
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#9
|
562
|
+
def mash_class; end
|
563
|
+
|
564
|
+
# Sets the attribute mash_class
|
565
|
+
#
|
566
|
+
# @param value the value to set the attribute mash_class to.
|
567
|
+
#
|
568
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#9
|
569
|
+
def mash_class=(_arg0); end
|
570
|
+
|
571
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#25
|
572
|
+
def parse(body); end
|
573
|
+
|
574
|
+
class << self
|
575
|
+
# Returns the value of attribute mash_class.
|
576
|
+
#
|
577
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#12
|
578
|
+
def mash_class; end
|
579
|
+
|
580
|
+
# Sets the attribute mash_class
|
581
|
+
#
|
582
|
+
# @param value the value to set the attribute mash_class to.
|
583
|
+
#
|
584
|
+
# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#12
|
585
|
+
def mash_class=(_arg0); end
|
586
|
+
end
|
587
|
+
end
|
588
|
+
|
589
|
+
# Public: Writes the original HTTP method to "X-Http-Method-Override" header
|
590
|
+
# and sends the request as POST.
|
591
|
+
#
|
592
|
+
# This can be used to work around technical issues with making non-POST
|
593
|
+
# requests, e.g. faulty HTTP client or server router.
|
594
|
+
#
|
595
|
+
# This header is recognized in Rack apps by default, courtesy of the
|
596
|
+
# Rack::MethodOverride module. See
|
597
|
+
# http://rack.rubyforge.org/doc/classes/Rack/MethodOverride.html
|
598
|
+
#
|
599
|
+
# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#15
|
600
|
+
class FaradayMiddleware::MethodOverride < ::Faraday::Middleware
|
601
|
+
# Public: Initialize the middleware.
|
602
|
+
#
|
603
|
+
# app - the Faraday app to wrap
|
604
|
+
# options - (optional)
|
605
|
+
# :rewrite - Array of HTTP methods to rewrite
|
606
|
+
# (default: all but GET and POST)
|
607
|
+
#
|
608
|
+
# @return [MethodOverride] a new instance of MethodOverride
|
609
|
+
#
|
610
|
+
# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#24
|
611
|
+
def initialize(app, options = T.unsafe(nil)); end
|
612
|
+
|
613
|
+
# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#32
|
614
|
+
def call(env); end
|
615
|
+
|
616
|
+
# Internal: Write the original HTTP method to header, change method to POST.
|
617
|
+
#
|
618
|
+
# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#47
|
619
|
+
def rewrite_request(env, original_method); end
|
620
|
+
|
621
|
+
# @return [Boolean]
|
622
|
+
#
|
623
|
+
# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#38
|
624
|
+
def rewrite_request?(method); end
|
625
|
+
end
|
626
|
+
|
627
|
+
# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#16
|
628
|
+
FaradayMiddleware::MethodOverride::HEADER = T.let(T.unsafe(nil), String)
|
629
|
+
|
630
|
+
# Public: Uses the simple_oauth library to sign requests according the
|
631
|
+
# OAuth protocol.
|
632
|
+
#
|
633
|
+
# The options for this middleware are forwarded to SimpleOAuth::Header:
|
634
|
+
# :consumer_key, :consumer_secret, :token, :token_secret. All these
|
635
|
+
# parameters are optional.
|
636
|
+
#
|
637
|
+
# The signature is added to the "Authorization" HTTP request header. If the
|
638
|
+
# value for this header already exists, it is not overriden.
|
639
|
+
#
|
640
|
+
# If no Content-Type header is specified, this middleware assumes that
|
641
|
+
# request body parameters should be included while signing the request.
|
642
|
+
# Otherwise, it only includes them if the Content-Type is
|
643
|
+
# "application/x-www-form-urlencoded", as per OAuth 1.0.
|
644
|
+
#
|
645
|
+
# For better performance while signing requests, this middleware should be
|
646
|
+
# positioned before UrlEncoded middleware on the stack, but after any other
|
647
|
+
# body-encoding middleware (such as EncodeJson).
|
648
|
+
#
|
649
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#25
|
650
|
+
class FaradayMiddleware::OAuth < ::Faraday::Middleware
|
651
|
+
extend ::Forwardable
|
652
|
+
|
653
|
+
# @return [OAuth] a new instance of OAuth
|
654
|
+
#
|
655
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#35
|
656
|
+
def initialize(app, options); end
|
657
|
+
|
658
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#64
|
659
|
+
def body_params(env); end
|
660
|
+
|
661
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#40
|
662
|
+
def call(env); end
|
663
|
+
|
664
|
+
# @return [Boolean]
|
665
|
+
#
|
666
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#74
|
667
|
+
def include_body_params?(env); end
|
668
|
+
|
669
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#45
|
670
|
+
def oauth_header(env); end
|
671
|
+
|
672
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#56
|
673
|
+
def oauth_options(env); end
|
674
|
+
|
675
|
+
# source://forwardable/1.3.2/forwardable.rb#229
|
676
|
+
def parse_nested_query(*args, **_arg1, &block); end
|
677
|
+
|
678
|
+
# @return [Boolean]
|
679
|
+
#
|
680
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#52
|
681
|
+
def sign_request?(env); end
|
682
|
+
|
683
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#79
|
684
|
+
def signature_params(params); end
|
685
|
+
end
|
686
|
+
|
687
|
+
# Public: A simple middleware that adds an access token to each request.
|
688
|
+
#
|
689
|
+
# By default, the token is added as both "access_token" query parameter
|
690
|
+
# and the "Authorization" HTTP request header. It can alternatively be
|
691
|
+
# added exclusively as a bearer token "Authorization" header by specifying
|
692
|
+
# a "token_type" option of "bearer". However, an explicit "access_token"
|
693
|
+
# parameter or "Authorization" header for the current request are not
|
694
|
+
# overriden.
|
695
|
+
#
|
696
|
+
# Examples
|
697
|
+
#
|
698
|
+
# # configure default token:
|
699
|
+
# OAuth2.new(app, 'abc123')
|
700
|
+
#
|
701
|
+
# # configure query parameter name:
|
702
|
+
# OAuth2.new(app, 'abc123', :param_name => 'my_oauth_token')
|
703
|
+
#
|
704
|
+
# # use bearer token authorization header only
|
705
|
+
# OAuth2.new(app, 'abc123', :token_type => 'bearer')
|
706
|
+
#
|
707
|
+
# # default token value is optional:
|
708
|
+
# OAuth2.new(app, :param_name => 'my_oauth_token')
|
709
|
+
#
|
710
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#29
|
711
|
+
class FaradayMiddleware::OAuth2 < ::Faraday::Middleware
|
712
|
+
extend ::Forwardable
|
713
|
+
|
714
|
+
# @raise [ArgumentError]
|
715
|
+
# @return [OAuth2] a new instance of OAuth2
|
716
|
+
#
|
717
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#56
|
718
|
+
def initialize(app, token = T.unsafe(nil), options = T.unsafe(nil)); end
|
719
|
+
|
720
|
+
# source://forwardable/1.3.2/forwardable.rb#229
|
721
|
+
def build_query(*args, **_arg1, &block); end
|
722
|
+
|
723
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#39
|
724
|
+
def call(env); end
|
725
|
+
|
726
|
+
# Returns the value of attribute param_name.
|
727
|
+
#
|
728
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#34
|
729
|
+
def param_name; end
|
730
|
+
|
731
|
+
# source://forwardable/1.3.2/forwardable.rb#229
|
732
|
+
def parse_query(*args, **_arg1, &block); end
|
733
|
+
|
734
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#77
|
735
|
+
def query_params(url); end
|
736
|
+
|
737
|
+
# Returns the value of attribute token_type.
|
738
|
+
#
|
739
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#34
|
740
|
+
def token_type; end
|
741
|
+
end
|
742
|
+
|
743
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#32
|
744
|
+
FaradayMiddleware::OAuth2::AUTH_HEADER = T.let(T.unsafe(nil), String)
|
745
|
+
|
746
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#30
|
747
|
+
FaradayMiddleware::OAuth2::PARAM_NAME = T.let(T.unsafe(nil), String)
|
748
|
+
|
749
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#31
|
750
|
+
FaradayMiddleware::OAuth2::TOKEN_TYPE = T.let(T.unsafe(nil), String)
|
751
|
+
|
752
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#28
|
753
|
+
FaradayMiddleware::OAuth::AUTH_HEADER = T.let(T.unsafe(nil), String)
|
754
|
+
|
755
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#29
|
756
|
+
FaradayMiddleware::OAuth::CONTENT_TYPE = T.let(T.unsafe(nil), String)
|
757
|
+
|
758
|
+
# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#30
|
759
|
+
FaradayMiddleware::OAuth::TYPE_URLENCODED = T.let(T.unsafe(nil), String)
|
760
|
+
|
761
|
+
# DRAGONS
|
762
|
+
#
|
763
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#88
|
764
|
+
module FaradayMiddleware::OptionsExtension
|
765
|
+
# @yield [:preserve_raw, preserve_raw]
|
766
|
+
#
|
767
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#95
|
768
|
+
def each; end
|
769
|
+
|
770
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#102
|
771
|
+
def fetch(key, *args); end
|
772
|
+
|
773
|
+
# Returns the value of attribute preserve_raw.
|
774
|
+
#
|
775
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#89
|
776
|
+
def preserve_raw; end
|
777
|
+
|
778
|
+
# Sets the attribute preserve_raw
|
779
|
+
#
|
780
|
+
# @param value the value to set the attribute preserve_raw to.
|
781
|
+
#
|
782
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#89
|
783
|
+
def preserve_raw=(_arg0); end
|
784
|
+
|
785
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#91
|
786
|
+
def to_hash; end
|
787
|
+
end
|
788
|
+
|
789
|
+
# Parse dates from response body
|
790
|
+
#
|
791
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#8
|
792
|
+
class FaradayMiddleware::ParseDates < ::Faraday::Response::Middleware
|
793
|
+
# @return [ParseDates] a new instance of ParseDates
|
794
|
+
#
|
795
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#12
|
796
|
+
def initialize(app, options = T.unsafe(nil)); end
|
797
|
+
|
798
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#17
|
799
|
+
def call(env); end
|
800
|
+
|
801
|
+
private
|
802
|
+
|
803
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#25
|
804
|
+
def parse_dates!(value); end
|
805
|
+
end
|
806
|
+
|
807
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#9
|
808
|
+
FaradayMiddleware::ParseDates::ISO_DATE_FORMAT = T.let(T.unsafe(nil), Regexp)
|
809
|
+
|
810
|
+
# Public: Parse response bodies as JSON.
|
811
|
+
#
|
812
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#7
|
813
|
+
class FaradayMiddleware::ParseJson < ::FaradayMiddleware::ResponseMiddleware; end
|
814
|
+
|
815
|
+
# Public: Override the content-type of the response with "application/json"
|
816
|
+
# if the response body looks like it might be JSON, i.e. starts with an
|
817
|
+
# open bracket.
|
818
|
+
#
|
819
|
+
# This is to fix responses from certain API providers that insist on serving
|
820
|
+
# JSON with wrong MIME-types such as "text/javascript".
|
821
|
+
#
|
822
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#22
|
823
|
+
class FaradayMiddleware::ParseJson::MimeTypeFix < ::FaradayMiddleware::ResponseMiddleware
|
824
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#39
|
825
|
+
def first_char(body); end
|
826
|
+
|
827
|
+
# @return [Boolean]
|
828
|
+
#
|
829
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#35
|
830
|
+
def parse_response?(env); end
|
831
|
+
|
832
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#25
|
833
|
+
def process_response(env); end
|
834
|
+
end
|
835
|
+
|
836
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#32
|
837
|
+
FaradayMiddleware::ParseJson::MimeTypeFix::BRACKETS = T.let(T.unsafe(nil), Array)
|
838
|
+
|
839
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#23
|
840
|
+
FaradayMiddleware::ParseJson::MimeTypeFix::MIME_TYPE = T.let(T.unsafe(nil), String)
|
841
|
+
|
842
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#33
|
843
|
+
FaradayMiddleware::ParseJson::MimeTypeFix::WHITESPACE = T.let(T.unsafe(nil), Array)
|
844
|
+
|
845
|
+
# Public: Restore marshalled Ruby objects in response bodies.
|
846
|
+
#
|
847
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_marshal.rb#7
|
848
|
+
class FaradayMiddleware::ParseMarshal < ::FaradayMiddleware::ResponseMiddleware; end
|
849
|
+
|
850
|
+
# Public: parses response bodies with MultiXml.
|
851
|
+
#
|
852
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_xml.rb#7
|
853
|
+
class FaradayMiddleware::ParseXml < ::FaradayMiddleware::ResponseMiddleware; end
|
854
|
+
|
855
|
+
# Public: Parse response bodies as YAML.
|
856
|
+
#
|
857
|
+
# Warning: This is not backwards compatible with versions of this middleware
|
858
|
+
# prior to faraday_middleware v0.12 - prior to this version, we used
|
859
|
+
# YAML.load rather than YAMl.safe_load, which exposes serious remote code
|
860
|
+
# execution risks - see https://github.com/ruby/psych/issues/119 for details.
|
861
|
+
# If you're sure you can trust YAML you're passing, you can set up an unsafe
|
862
|
+
# version of this middleware like this:
|
863
|
+
#
|
864
|
+
# class UnsafelyParseYaml < FaradayMiddleware::ResponseMiddleware
|
865
|
+
# dependency do
|
866
|
+
# require 'yaml'
|
867
|
+
# end
|
868
|
+
#
|
869
|
+
# define_parser do |body|
|
870
|
+
# YAML.load body
|
871
|
+
# end
|
872
|
+
# end
|
873
|
+
#
|
874
|
+
# Faraday.new(..) do |config|
|
875
|
+
# config.use UnsafelyParseYaml
|
876
|
+
# ...
|
877
|
+
# end
|
878
|
+
#
|
879
|
+
# source://faraday_middleware//lib/faraday_middleware/response/parse_yaml.rb#29
|
880
|
+
class FaradayMiddleware::ParseYaml < ::FaradayMiddleware::ResponseMiddleware; end
|
881
|
+
|
882
|
+
# Wraps a handler originally written for Rack for Faraday compatibility.
|
883
|
+
#
|
884
|
+
# Experimental. Only handles changes in request headers.
|
885
|
+
#
|
886
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#9
|
887
|
+
class FaradayMiddleware::RackCompatible
|
888
|
+
# @return [RackCompatible] a new instance of RackCompatible
|
889
|
+
#
|
890
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#10
|
891
|
+
def initialize(app, rack_handler, *args); end
|
892
|
+
|
893
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#21
|
894
|
+
def call(env); end
|
895
|
+
|
896
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#80
|
897
|
+
def finalize_response(env, rack_response); end
|
898
|
+
|
899
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#50
|
900
|
+
def headers_to_rack(env); end
|
901
|
+
|
902
|
+
# faraday to rack-compatible
|
903
|
+
#
|
904
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#30
|
905
|
+
def prepare_env(faraday_env); end
|
906
|
+
|
907
|
+
# rack to faraday-compatible
|
908
|
+
#
|
909
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#61
|
910
|
+
def restore_env(rack_env); end
|
911
|
+
end
|
912
|
+
|
913
|
+
# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#27
|
914
|
+
FaradayMiddleware::RackCompatible::NON_PREFIXED_HEADERS = T.let(T.unsafe(nil), Array)
|
915
|
+
|
916
|
+
# Public: Converts parsed response bodies to a Hashie::Rash if they were of
|
917
|
+
# Hash or Array type.
|
918
|
+
#
|
919
|
+
# source://faraday_middleware//lib/faraday_middleware/response/rashify.rb#8
|
920
|
+
class FaradayMiddleware::Rashify < ::FaradayMiddleware::Mashify; end
|
921
|
+
|
922
|
+
# Exception thrown when the maximum amount of requests is
|
923
|
+
# exceeded.
|
924
|
+
#
|
925
|
+
# source://faraday_middleware//lib/faraday_middleware/redirect_limit_reached.rb#8
|
926
|
+
class FaradayMiddleware::RedirectLimitReached < ::Faraday::ClientError
|
927
|
+
# @return [RedirectLimitReached] a new instance of RedirectLimitReached
|
928
|
+
#
|
929
|
+
# source://faraday_middleware//lib/faraday_middleware/redirect_limit_reached.rb#11
|
930
|
+
def initialize(response); end
|
931
|
+
|
932
|
+
# Returns the value of attribute response.
|
933
|
+
#
|
934
|
+
# source://faraday_middleware//lib/faraday_middleware/redirect_limit_reached.rb#9
|
935
|
+
def response; end
|
936
|
+
end
|
937
|
+
|
938
|
+
# Internal: The base class for middleware that parses responses.
|
939
|
+
#
|
940
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#8
|
941
|
+
class FaradayMiddleware::ResponseMiddleware < ::Faraday::Middleware
|
942
|
+
# @return [ResponseMiddleware] a new instance of ResponseMiddleware
|
943
|
+
#
|
944
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#28
|
945
|
+
def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end
|
946
|
+
|
947
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#35
|
948
|
+
def call(environment); end
|
949
|
+
|
950
|
+
# Parse the response body.
|
951
|
+
#
|
952
|
+
# Instead of overriding this method, consider using `define_parser`.
|
953
|
+
#
|
954
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#51
|
955
|
+
def parse(body); end
|
956
|
+
|
957
|
+
# @return [Boolean]
|
958
|
+
#
|
959
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#78
|
960
|
+
def parse_response?(env); end
|
961
|
+
|
962
|
+
# @return [Boolean]
|
963
|
+
#
|
964
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#82
|
965
|
+
def preserve_raw?(env); end
|
966
|
+
|
967
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#41
|
968
|
+
def process_response(env); end
|
969
|
+
|
970
|
+
# @return [Boolean]
|
971
|
+
#
|
972
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#72
|
973
|
+
def process_response_type?(type); end
|
974
|
+
|
975
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#66
|
976
|
+
def response_type(env); end
|
977
|
+
|
978
|
+
class << self
|
979
|
+
# Store a Proc that receives the body and returns the parsed result.
|
980
|
+
#
|
981
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#16
|
982
|
+
def define_parser(parser = T.unsafe(nil), &block); end
|
983
|
+
|
984
|
+
# @private
|
985
|
+
#
|
986
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#22
|
987
|
+
def inherited(subclass); end
|
988
|
+
|
989
|
+
# Returns the value of attribute parser.
|
990
|
+
#
|
991
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#12
|
992
|
+
def parser; end
|
993
|
+
|
994
|
+
# Sets the attribute parser
|
995
|
+
#
|
996
|
+
# @param value the value to set the attribute parser to.
|
997
|
+
#
|
998
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#12
|
999
|
+
def parser=(_arg0); end
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#9
|
1004
|
+
FaradayMiddleware::ResponseMiddleware::CONTENT_TYPE = T.let(T.unsafe(nil), String)
|