es_cli 0.1.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.
- checksums.yaml +7 -0
- data/.bundle/config +2 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +12 -0
- data/exe/es +8 -0
- data/lib/es_cli/cli.rb +247 -0
- data/lib/es_cli/version.rb +5 -0
- data/lib/es_cli.rb +11 -0
- data/readme.org +78 -0
- data/sig/es_cli.rbs +4 -0
- data/vendor/bundle/ruby/3.1.0/bin/rake +29 -0
- data/vendor/bundle/ruby/3.1.0/bin/thor +29 -0
- data/vendor/bundle/ruby/3.1.0/cache/event_stream_parser-1.0.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/faraday-2.12.2.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/faraday-multipart-1.1.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/faraday-net_http-3.4.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/json-2.9.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/logger-1.6.5.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/multipart-post-2.4.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/net-http-0.6.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/power_assert-2.0.5.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/rake-13.2.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/ruby-openai-7.3.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/test-unit-3.6.7.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/thor-1.3.2.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/uri-1.0.2.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/gem.build_complete +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/gem_make.out +22 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/json/ext/generator.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/json/ext/parser.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/mkmf.log +208 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/README.md +99 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/lib/event_stream_parser/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/lib/event_stream_parser.rb +222 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/CHANGELOG.md +574 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/README.md +67 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/Rakefile +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/examples/client_spec.rb +119 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/examples/client_test.rb +144 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter/test.rb +311 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter.rb +101 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter_registry.rb +30 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/connection.rb +564 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/encoders/flat_params_encoder.rb +105 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/encoders/nested_params_encoder.rb +183 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/error.rb +165 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/logging/formatter.rb +118 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/methods.rb +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/middleware.rb +72 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/middleware_registry.rb +83 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/connection_options.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/env.rb +204 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/proxy_options.rb +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/request_options.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/ssl_options.rb +73 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options.rb +219 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/parameters.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/rack_builder.rb +251 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/authorization.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/instrumentation.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/json.rb +70 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/url_encoded.rb +60 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request.rb +139 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/json.rb +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/logger.rb +37 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/raise_error.rb +83 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response.rb +91 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils/headers.rb +150 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils/params_hash.rb +61 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils.rb +121 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday.rb +157 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/external_adapters/faraday_specs_setup.rb +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter/test_spec.rb +442 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter_registry_spec.rb +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter_spec.rb +55 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/connection_spec.rb +808 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/error_spec.rb +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/middleware_registry_spec.rb +31 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/middleware_spec.rb +213 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/env_spec.rb +76 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/options_spec.rb +297 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/proxy_options_spec.rb +52 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/request_options_spec.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/params_encoders/flat_spec.rb +42 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/params_encoders/nested_spec.rb +151 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/rack_builder_spec.rb +317 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/authorization_spec.rb +118 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/instrumentation_spec.rb +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/json_spec.rb +199 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/url_encoded_spec.rb +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request_spec.rb +110 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/json_spec.rb +206 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/logger_spec.rb +278 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/raise_error_spec.rb +275 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response_spec.rb +77 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/utils/headers_spec.rb +109 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/utils_spec.rb +119 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday_spec.rb +43 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/spec_helper.rb +133 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/disabling_stub.rb +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/fake_safe_buffer.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/faraday_middleware_subclasses.rb +18 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/helper_methods.rb +96 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/adapter.rb +105 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/params_encoder.rb +18 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/request_method.rb +263 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/streaming_response_checker.rb +35 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/CHANGELOG.md +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/README.md +170 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/file_part.rb +130 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/middleware.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/param_part.rb +55 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/version.rb +16 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart.rb +26 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/README.md +57 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/adapter/net_http.rb +206 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http/version.rb +7 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/CHANGES.md +572 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/LEGAL +60 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/README.md +195 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/fbuffer/fbuffer.h +214 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/.sitearchdir.-.json.-.ext.time +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/Makefile +269 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/extconf.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.c +1691 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.o +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/.sitearchdir.-.json.-.ext.time +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/Makefile +269 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/extconf.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.c +3238 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.o +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.rl +1465 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/json.gemspec +64 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/bigdecimal.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/complex.rb +51 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/core.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/date.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/date_time.rb +67 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/exception.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/ostruct.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/range.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/rational.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/regexp.rb +48 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/set.rb +48 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/struct.rb +52 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/symbol.rb +47 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/time.rb +52 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/common.rb +896 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/generator/state.rb +116 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/generator.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/parser.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/generic_object.rb +75 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/truffle_ruby/generator.rb +629 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json.rb +587 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/dependabot.yml +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/workflows/push_gem.yml +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/workflows/test.yml +32 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.gitignore +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/Gemfile +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/README.md +104 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/Rakefile +30 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/bin/console +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/bin/setup +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/errors.rb +9 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/formatter.rb +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/log_device.rb +241 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/period.rb +47 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/severity.rb +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger.rb +761 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/logger.gemspec +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/changelog.md +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/composite_io.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/composite_read_io.rb +91 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/multipartable.rb +70 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/parts.rb +148 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/upload_io.rb +64 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/version.rb +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post.rb +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart_post.rb +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipartable.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/net/http/post/multipart.rb +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/parts.rb +25 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/license.md +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/readme.md +170 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/Gemfile +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/README.md +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/Rakefile +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/bin/console +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/bin/setup +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/doc/net-http/examples.rdoc +31 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/doc/net-http/included_getters.rdoc +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/exceptions.rb +34 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/generic_request.rb +414 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/header.rb +981 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/proxy_delta.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/request.rb +88 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/requests.rb +430 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/response.rb +738 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/responses.rb +1174 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/status.rb +84 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http.rb +2580 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/https.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/net-http.gemspec +39 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.github/dependabot.yml +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.github/workflows/ci.yml +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.gitignore +9 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/COPYING +57 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/Gemfile +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/LEGAL +4 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/README.md +98 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/Rakefile +59 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/colorize.rb +7 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/configuration.rb +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/context.rb +233 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/enable_tracepoint_events.rb +62 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/inspector.rb +66 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/parser.rb +251 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/version.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert.rb +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/power_assert.gemspec +24 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/History.rdoc +2403 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/README.rdoc +155 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/exe/rake +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/application.rb +861 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/backtrace.rb +25 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/dsl_definition.rb +196 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_task.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_utils.rb +132 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_utils_ext.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/packagetask.rb +222 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task.rb +434 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_manager.rb +331 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/testtask.rb +189 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake.rb +70 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/rake.gemspec +101 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.circleci/config.yml +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/Dockerfile +16 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/devcontainer.json +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/docker-compose.yml +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/FUNDING.yml +13 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/dependabot.yml +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.gitignore +69 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.rspec +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.rubocop.yml +31 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CHANGELOG.md +467 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CODE_OF_CONDUCT.md +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CONTRIBUTING.md +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Gemfile +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Gemfile.lock +92 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/LICENSE.txt +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/README.md +1381 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Rakefile +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/bin/console +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/bin/setup +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/assistants.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/audio.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/batches.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/client.rb +122 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/compatibility.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/files.rb +75 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/finetunes.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/http.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/http_headers.rb +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/images.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/messages.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/models.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/run_steps.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/runs.rb +37 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/threads.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_store_file_batches.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_store_files.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_stores.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/version.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai.rb +92 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/ruby/openai.rb +2 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/pull_request_template.md +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/ruby-openai.gemspec +32 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/BSDL +24 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/COPYING +64 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/PSFL +271 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/README.md +108 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/Rakefile +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/getting-started.md +246 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/how-to.md +90 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/news.md +1853 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertion-failed-error.rb +60 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb +2541 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/attribute-matcher.rb +26 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/attribute.rb +228 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/auto-runner-loader.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/autorunner.rb +629 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/code-snippet-fetcher.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/descendant.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/dir.rb +110 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/load.rb +201 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/objectspace.rb +35 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/xml.rb +249 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector.rb +104 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/color-scheme.rb +225 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/color.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/data-sets.rb +127 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/data.rb +371 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/diff.rb +745 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/error.rb +158 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/exception-handler.rb +82 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/failure.rb +169 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fault-location-detector.rb +104 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb +304 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/notification.rb +138 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/omission.rb +198 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/pending.rb +155 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/priority.rb +194 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/console.rb +86 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/emacs.rb +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/xml.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/sub-test-result.rb +59 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-creator.rb +103 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb +128 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-thread-runner.rb +69 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb +963 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testresult.rb +132 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testsuite.rb +108 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/outputlevel.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/testrunner.rb +891 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/emacs/testrunner.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunner.rb +53 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnermediator.rb +119 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/xml/testrunner.rb +224 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/backtracefilter.rb +59 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/memory-usage.rb +47 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/method-owner-finder.rb +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/observable.rb +86 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/output.rb +32 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/procwrapper.rb +48 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/warning.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit.rb +521 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test-unit.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/adder.rb +13 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/subtracter.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_adder.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_subtracter.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_user.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/.document +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/CONTRIBUTING.md +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/README.md +45 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/bin/thor +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/create_file.rb +105 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/create_link.rb +61 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/directory.rb +108 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/empty_directory.rb +143 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/file_manipulation.rb +371 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/inject_into_file.rb +130 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions.rb +340 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/base.rb +825 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/command.rb +151 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/core_ext/hash_with_indifferent_access.rb +107 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/error.rb +106 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/group.rb +292 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/invocation.rb +178 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor/basic.rb +37 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor/readline.rb +88 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/nested_context.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/argument.rb +86 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/arguments.rb +195 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/option.rb +178 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/options.rb +294 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser.rb +4 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/rake_compat.rb +72 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/runner.rb +335 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/basic.rb +388 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/color.rb +115 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/column_printer.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/html.rb +84 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/lcs_diff.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/table_printer.rb +118 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/terminal.rb +42 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/wrapped_printer.rb +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell.rb +81 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/util.rb +285 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/version.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor.rb +674 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/thor.gemspec +33 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/README.md +55 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/common.rb +876 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/file.rb +100 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ftp.rb +267 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/generic.rb +1578 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/http.rb +125 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/https.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ldap.rb +261 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ldaps.rb +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/mailto.rb +293 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/rfc2396_parser.rb +546 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/rfc3986_parser.rb +206 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/version.rb +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ws.rb +83 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/wss.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri.rb +104 -0
- data/vendor/bundle/ruby/3.1.0/specifications/event_stream_parser-1.0.0.gemspec +23 -0
- data/vendor/bundle/ruby/3.1.0/specifications/faraday-2.12.2.gemspec +0 -0
- data/vendor/bundle/ruby/3.1.0/specifications/faraday-multipart-1.1.0.gemspec +32 -0
- data/vendor/bundle/ruby/3.1.0/specifications/faraday-net_http-3.4.0.gemspec +32 -0
- data/vendor/bundle/ruby/3.1.0/specifications/json-2.9.1.gemspec +0 -0
- data/vendor/bundle/ruby/3.1.0/specifications/logger-1.6.5.gemspec +22 -0
- data/vendor/bundle/ruby/3.1.0/specifications/multipart-post-2.4.1.gemspec +21 -0
- data/vendor/bundle/ruby/3.1.0/specifications/net-http-0.6.0.gemspec +33 -0
- data/vendor/bundle/ruby/3.1.0/specifications/power_assert-2.0.5.gemspec +24 -0
- data/vendor/bundle/ruby/3.1.0/specifications/rake-13.2.1.gemspec +26 -0
- data/vendor/bundle/ruby/3.1.0/specifications/ruby-openai-7.3.1.gemspec +36 -0
- data/vendor/bundle/ruby/3.1.0/specifications/test-unit-3.6.7.gemspec +31 -0
- data/vendor/bundle/ruby/3.1.0/specifications/thor-1.3.2.gemspec +34 -0
- data/vendor/bundle/ruby/3.1.0/specifications/uri-1.0.2.gemspec +23 -0
- metadata +560 -0
@@ -0,0 +1,808 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CustomEncoder
|
4
|
+
def encode(params)
|
5
|
+
params.map { |k, v| "#{k.upcase}-#{v.to_s.upcase}" }.join(',')
|
6
|
+
end
|
7
|
+
|
8
|
+
def decode(params)
|
9
|
+
params.split(',').to_h { |pair| pair.split('-') }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
shared_examples 'initializer with url' do
|
14
|
+
context 'with simple url' do
|
15
|
+
let(:address) { 'http://httpbingo.org' }
|
16
|
+
|
17
|
+
it { expect(subject.host).to eq('httpbingo.org') }
|
18
|
+
it { expect(subject.port).to eq(80) }
|
19
|
+
it { expect(subject.scheme).to eq('http') }
|
20
|
+
it { expect(subject.path_prefix).to eq('/') }
|
21
|
+
it { expect(subject.params).to eq({}) }
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'with complex url' do
|
25
|
+
let(:address) { 'http://httpbingo.org:815/fish?a=1' }
|
26
|
+
|
27
|
+
it { expect(subject.port).to eq(815) }
|
28
|
+
it { expect(subject.path_prefix).to eq('/fish') }
|
29
|
+
it { expect(subject.params).to eq('a' => '1') }
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'with IPv6 address' do
|
33
|
+
let(:address) { 'http://[::1]:85/' }
|
34
|
+
|
35
|
+
it { expect(subject.host).to eq('[::1]') }
|
36
|
+
it { expect(subject.port).to eq(85) }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
shared_examples 'default connection options' do
|
41
|
+
after { Faraday.default_connection_options = nil }
|
42
|
+
|
43
|
+
it 'works with implicit url' do
|
44
|
+
conn = Faraday.new 'http://httpbingo.org/foo'
|
45
|
+
expect(conn.options.timeout).to eq(10)
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'works with option url' do
|
49
|
+
conn = Faraday.new url: 'http://httpbingo.org/foo'
|
50
|
+
expect(conn.options.timeout).to eq(10)
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'works with instance connection options' do
|
54
|
+
conn = Faraday.new 'http://httpbingo.org/foo', request: { open_timeout: 1 }
|
55
|
+
expect(conn.options.timeout).to eq(10)
|
56
|
+
expect(conn.options.open_timeout).to eq(1)
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'default connection options persist with an instance overriding' do
|
60
|
+
conn = Faraday.new 'http://nigiri.com/bar'
|
61
|
+
conn.options.timeout = 1
|
62
|
+
expect(Faraday.default_connection_options.request.timeout).to eq(10)
|
63
|
+
|
64
|
+
other = Faraday.new url: 'https://httpbingo.org/foo'
|
65
|
+
other.options.timeout = 1
|
66
|
+
|
67
|
+
expect(Faraday.default_connection_options.request.timeout).to eq(10)
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'default connection uses default connection options' do
|
71
|
+
expect(Faraday.default_connection.options.timeout).to eq(10)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
RSpec.describe Faraday::Connection do
|
76
|
+
let(:conn) { Faraday::Connection.new(url, options) }
|
77
|
+
let(:url) { nil }
|
78
|
+
let(:options) { nil }
|
79
|
+
|
80
|
+
describe '.new' do
|
81
|
+
subject { conn }
|
82
|
+
|
83
|
+
context 'with implicit url param' do
|
84
|
+
# Faraday::Connection.new('http://httpbingo.org')
|
85
|
+
let(:url) { address }
|
86
|
+
|
87
|
+
it_behaves_like 'initializer with url'
|
88
|
+
end
|
89
|
+
|
90
|
+
context 'with explicit url param' do
|
91
|
+
# Faraday::Connection.new(url: 'http://httpbingo.org')
|
92
|
+
let(:url) { { url: address } }
|
93
|
+
|
94
|
+
it_behaves_like 'initializer with url'
|
95
|
+
end
|
96
|
+
|
97
|
+
context 'with custom builder' do
|
98
|
+
let(:custom_builder) { Faraday::RackBuilder.new }
|
99
|
+
let(:options) { { builder: custom_builder } }
|
100
|
+
|
101
|
+
it { expect(subject.builder).to eq(custom_builder) }
|
102
|
+
end
|
103
|
+
|
104
|
+
context 'with custom params' do
|
105
|
+
let(:options) { { params: { a: 1 } } }
|
106
|
+
|
107
|
+
it { expect(subject.params).to eq('a' => 1) }
|
108
|
+
end
|
109
|
+
|
110
|
+
context 'with custom params and params in url' do
|
111
|
+
let(:url) { 'http://httpbingo.org/fish?a=1&b=2' }
|
112
|
+
let(:options) { { params: { a: 3 } } }
|
113
|
+
it { expect(subject.params).to eq('a' => 3, 'b' => '2') }
|
114
|
+
end
|
115
|
+
|
116
|
+
context 'with basic_auth in url' do
|
117
|
+
let(:url) { 'http://Aladdin:open%20sesame@httpbingo.org/fish' }
|
118
|
+
|
119
|
+
it { expect(subject.headers['Authorization']).to eq('Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==') }
|
120
|
+
end
|
121
|
+
|
122
|
+
context 'with custom headers' do
|
123
|
+
let(:options) { { headers: { user_agent: 'Faraday' } } }
|
124
|
+
|
125
|
+
it { expect(subject.headers['User-agent']).to eq('Faraday') }
|
126
|
+
end
|
127
|
+
|
128
|
+
context 'with ssl false' do
|
129
|
+
let(:options) { { ssl: { verify: false } } }
|
130
|
+
|
131
|
+
it { expect(subject.ssl.verify?).to be_falsey }
|
132
|
+
end
|
133
|
+
|
134
|
+
context 'with verify_hostname false' do
|
135
|
+
let(:options) { { ssl: { verify_hostname: false } } }
|
136
|
+
|
137
|
+
it { expect(subject.ssl.verify_hostname?).to be_falsey }
|
138
|
+
end
|
139
|
+
|
140
|
+
context 'with empty block' do
|
141
|
+
let(:conn) { Faraday::Connection.new {} }
|
142
|
+
|
143
|
+
it { expect(conn.builder.handlers.size).to eq(0) }
|
144
|
+
end
|
145
|
+
|
146
|
+
context 'with block' do
|
147
|
+
let(:conn) do
|
148
|
+
Faraday::Connection.new(params: { 'a' => '1' }) do |faraday|
|
149
|
+
faraday.adapter :test
|
150
|
+
faraday.url_prefix = 'http://httpbingo.org/omnom'
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
it { expect(conn.builder.handlers.size).to eq(0) }
|
155
|
+
it { expect(conn.path_prefix).to eq('/omnom') }
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
describe '#close' do
|
160
|
+
before { Faraday.default_adapter = :test }
|
161
|
+
after { Faraday.default_adapter = nil }
|
162
|
+
|
163
|
+
it 'can close underlying app' do
|
164
|
+
expect(conn.app).to receive(:close)
|
165
|
+
conn.close
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
describe '#build_exclusive_url' do
|
170
|
+
context 'with relative path' do
|
171
|
+
subject { conn.build_exclusive_url('sake.html') }
|
172
|
+
|
173
|
+
it 'uses connection host as default host' do
|
174
|
+
conn.host = 'httpbingo.org'
|
175
|
+
expect(subject.host).to eq('httpbingo.org')
|
176
|
+
expect(subject.scheme).to eq('http')
|
177
|
+
end
|
178
|
+
|
179
|
+
it do
|
180
|
+
conn.path_prefix = '/fish'
|
181
|
+
expect(subject.path).to eq('/fish/sake.html')
|
182
|
+
end
|
183
|
+
|
184
|
+
it do
|
185
|
+
conn.path_prefix = '/'
|
186
|
+
expect(subject.path).to eq('/sake.html')
|
187
|
+
end
|
188
|
+
|
189
|
+
it do
|
190
|
+
conn.path_prefix = 'fish'
|
191
|
+
expect(subject.path).to eq('/fish/sake.html')
|
192
|
+
end
|
193
|
+
|
194
|
+
it do
|
195
|
+
conn.path_prefix = '/fish/'
|
196
|
+
expect(subject.path).to eq('/fish/sake.html')
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
context 'with absolute path' do
|
201
|
+
subject { conn.build_exclusive_url('/sake.html') }
|
202
|
+
|
203
|
+
after { expect(subject.path).to eq('/sake.html') }
|
204
|
+
|
205
|
+
it { conn.path_prefix = '/fish' }
|
206
|
+
it { conn.path_prefix = '/' }
|
207
|
+
it { conn.path_prefix = 'fish' }
|
208
|
+
it { conn.path_prefix = '/fish/' }
|
209
|
+
end
|
210
|
+
|
211
|
+
context 'with complete url' do
|
212
|
+
subject { conn.build_exclusive_url('http://httpbingo.org/sake.html?a=1') }
|
213
|
+
|
214
|
+
it { expect(subject.scheme).to eq('http') }
|
215
|
+
it { expect(subject.host).to eq('httpbingo.org') }
|
216
|
+
it { expect(subject.port).to eq(80) }
|
217
|
+
it { expect(subject.path).to eq('/sake.html') }
|
218
|
+
it { expect(subject.query).to eq('a=1') }
|
219
|
+
end
|
220
|
+
|
221
|
+
it 'overrides connection port for absolute url' do
|
222
|
+
conn.port = 23
|
223
|
+
uri = conn.build_exclusive_url('http://httpbingo.org')
|
224
|
+
expect(uri.port).to eq(80)
|
225
|
+
end
|
226
|
+
|
227
|
+
it 'does not add ending slash given nil url' do
|
228
|
+
conn.url_prefix = 'http://httpbingo.org/nigiri'
|
229
|
+
uri = conn.build_exclusive_url
|
230
|
+
expect(uri.path).to eq('/nigiri')
|
231
|
+
end
|
232
|
+
|
233
|
+
it 'does not add ending slash given empty url' do
|
234
|
+
conn.url_prefix = 'http://httpbingo.org/nigiri'
|
235
|
+
uri = conn.build_exclusive_url('')
|
236
|
+
expect(uri.path).to eq('/nigiri')
|
237
|
+
end
|
238
|
+
|
239
|
+
it 'does not use connection params' do
|
240
|
+
conn.url_prefix = 'http://httpbingo.org/nigiri'
|
241
|
+
conn.params = { a: 1 }
|
242
|
+
expect(conn.build_exclusive_url.to_s).to eq('http://httpbingo.org/nigiri')
|
243
|
+
end
|
244
|
+
|
245
|
+
it 'allows to provide params argument' do
|
246
|
+
conn.url_prefix = 'http://httpbingo.org/nigiri'
|
247
|
+
conn.params = { a: 1 }
|
248
|
+
params = Faraday::Utils::ParamsHash.new
|
249
|
+
params[:a] = 2
|
250
|
+
uri = conn.build_exclusive_url(nil, params)
|
251
|
+
expect(uri.to_s).to eq('http://httpbingo.org/nigiri?a=2')
|
252
|
+
end
|
253
|
+
|
254
|
+
it 'handles uri instances' do
|
255
|
+
uri = conn.build_exclusive_url(URI('/sake.html'))
|
256
|
+
expect(uri.path).to eq('/sake.html')
|
257
|
+
end
|
258
|
+
|
259
|
+
it 'always returns new URI instance' do
|
260
|
+
conn.url_prefix = 'http://httpbingo.org'
|
261
|
+
uri1 = conn.build_exclusive_url(nil)
|
262
|
+
uri2 = conn.build_exclusive_url(nil)
|
263
|
+
expect(uri1).not_to equal(uri2)
|
264
|
+
end
|
265
|
+
|
266
|
+
context 'with url_prefixed connection' do
|
267
|
+
let(:url) { 'http://httpbingo.org/get/' }
|
268
|
+
|
269
|
+
it 'parses url and changes scheme' do
|
270
|
+
conn.scheme = 'https'
|
271
|
+
uri = conn.build_exclusive_url('sake.html')
|
272
|
+
expect(uri.to_s).to eq('https://httpbingo.org/get/sake.html')
|
273
|
+
end
|
274
|
+
|
275
|
+
it 'joins url to base with ending slash' do
|
276
|
+
uri = conn.build_exclusive_url('sake.html')
|
277
|
+
expect(uri.to_s).to eq('http://httpbingo.org/get/sake.html')
|
278
|
+
end
|
279
|
+
|
280
|
+
it 'used default base with ending slash' do
|
281
|
+
uri = conn.build_exclusive_url
|
282
|
+
expect(uri.to_s).to eq('http://httpbingo.org/get/')
|
283
|
+
end
|
284
|
+
|
285
|
+
it 'overrides base' do
|
286
|
+
uri = conn.build_exclusive_url('/sake/')
|
287
|
+
expect(uri.to_s).to eq('http://httpbingo.org/sake/')
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
context 'with colon in path' do
|
292
|
+
let(:url) { 'http://service.com' }
|
293
|
+
|
294
|
+
it 'joins url to base when used absolute path' do
|
295
|
+
conn = Faraday.new(url: url)
|
296
|
+
uri = conn.build_exclusive_url('/service:search?limit=400')
|
297
|
+
expect(uri.to_s).to eq('http://service.com/service:search?limit=400')
|
298
|
+
end
|
299
|
+
|
300
|
+
it 'joins url to base when used relative path' do
|
301
|
+
conn = Faraday.new(url: url)
|
302
|
+
uri = conn.build_exclusive_url('service:search?limit=400')
|
303
|
+
expect(uri.to_s).to eq('http://service.com/service:search?limit=400')
|
304
|
+
end
|
305
|
+
|
306
|
+
it 'joins url to base when used with path prefix' do
|
307
|
+
conn = Faraday.new(url: url)
|
308
|
+
conn.path_prefix = '/api'
|
309
|
+
uri = conn.build_exclusive_url('service:search?limit=400')
|
310
|
+
expect(uri.to_s).to eq('http://service.com/api/service:search?limit=400')
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
context 'with a custom `default_uri_parser`' do
|
315
|
+
let(:url) { 'http://httpbingo.org' }
|
316
|
+
let(:parser) { Addressable::URI }
|
317
|
+
|
318
|
+
around do |example|
|
319
|
+
with_default_uri_parser(parser) do
|
320
|
+
example.run
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
it 'does not raise error' do
|
325
|
+
expect { conn.build_exclusive_url('/nigiri') }.not_to raise_error
|
326
|
+
end
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
describe '#build_url' do
|
331
|
+
let(:url) { 'http://httpbingo.org/nigiri' }
|
332
|
+
|
333
|
+
it 'uses params' do
|
334
|
+
conn.params = { a: 1, b: 1 }
|
335
|
+
expect(conn.build_url.to_s).to eq('http://httpbingo.org/nigiri?a=1&b=1')
|
336
|
+
end
|
337
|
+
|
338
|
+
it 'merges params' do
|
339
|
+
conn.params = { a: 1, b: 1 }
|
340
|
+
url = conn.build_url(nil, b: 2, c: 3)
|
341
|
+
expect(url.to_s).to eq('http://httpbingo.org/nigiri?a=1&b=2&c=3')
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
describe '#build_request' do
|
346
|
+
let(:url) { 'https://ahttpbingo.org/sake.html' }
|
347
|
+
let(:request) { conn.build_request(:get) }
|
348
|
+
|
349
|
+
before do
|
350
|
+
conn.headers = { 'Authorization' => 'token abc123' }
|
351
|
+
request.headers.delete('Authorization')
|
352
|
+
end
|
353
|
+
|
354
|
+
it { expect(conn.headers.keys).to eq(['Authorization']) }
|
355
|
+
it { expect(conn.headers.include?('Authorization')).to be_truthy }
|
356
|
+
it { expect(request.headers.keys).to be_empty }
|
357
|
+
it { expect(request.headers.include?('Authorization')).to be_falsey }
|
358
|
+
end
|
359
|
+
|
360
|
+
describe '#to_env' do
|
361
|
+
subject { conn.build_request(:get).to_env(conn).url }
|
362
|
+
|
363
|
+
let(:url) { 'http://httpbingo.org/sake.html' }
|
364
|
+
let(:options) { { params: @params } }
|
365
|
+
|
366
|
+
it 'parses url params into query' do
|
367
|
+
@params = { 'a[b]' => '1 + 2' }
|
368
|
+
expect(subject.query).to eq('a%5Bb%5D=1+%2B+2')
|
369
|
+
end
|
370
|
+
|
371
|
+
it 'escapes per spec' do
|
372
|
+
@params = { 'a' => '1+2 foo~bar.-baz' }
|
373
|
+
expect(subject.query).to eq('a=1%2B2+foo~bar.-baz')
|
374
|
+
end
|
375
|
+
|
376
|
+
it 'bracketizes nested params in query' do
|
377
|
+
@params = { 'a' => { 'b' => 'c' } }
|
378
|
+
expect(subject.query).to eq('a%5Bb%5D=c')
|
379
|
+
end
|
380
|
+
|
381
|
+
it 'bracketizes repeated params in query' do
|
382
|
+
@params = { 'a' => [1, 2] }
|
383
|
+
expect(subject.query).to eq('a%5B%5D=1&a%5B%5D=2')
|
384
|
+
end
|
385
|
+
|
386
|
+
it 'without braketizing repeated params in query' do
|
387
|
+
@params = { 'a' => [1, 2] }
|
388
|
+
conn.options.params_encoder = Faraday::FlatParamsEncoder
|
389
|
+
expect(subject.query).to eq('a=1&a=2')
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
describe 'proxy support' do
|
394
|
+
it 'accepts string' do
|
395
|
+
with_env 'http_proxy' => 'http://env-proxy.com:80' do
|
396
|
+
conn.proxy = 'http://proxy.com'
|
397
|
+
expect(conn.proxy.host).to eq('proxy.com')
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
it 'accepts uri' do
|
402
|
+
with_env 'http_proxy' => 'http://env-proxy.com:80' do
|
403
|
+
conn.proxy = URI.parse('http://proxy.com')
|
404
|
+
expect(conn.proxy.host).to eq('proxy.com')
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
it 'accepts hash with string uri' do
|
409
|
+
with_env 'http_proxy' => 'http://env-proxy.com:80' do
|
410
|
+
conn.proxy = { uri: 'http://proxy.com', user: 'rick' }
|
411
|
+
expect(conn.proxy.host).to eq('proxy.com')
|
412
|
+
expect(conn.proxy.user).to eq('rick')
|
413
|
+
end
|
414
|
+
end
|
415
|
+
|
416
|
+
it 'accepts hash' do
|
417
|
+
with_env 'http_proxy' => 'http://env-proxy.com:80' do
|
418
|
+
conn.proxy = { uri: URI.parse('http://proxy.com'), user: 'rick' }
|
419
|
+
expect(conn.proxy.host).to eq('proxy.com')
|
420
|
+
expect(conn.proxy.user).to eq('rick')
|
421
|
+
end
|
422
|
+
end
|
423
|
+
|
424
|
+
it 'accepts http env' do
|
425
|
+
with_env 'http_proxy' => 'http://env-proxy.com:80' do
|
426
|
+
expect(conn.proxy.host).to eq('env-proxy.com')
|
427
|
+
end
|
428
|
+
end
|
429
|
+
|
430
|
+
it 'accepts http env with auth' do
|
431
|
+
with_env 'http_proxy' => 'http://a%40b:my%20pass@proxy.com:80' do
|
432
|
+
expect(conn.proxy.user).to eq('a@b')
|
433
|
+
expect(conn.proxy.password).to eq('my pass')
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
it 'accepts env without scheme' do
|
438
|
+
with_env 'http_proxy' => 'localhost:8888' do
|
439
|
+
uri = conn.proxy[:uri]
|
440
|
+
expect(uri.host).to eq('localhost')
|
441
|
+
expect(uri.port).to eq(8888)
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
it 'fetches no proxy from nil env' do
|
446
|
+
with_env 'http_proxy' => nil do
|
447
|
+
expect(conn.proxy).to be_nil
|
448
|
+
end
|
449
|
+
end
|
450
|
+
|
451
|
+
it 'fetches no proxy from blank env' do
|
452
|
+
with_env 'http_proxy' => '' do
|
453
|
+
expect(conn.proxy).to be_nil
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
it 'does not accept uppercase env' do
|
458
|
+
with_env 'HTTP_PROXY' => 'http://localhost:8888/' do
|
459
|
+
expect(conn.proxy).to be_nil
|
460
|
+
end
|
461
|
+
end
|
462
|
+
|
463
|
+
it 'allows when url in no proxy list' do
|
464
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do
|
465
|
+
conn = Faraday::Connection.new('http://example.com')
|
466
|
+
expect(conn.proxy).to be_nil
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
470
|
+
it 'allows when url in no proxy list with url_prefix' do
|
471
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do
|
472
|
+
conn = Faraday::Connection.new
|
473
|
+
conn.url_prefix = 'http://example.com'
|
474
|
+
expect(conn.proxy).to be_nil
|
475
|
+
end
|
476
|
+
end
|
477
|
+
|
478
|
+
it 'allows when prefixed url is not in no proxy list' do
|
479
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do
|
480
|
+
conn = Faraday::Connection.new('http://prefixedexample.com')
|
481
|
+
expect(conn.proxy.host).to eq('proxy.com')
|
482
|
+
end
|
483
|
+
end
|
484
|
+
|
485
|
+
it 'allows when subdomain url is in no proxy list' do
|
486
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do
|
487
|
+
conn = Faraday::Connection.new('http://subdomain.example.com')
|
488
|
+
expect(conn.proxy).to be_nil
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
it 'allows when url not in no proxy list' do
|
493
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example2.com' do
|
494
|
+
conn = Faraday::Connection.new('http://example.com')
|
495
|
+
expect(conn.proxy.host).to eq('proxy.com')
|
496
|
+
end
|
497
|
+
end
|
498
|
+
|
499
|
+
it 'allows when ip address is not in no proxy list but url is' do
|
500
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'localhost' do
|
501
|
+
conn = Faraday::Connection.new('http://127.0.0.1')
|
502
|
+
expect(conn.proxy).to be_nil
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
it 'allows when url is not in no proxy list but ip address is' do
|
507
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => '127.0.0.1' do
|
508
|
+
conn = Faraday::Connection.new('http://localhost')
|
509
|
+
expect(conn.proxy).to be_nil
|
510
|
+
end
|
511
|
+
end
|
512
|
+
|
513
|
+
it 'allows in multi element no proxy list' do
|
514
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example0.com,example.com,example1.com' do
|
515
|
+
expect(Faraday::Connection.new('http://example0.com').proxy).to be_nil
|
516
|
+
expect(Faraday::Connection.new('http://example.com').proxy).to be_nil
|
517
|
+
expect(Faraday::Connection.new('http://example1.com').proxy).to be_nil
|
518
|
+
expect(Faraday::Connection.new('http://example2.com').proxy.host).to eq('proxy.com')
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
it 'test proxy requires uri' do
|
523
|
+
expect { conn.proxy = { uri: :bad_uri, user: 'rick' } }.to raise_error(ArgumentError)
|
524
|
+
end
|
525
|
+
|
526
|
+
it 'uses env http_proxy' do
|
527
|
+
with_env 'http_proxy' => 'http://proxy.com' do
|
528
|
+
conn = Faraday.new
|
529
|
+
expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey
|
530
|
+
expect(conn.proxy_for_request('http://google.co.uk').host).to eq('proxy.com')
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
it 'uses processes no_proxy before http_proxy' do
|
535
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'google.co.uk' do
|
536
|
+
conn = Faraday.new
|
537
|
+
expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey
|
538
|
+
expect(conn.proxy_for_request('http://google.co.uk')).to be_nil
|
539
|
+
end
|
540
|
+
end
|
541
|
+
|
542
|
+
it 'uses env https_proxy' do
|
543
|
+
with_env 'https_proxy' => 'https://proxy.com' do
|
544
|
+
conn = Faraday.new
|
545
|
+
expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey
|
546
|
+
expect(conn.proxy_for_request('https://google.co.uk').host).to eq('proxy.com')
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
550
|
+
it 'uses processes no_proxy before https_proxy' do
|
551
|
+
with_env 'https_proxy' => 'https://proxy.com', 'no_proxy' => 'google.co.uk' do
|
552
|
+
conn = Faraday.new
|
553
|
+
expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey
|
554
|
+
expect(conn.proxy_for_request('https://google.co.uk')).to be_nil
|
555
|
+
end
|
556
|
+
end
|
557
|
+
|
558
|
+
it 'gives priority to manually set proxy' do
|
559
|
+
with_env 'https_proxy' => 'https://proxy.com', 'no_proxy' => 'google.co.uk' do
|
560
|
+
conn = Faraday.new
|
561
|
+
conn.proxy = 'http://proxy2.com'
|
562
|
+
|
563
|
+
expect(conn.instance_variable_get(:@manual_proxy)).to be_truthy
|
564
|
+
expect(conn.proxy_for_request('https://google.co.uk').host).to eq('proxy2.com')
|
565
|
+
end
|
566
|
+
end
|
567
|
+
|
568
|
+
it 'ignores env proxy if set that way' do
|
569
|
+
with_env_proxy_disabled do
|
570
|
+
with_env 'http_proxy' => 'http://duncan.proxy.com:80' do
|
571
|
+
expect(conn.proxy).to be_nil
|
572
|
+
end
|
573
|
+
end
|
574
|
+
end
|
575
|
+
|
576
|
+
context 'performing a request' do
|
577
|
+
let(:url) { 'http://example.com' }
|
578
|
+
let(:conn) do
|
579
|
+
Faraday.new do |f|
|
580
|
+
f.adapter :test do |stubs|
|
581
|
+
stubs.get(url) do
|
582
|
+
[200, {}, 'ok']
|
583
|
+
end
|
584
|
+
end
|
585
|
+
end
|
586
|
+
end
|
587
|
+
|
588
|
+
it 'dynamically checks proxy' do
|
589
|
+
with_env 'http_proxy' => 'http://proxy.com:80' do
|
590
|
+
expect(conn.proxy.uri.host).to eq('proxy.com')
|
591
|
+
|
592
|
+
conn.get(url) do |req|
|
593
|
+
expect(req.options.proxy.uri.host).to eq('proxy.com')
|
594
|
+
end
|
595
|
+
end
|
596
|
+
|
597
|
+
conn.get(url)
|
598
|
+
expect(conn.instance_variable_get(:@temp_proxy)).to be_nil
|
599
|
+
end
|
600
|
+
|
601
|
+
it 'dynamically check no proxy' do
|
602
|
+
with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do
|
603
|
+
expect(conn.proxy.uri.host).to eq('proxy.com')
|
604
|
+
|
605
|
+
conn.get('http://example.com') do |req|
|
606
|
+
expect(req.options.proxy).to be_nil
|
607
|
+
end
|
608
|
+
end
|
609
|
+
end
|
610
|
+
end
|
611
|
+
end
|
612
|
+
|
613
|
+
describe '#dup' do
|
614
|
+
subject { conn.dup }
|
615
|
+
|
616
|
+
let(:url) { 'http://httpbingo.org/foo' }
|
617
|
+
let(:options) do
|
618
|
+
{
|
619
|
+
ssl: { verify: :none },
|
620
|
+
headers: { 'content-type' => 'text/plain' },
|
621
|
+
params: { 'a' => '1' },
|
622
|
+
request: { timeout: 5 }
|
623
|
+
}
|
624
|
+
end
|
625
|
+
|
626
|
+
it { expect(subject.build_exclusive_url).to eq(conn.build_exclusive_url) }
|
627
|
+
it { expect(subject.headers['content-type']).to eq('text/plain') }
|
628
|
+
it { expect(subject.params['a']).to eq('1') }
|
629
|
+
|
630
|
+
context 'after manual changes' do
|
631
|
+
before do
|
632
|
+
subject.headers['content-length'] = 12
|
633
|
+
subject.params['b'] = '2'
|
634
|
+
subject.options[:open_timeout] = 10
|
635
|
+
end
|
636
|
+
|
637
|
+
it { expect(subject.builder.handlers.size).to eq(1) }
|
638
|
+
it { expect(conn.builder.handlers.size).to eq(1) }
|
639
|
+
it { expect(conn.headers.key?('content-length')).to be_falsey }
|
640
|
+
it { expect(conn.params.key?('b')).to be_falsey }
|
641
|
+
it { expect(subject.options[:timeout]).to eq(5) }
|
642
|
+
it { expect(conn.options[:open_timeout]).to be_nil }
|
643
|
+
end
|
644
|
+
end
|
645
|
+
|
646
|
+
describe '#respond_to?' do
|
647
|
+
it { expect(Faraday.respond_to?(:get)).to be_truthy }
|
648
|
+
it { expect(Faraday.respond_to?(:post)).to be_truthy }
|
649
|
+
end
|
650
|
+
|
651
|
+
describe 'default_connection_options' do
|
652
|
+
context 'assigning a default value' do
|
653
|
+
before do
|
654
|
+
Faraday.default_connection_options = nil
|
655
|
+
Faraday.default_connection_options.request.timeout = 10
|
656
|
+
end
|
657
|
+
|
658
|
+
it_behaves_like 'default connection options'
|
659
|
+
end
|
660
|
+
|
661
|
+
context 'assigning a hash' do
|
662
|
+
before { Faraday.default_connection_options = { request: { timeout: 10 } } }
|
663
|
+
|
664
|
+
it_behaves_like 'default connection options'
|
665
|
+
end
|
666
|
+
|
667
|
+
context 'preserving a user_agent assigned via default_conncetion_options' do
|
668
|
+
around do |example|
|
669
|
+
old = Faraday.default_connection_options
|
670
|
+
Faraday.default_connection_options = { headers: { user_agent: 'My Agent 1.2' } }
|
671
|
+
example.run
|
672
|
+
Faraday.default_connection_options = old
|
673
|
+
end
|
674
|
+
|
675
|
+
context 'when url is a Hash' do
|
676
|
+
let(:conn) { Faraday.new(url: 'http://example.co', headers: { 'CustomHeader' => 'CustomValue' }) }
|
677
|
+
|
678
|
+
it { expect(conn.headers).to eq('CustomHeader' => 'CustomValue', 'User-Agent' => 'My Agent 1.2') }
|
679
|
+
end
|
680
|
+
|
681
|
+
context 'when url is a String' do
|
682
|
+
let(:conn) { Faraday.new('http://example.co', headers: { 'CustomHeader' => 'CustomValue' }) }
|
683
|
+
|
684
|
+
it { expect(conn.headers).to eq('CustomHeader' => 'CustomValue', 'User-Agent' => 'My Agent 1.2') }
|
685
|
+
end
|
686
|
+
end
|
687
|
+
end
|
688
|
+
|
689
|
+
describe 'request params' do
|
690
|
+
context 'with simple url' do
|
691
|
+
let(:url) { 'http://example.com' }
|
692
|
+
let(:stubs) { Faraday::Adapter::Test::Stubs.new }
|
693
|
+
|
694
|
+
before do
|
695
|
+
conn.adapter(:test, stubs)
|
696
|
+
stubs.get('http://example.com?a=a&p=3') do
|
697
|
+
[200, {}, 'ok']
|
698
|
+
end
|
699
|
+
end
|
700
|
+
|
701
|
+
after { stubs.verify_stubbed_calls }
|
702
|
+
|
703
|
+
it 'test_overrides_request_params' do
|
704
|
+
conn.get('?p=2&a=a', p: 3)
|
705
|
+
end
|
706
|
+
|
707
|
+
it 'test_overrides_request_params_block' do
|
708
|
+
conn.get('?p=1&a=a', p: 2) do |req|
|
709
|
+
req.params[:p] = 3
|
710
|
+
end
|
711
|
+
end
|
712
|
+
|
713
|
+
it 'test_overrides_request_params_block_url' do
|
714
|
+
conn.get(nil, p: 2) do |req|
|
715
|
+
req.url('?p=1&a=a', 'p' => 3)
|
716
|
+
end
|
717
|
+
end
|
718
|
+
end
|
719
|
+
|
720
|
+
context 'with url and extra params' do
|
721
|
+
let(:url) { 'http://example.com?a=1&b=2' }
|
722
|
+
let(:options) { { params: { c: 3 } } }
|
723
|
+
let(:stubs) { Faraday::Adapter::Test::Stubs.new }
|
724
|
+
|
725
|
+
before do
|
726
|
+
conn.adapter(:test, stubs)
|
727
|
+
end
|
728
|
+
|
729
|
+
it 'merges connection and request params' do
|
730
|
+
expected = 'http://example.com?a=1&b=2&c=3&limit=5&page=1'
|
731
|
+
stubs.get(expected) { [200, {}, 'ok'] }
|
732
|
+
conn.get('?page=1', limit: 5)
|
733
|
+
stubs.verify_stubbed_calls
|
734
|
+
end
|
735
|
+
|
736
|
+
it 'allows to override all params' do
|
737
|
+
expected = 'http://example.com?b=b'
|
738
|
+
stubs.get(expected) { [200, {}, 'ok'] }
|
739
|
+
conn.get('?p=1&a=a', p: 2) do |req|
|
740
|
+
expect(req.params[:a]).to eq('a')
|
741
|
+
expect(req.params['c']).to eq(3)
|
742
|
+
expect(req.params['p']).to eq(2)
|
743
|
+
req.params = { b: 'b' }
|
744
|
+
expect(req.params['b']).to eq('b')
|
745
|
+
end
|
746
|
+
stubs.verify_stubbed_calls
|
747
|
+
end
|
748
|
+
|
749
|
+
it 'allows to set params_encoder for single request' do
|
750
|
+
encoder = CustomEncoder.new
|
751
|
+
expected = 'http://example.com/?A-1,B-2,C-3,FEELING-BLUE'
|
752
|
+
stubs.get(expected) { [200, {}, 'ok'] }
|
753
|
+
|
754
|
+
conn.get('/', a: 1, b: 2, c: 3, feeling: 'blue') do |req|
|
755
|
+
req.options.params_encoder = encoder
|
756
|
+
end
|
757
|
+
stubs.verify_stubbed_calls
|
758
|
+
end
|
759
|
+
end
|
760
|
+
|
761
|
+
context 'with default params encoder' do
|
762
|
+
let(:stubs) { Faraday::Adapter::Test::Stubs.new }
|
763
|
+
|
764
|
+
before do
|
765
|
+
conn.adapter(:test, stubs)
|
766
|
+
stubs.get('http://example.com?color%5B%5D=blue&color%5B%5D=red') do
|
767
|
+
[200, {}, 'ok']
|
768
|
+
end
|
769
|
+
end
|
770
|
+
|
771
|
+
after { stubs.verify_stubbed_calls }
|
772
|
+
|
773
|
+
it 'supports array params in url' do
|
774
|
+
conn.get('http://example.com?color[]=blue&color[]=red')
|
775
|
+
end
|
776
|
+
|
777
|
+
it 'supports array params in params' do
|
778
|
+
conn.get('http://example.com', color: %w[blue red])
|
779
|
+
end
|
780
|
+
end
|
781
|
+
|
782
|
+
context 'with flat params encoder' do
|
783
|
+
let(:options) { { request: { params_encoder: Faraday::FlatParamsEncoder } } }
|
784
|
+
let(:stubs) { Faraday::Adapter::Test::Stubs.new }
|
785
|
+
|
786
|
+
before do
|
787
|
+
conn.adapter(:test, stubs)
|
788
|
+
stubs.get('http://example.com?color=blue&color=red') do
|
789
|
+
[200, {}, 'ok']
|
790
|
+
end
|
791
|
+
end
|
792
|
+
|
793
|
+
after { stubs.verify_stubbed_calls }
|
794
|
+
|
795
|
+
it 'supports array params in params' do
|
796
|
+
conn.get('http://example.com', color: %w[blue red])
|
797
|
+
end
|
798
|
+
|
799
|
+
context 'with array param in url' do
|
800
|
+
let(:url) { 'http://example.com?color[]=blue&color[]=red' }
|
801
|
+
|
802
|
+
it do
|
803
|
+
conn.get('/')
|
804
|
+
end
|
805
|
+
end
|
806
|
+
end
|
807
|
+
end
|
808
|
+
end
|