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.
Files changed (485) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +2 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +39 -0
  5. data/Rakefile +12 -0
  6. data/exe/es +8 -0
  7. data/lib/es_cli/cli.rb +247 -0
  8. data/lib/es_cli/version.rb +5 -0
  9. data/lib/es_cli.rb +11 -0
  10. data/readme.org +78 -0
  11. data/sig/es_cli.rbs +4 -0
  12. data/vendor/bundle/ruby/3.1.0/bin/rake +29 -0
  13. data/vendor/bundle/ruby/3.1.0/bin/thor +29 -0
  14. data/vendor/bundle/ruby/3.1.0/cache/event_stream_parser-1.0.0.gem +0 -0
  15. data/vendor/bundle/ruby/3.1.0/cache/faraday-2.12.2.gem +0 -0
  16. data/vendor/bundle/ruby/3.1.0/cache/faraday-multipart-1.1.0.gem +0 -0
  17. data/vendor/bundle/ruby/3.1.0/cache/faraday-net_http-3.4.0.gem +0 -0
  18. data/vendor/bundle/ruby/3.1.0/cache/json-2.9.1.gem +0 -0
  19. data/vendor/bundle/ruby/3.1.0/cache/logger-1.6.5.gem +0 -0
  20. data/vendor/bundle/ruby/3.1.0/cache/multipart-post-2.4.1.gem +0 -0
  21. data/vendor/bundle/ruby/3.1.0/cache/net-http-0.6.0.gem +0 -0
  22. data/vendor/bundle/ruby/3.1.0/cache/power_assert-2.0.5.gem +0 -0
  23. data/vendor/bundle/ruby/3.1.0/cache/rake-13.2.1.gem +0 -0
  24. data/vendor/bundle/ruby/3.1.0/cache/ruby-openai-7.3.1.gem +0 -0
  25. data/vendor/bundle/ruby/3.1.0/cache/test-unit-3.6.7.gem +0 -0
  26. data/vendor/bundle/ruby/3.1.0/cache/thor-1.3.2.gem +0 -0
  27. data/vendor/bundle/ruby/3.1.0/cache/uri-1.0.2.gem +0 -0
  28. data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/gem.build_complete +0 -0
  29. data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/gem_make.out +22 -0
  30. data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/json/ext/generator.bundle +0 -0
  31. data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/json/ext/parser.bundle +0 -0
  32. data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/mkmf.log +208 -0
  33. data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/LICENSE.md +21 -0
  34. data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/README.md +99 -0
  35. data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/lib/event_stream_parser/version.rb +5 -0
  36. data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/lib/event_stream_parser.rb +222 -0
  37. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/CHANGELOG.md +574 -0
  38. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/LICENSE.md +20 -0
  39. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/README.md +67 -0
  40. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/Rakefile +12 -0
  41. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/examples/client_spec.rb +119 -0
  42. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/examples/client_test.rb +144 -0
  43. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter/test.rb +311 -0
  44. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter.rb +101 -0
  45. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter_registry.rb +30 -0
  46. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/connection.rb +564 -0
  47. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/encoders/flat_params_encoder.rb +105 -0
  48. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/encoders/nested_params_encoder.rb +183 -0
  49. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/error.rb +165 -0
  50. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/logging/formatter.rb +118 -0
  51. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/methods.rb +6 -0
  52. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/middleware.rb +72 -0
  53. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/middleware_registry.rb +83 -0
  54. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/connection_options.rb +23 -0
  55. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/env.rb +204 -0
  56. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/proxy_options.rb +36 -0
  57. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/request_options.rb +23 -0
  58. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/ssl_options.rb +73 -0
  59. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options.rb +219 -0
  60. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/parameters.rb +5 -0
  61. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/rack_builder.rb +251 -0
  62. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/authorization.rb +54 -0
  63. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/instrumentation.rb +58 -0
  64. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/json.rb +70 -0
  65. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/url_encoded.rb +60 -0
  66. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request.rb +139 -0
  67. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/json.rb +74 -0
  68. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/logger.rb +37 -0
  69. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/raise_error.rb +83 -0
  70. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response.rb +91 -0
  71. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils/headers.rb +150 -0
  72. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils/params_hash.rb +61 -0
  73. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils.rb +121 -0
  74. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/version.rb +5 -0
  75. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday.rb +157 -0
  76. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/external_adapters/faraday_specs_setup.rb +14 -0
  77. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter/test_spec.rb +442 -0
  78. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter_registry_spec.rb +28 -0
  79. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter_spec.rb +55 -0
  80. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/connection_spec.rb +808 -0
  81. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/error_spec.rb +93 -0
  82. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/middleware_registry_spec.rb +31 -0
  83. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/middleware_spec.rb +213 -0
  84. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/env_spec.rb +76 -0
  85. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/options_spec.rb +297 -0
  86. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/proxy_options_spec.rb +52 -0
  87. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/request_options_spec.rb +19 -0
  88. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/params_encoders/flat_spec.rb +42 -0
  89. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/params_encoders/nested_spec.rb +151 -0
  90. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/rack_builder_spec.rb +317 -0
  91. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/authorization_spec.rb +118 -0
  92. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/instrumentation_spec.rb +74 -0
  93. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/json_spec.rb +199 -0
  94. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/url_encoded_spec.rb +93 -0
  95. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request_spec.rb +110 -0
  96. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/json_spec.rb +206 -0
  97. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/logger_spec.rb +278 -0
  98. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/raise_error_spec.rb +275 -0
  99. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response_spec.rb +77 -0
  100. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/utils/headers_spec.rb +109 -0
  101. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/utils_spec.rb +119 -0
  102. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday_spec.rb +43 -0
  103. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/spec_helper.rb +133 -0
  104. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/disabling_stub.rb +14 -0
  105. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/fake_safe_buffer.rb +15 -0
  106. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/faraday_middleware_subclasses.rb +18 -0
  107. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/helper_methods.rb +96 -0
  108. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/adapter.rb +105 -0
  109. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/params_encoder.rb +18 -0
  110. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/request_method.rb +263 -0
  111. data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/streaming_response_checker.rb +35 -0
  112. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/CHANGELOG.md +54 -0
  113. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/LICENSE.md +21 -0
  114. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/README.md +170 -0
  115. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/file_part.rb +130 -0
  116. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/middleware.rb +134 -0
  117. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/param_part.rb +55 -0
  118. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/version.rb +16 -0
  119. data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart.rb +26 -0
  120. data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/LICENSE.md +21 -0
  121. data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/README.md +57 -0
  122. data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/adapter/net_http.rb +206 -0
  123. data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http/version.rb +7 -0
  124. data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http.rb +10 -0
  125. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/BSDL +22 -0
  126. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/CHANGES.md +572 -0
  127. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/COPYING +56 -0
  128. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/LEGAL +60 -0
  129. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/README.md +195 -0
  130. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/fbuffer/fbuffer.h +214 -0
  131. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/.sitearchdir.-.json.-.ext.time +0 -0
  132. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/Makefile +269 -0
  133. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/extconf.rb +10 -0
  134. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.bundle +0 -0
  135. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.c +1691 -0
  136. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.o +0 -0
  137. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/.sitearchdir.-.json.-.ext.time +0 -0
  138. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/Makefile +269 -0
  139. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/extconf.rb +12 -0
  140. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.bundle +0 -0
  141. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.c +3238 -0
  142. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.o +0 -0
  143. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.rl +1465 -0
  144. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/json.gemspec +64 -0
  145. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/bigdecimal.rb +58 -0
  146. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/complex.rb +51 -0
  147. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/core.rb +12 -0
  148. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/date.rb +54 -0
  149. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/date_time.rb +67 -0
  150. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/exception.rb +49 -0
  151. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/ostruct.rb +54 -0
  152. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/range.rb +54 -0
  153. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/rational.rb +49 -0
  154. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/regexp.rb +48 -0
  155. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/set.rb +48 -0
  156. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/struct.rb +52 -0
  157. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/symbol.rb +47 -0
  158. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/time.rb +52 -0
  159. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/common.rb +896 -0
  160. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/generator/state.rb +116 -0
  161. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/generator.bundle +0 -0
  162. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/parser.bundle +0 -0
  163. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext.rb +23 -0
  164. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/generic_object.rb +75 -0
  165. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/truffle_ruby/generator.rb +629 -0
  166. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/version.rb +5 -0
  167. data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json.rb +587 -0
  168. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/dependabot.yml +6 -0
  169. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/workflows/push_gem.yml +46 -0
  170. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/workflows/test.yml +32 -0
  171. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.gitignore +11 -0
  172. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/BSDL +22 -0
  173. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/COPYING +56 -0
  174. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/Gemfile +10 -0
  175. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/README.md +104 -0
  176. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/Rakefile +30 -0
  177. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/bin/console +14 -0
  178. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/bin/setup +8 -0
  179. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/errors.rb +9 -0
  180. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/formatter.rb +36 -0
  181. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/log_device.rb +241 -0
  182. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/period.rb +47 -0
  183. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/severity.rb +38 -0
  184. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/version.rb +5 -0
  185. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger.rb +761 -0
  186. data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/logger.gemspec +28 -0
  187. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/changelog.md +14 -0
  188. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/composite_io.rb +17 -0
  189. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/composite_read_io.rb +91 -0
  190. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/multipartable.rb +70 -0
  191. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/parts.rb +148 -0
  192. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/upload_io.rb +64 -0
  193. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/version.rb +11 -0
  194. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post.rb +8 -0
  195. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart_post.rb +11 -0
  196. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipartable.rb +19 -0
  197. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/net/http/post/multipart.rb +28 -0
  198. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/parts.rb +25 -0
  199. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/license.md +58 -0
  200. data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/readme.md +170 -0
  201. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/BSDL +22 -0
  202. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/COPYING +56 -0
  203. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/Gemfile +8 -0
  204. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/README.md +93 -0
  205. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/Rakefile +10 -0
  206. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/bin/console +14 -0
  207. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/bin/setup +8 -0
  208. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/doc/net-http/examples.rdoc +31 -0
  209. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/doc/net-http/included_getters.rdoc +3 -0
  210. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/exceptions.rb +34 -0
  211. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/generic_request.rb +414 -0
  212. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/header.rb +981 -0
  213. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/proxy_delta.rb +17 -0
  214. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/request.rb +88 -0
  215. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/requests.rb +430 -0
  216. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/response.rb +738 -0
  217. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/responses.rb +1174 -0
  218. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/status.rb +84 -0
  219. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http.rb +2580 -0
  220. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/https.rb +23 -0
  221. data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/net-http.gemspec +39 -0
  222. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.github/dependabot.yml +6 -0
  223. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.github/workflows/ci.yml +46 -0
  224. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.gitignore +9 -0
  225. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/BSDL +22 -0
  226. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/COPYING +57 -0
  227. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/Gemfile +19 -0
  228. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/LEGAL +4 -0
  229. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/README.md +98 -0
  230. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/Rakefile +59 -0
  231. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/colorize.rb +7 -0
  232. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/configuration.rb +46 -0
  233. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/context.rb +233 -0
  234. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/enable_tracepoint_events.rb +62 -0
  235. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/inspector.rb +66 -0
  236. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/parser.rb +251 -0
  237. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/version.rb +3 -0
  238. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert.rb +93 -0
  239. data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/power_assert.gemspec +24 -0
  240. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/History.rdoc +2403 -0
  241. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
  242. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/README.rdoc +155 -0
  243. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/command_line_usage.rdoc +158 -0
  244. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/Rakefile1 +38 -0
  245. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/Rakefile2 +35 -0
  246. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/a.c +6 -0
  247. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/b.c +6 -0
  248. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/main.c +11 -0
  249. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/glossary.rdoc +42 -0
  250. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/jamis.rb +592 -0
  251. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/proto_rake.rdoc +127 -0
  252. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rake.1 +156 -0
  253. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rakefile.rdoc +622 -0
  254. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rational.rdoc +151 -0
  255. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/exe/rake +27 -0
  256. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/application.rb +861 -0
  257. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/backtrace.rb +25 -0
  258. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/clean.rb +78 -0
  259. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/cloneable.rb +17 -0
  260. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/cpu_counter.rb +107 -0
  261. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/default_loader.rb +15 -0
  262. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/dsl_definition.rb +196 -0
  263. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/early_time.rb +22 -0
  264. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/ext/core.rb +26 -0
  265. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/ext/string.rb +176 -0
  266. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_creation_task.rb +25 -0
  267. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_list.rb +435 -0
  268. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_task.rb +58 -0
  269. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_utils.rb +132 -0
  270. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_utils_ext.rb +134 -0
  271. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/invocation_chain.rb +57 -0
  272. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/invocation_exception_mixin.rb +17 -0
  273. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/late_time.rb +18 -0
  274. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/linked_list.rb +112 -0
  275. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/loaders/makefile.rb +54 -0
  276. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/multi_task.rb +14 -0
  277. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/name_space.rb +38 -0
  278. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/packagetask.rb +222 -0
  279. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/phony.rb +16 -0
  280. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/private_reader.rb +21 -0
  281. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/promise.rb +100 -0
  282. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/pseudo_status.rb +30 -0
  283. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_module.rb +67 -0
  284. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb +27 -0
  285. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
  286. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/scope.rb +43 -0
  287. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task.rb +434 -0
  288. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_argument_error.rb +8 -0
  289. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_arguments.rb +109 -0
  290. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_manager.rb +331 -0
  291. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/tasklib.rb +12 -0
  292. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/testtask.rb +189 -0
  293. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/thread_history_display.rb +49 -0
  294. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/thread_pool.rb +163 -0
  295. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/trace_output.rb +23 -0
  296. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/version.rb +10 -0
  297. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/win32.rb +51 -0
  298. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake.rb +70 -0
  299. data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/rake.gemspec +101 -0
  300. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.circleci/config.yml +46 -0
  301. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/Dockerfile +16 -0
  302. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/devcontainer.json +36 -0
  303. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/docker-compose.yml +19 -0
  304. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/FUNDING.yml +13 -0
  305. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  306. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  307. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/dependabot.yml +15 -0
  308. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.gitignore +69 -0
  309. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.rspec +3 -0
  310. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.rubocop.yml +31 -0
  311. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CHANGELOG.md +467 -0
  312. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CODE_OF_CONDUCT.md +74 -0
  313. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CONTRIBUTING.md +3 -0
  314. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Gemfile +12 -0
  315. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Gemfile.lock +92 -0
  316. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/LICENSE.txt +21 -0
  317. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/README.md +1381 -0
  318. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Rakefile +19 -0
  319. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/bin/console +14 -0
  320. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/bin/setup +8 -0
  321. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/assistants.rb +29 -0
  322. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/audio.rb +19 -0
  323. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/batches.rb +23 -0
  324. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/client.rb +122 -0
  325. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/compatibility.rb +10 -0
  326. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/files.rb +75 -0
  327. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/finetunes.rb +27 -0
  328. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/http.rb +134 -0
  329. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/http_headers.rb +36 -0
  330. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/images.rb +27 -0
  331. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/messages.rb +27 -0
  332. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/models.rb +15 -0
  333. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/run_steps.rb +15 -0
  334. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/runs.rb +37 -0
  335. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/threads.rb +23 -0
  336. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_store_file_batches.rb +29 -0
  337. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_store_files.rb +23 -0
  338. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_stores.rb +27 -0
  339. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/version.rb +3 -0
  340. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai.rb +92 -0
  341. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/ruby/openai.rb +2 -0
  342. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/pull_request_template.md +5 -0
  343. data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/ruby-openai.gemspec +32 -0
  344. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/BSDL +24 -0
  345. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/COPYING +64 -0
  346. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/PSFL +271 -0
  347. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/README.md +108 -0
  348. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/Rakefile +74 -0
  349. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/getting-started.md +246 -0
  350. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/how-to.md +90 -0
  351. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/news.md +1853 -0
  352. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertion-failed-error.rb +60 -0
  353. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb +2541 -0
  354. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/attribute-matcher.rb +26 -0
  355. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/attribute.rb +228 -0
  356. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/auto-runner-loader.rb +17 -0
  357. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/autorunner.rb +629 -0
  358. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/code-snippet-fetcher.rb +58 -0
  359. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/descendant.rb +20 -0
  360. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/dir.rb +110 -0
  361. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/load.rb +201 -0
  362. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/objectspace.rb +35 -0
  363. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/xml.rb +249 -0
  364. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector.rb +104 -0
  365. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/color-scheme.rb +225 -0
  366. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/color.rb +134 -0
  367. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/data-sets.rb +127 -0
  368. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/data.rb +371 -0
  369. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/diff.rb +745 -0
  370. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/error.rb +158 -0
  371. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/exception-handler.rb +82 -0
  372. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/failure.rb +169 -0
  373. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fault-location-detector.rb +104 -0
  374. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb +304 -0
  375. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/notification.rb +138 -0
  376. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/omission.rb +198 -0
  377. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/pending.rb +155 -0
  378. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/priority.rb +194 -0
  379. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/console.rb +86 -0
  380. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/emacs.rb +8 -0
  381. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/xml.rb +15 -0
  382. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/sub-test-result.rb +59 -0
  383. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-creator.rb +103 -0
  384. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb +128 -0
  385. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-thread-runner.rb +69 -0
  386. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb +963 -0
  387. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testresult.rb +132 -0
  388. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testsuite.rb +108 -0
  389. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/outputlevel.rb +15 -0
  390. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/testrunner.rb +891 -0
  391. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  392. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunner.rb +53 -0
  393. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnermediator.rb +119 -0
  394. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  395. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/xml/testrunner.rb +224 -0
  396. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/backtracefilter.rb +59 -0
  397. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/memory-usage.rb +47 -0
  398. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/method-owner-finder.rb +28 -0
  399. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/observable.rb +86 -0
  400. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/output.rb +32 -0
  401. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/procwrapper.rb +48 -0
  402. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/version.rb +5 -0
  403. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/warning.rb +3 -0
  404. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit.rb +521 -0
  405. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test-unit.rb +19 -0
  406. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/adder.rb +13 -0
  407. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/subtracter.rb +12 -0
  408. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_adder.rb +20 -0
  409. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_subtracter.rb +20 -0
  410. data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_user.rb +23 -0
  411. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/.document +5 -0
  412. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/CONTRIBUTING.md +15 -0
  413. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/LICENSE.md +20 -0
  414. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/README.md +45 -0
  415. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/bin/thor +6 -0
  416. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/create_file.rb +105 -0
  417. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/create_link.rb +61 -0
  418. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/directory.rb +108 -0
  419. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/empty_directory.rb +143 -0
  420. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/file_manipulation.rb +371 -0
  421. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/inject_into_file.rb +130 -0
  422. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions.rb +340 -0
  423. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/base.rb +825 -0
  424. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/command.rb +151 -0
  425. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/core_ext/hash_with_indifferent_access.rb +107 -0
  426. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/error.rb +106 -0
  427. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/group.rb +292 -0
  428. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/invocation.rb +178 -0
  429. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor/basic.rb +37 -0
  430. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor/readline.rb +88 -0
  431. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor.rb +17 -0
  432. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/nested_context.rb +29 -0
  433. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/argument.rb +86 -0
  434. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/arguments.rb +195 -0
  435. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/option.rb +178 -0
  436. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/options.rb +294 -0
  437. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser.rb +4 -0
  438. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/rake_compat.rb +72 -0
  439. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/runner.rb +335 -0
  440. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/basic.rb +388 -0
  441. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/color.rb +115 -0
  442. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/column_printer.rb +29 -0
  443. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/html.rb +84 -0
  444. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/lcs_diff.rb +49 -0
  445. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/table_printer.rb +118 -0
  446. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/terminal.rb +42 -0
  447. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/wrapped_printer.rb +38 -0
  448. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell.rb +81 -0
  449. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/util.rb +285 -0
  450. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/version.rb +3 -0
  451. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor.rb +674 -0
  452. data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/thor.gemspec +33 -0
  453. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/BSDL +22 -0
  454. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/COPYING +56 -0
  455. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/README.md +55 -0
  456. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/common.rb +876 -0
  457. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/file.rb +100 -0
  458. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ftp.rb +267 -0
  459. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/generic.rb +1578 -0
  460. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/http.rb +125 -0
  461. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/https.rb +23 -0
  462. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ldap.rb +261 -0
  463. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ldaps.rb +22 -0
  464. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/mailto.rb +293 -0
  465. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/rfc2396_parser.rb +546 -0
  466. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/rfc3986_parser.rb +206 -0
  467. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/version.rb +6 -0
  468. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ws.rb +83 -0
  469. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/wss.rb +23 -0
  470. data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri.rb +104 -0
  471. data/vendor/bundle/ruby/3.1.0/specifications/event_stream_parser-1.0.0.gemspec +23 -0
  472. data/vendor/bundle/ruby/3.1.0/specifications/faraday-2.12.2.gemspec +0 -0
  473. data/vendor/bundle/ruby/3.1.0/specifications/faraday-multipart-1.1.0.gemspec +32 -0
  474. data/vendor/bundle/ruby/3.1.0/specifications/faraday-net_http-3.4.0.gemspec +32 -0
  475. data/vendor/bundle/ruby/3.1.0/specifications/json-2.9.1.gemspec +0 -0
  476. data/vendor/bundle/ruby/3.1.0/specifications/logger-1.6.5.gemspec +22 -0
  477. data/vendor/bundle/ruby/3.1.0/specifications/multipart-post-2.4.1.gemspec +21 -0
  478. data/vendor/bundle/ruby/3.1.0/specifications/net-http-0.6.0.gemspec +33 -0
  479. data/vendor/bundle/ruby/3.1.0/specifications/power_assert-2.0.5.gemspec +24 -0
  480. data/vendor/bundle/ruby/3.1.0/specifications/rake-13.2.1.gemspec +26 -0
  481. data/vendor/bundle/ruby/3.1.0/specifications/ruby-openai-7.3.1.gemspec +36 -0
  482. data/vendor/bundle/ruby/3.1.0/specifications/test-unit-3.6.7.gemspec +31 -0
  483. data/vendor/bundle/ruby/3.1.0/specifications/thor-1.3.2.gemspec +34 -0
  484. data/vendor/bundle/ruby/3.1.0/specifications/uri-1.0.2.gemspec +23 -0
  485. metadata +560 -0
@@ -0,0 +1,297 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Faraday::Options do
4
+ SubOptions = Class.new(Faraday::Options.new(:sub_a, :sub_b))
5
+ ParentOptions = Faraday::Options.new(:a, :b, :c) do
6
+ options c: SubOptions
7
+ end
8
+
9
+ describe '#merge' do
10
+ it 'merges options with hashes' do
11
+ options = ParentOptions.new(1)
12
+ expect(options.a).to eq(1)
13
+ expect(options.b).to be_nil
14
+
15
+ dup = options.merge a: 2, b: 3
16
+ expect(dup.a).to eq(2)
17
+ expect(dup.b).to eq(3)
18
+ expect(options.a).to eq(1)
19
+ expect(options.b).to be_nil
20
+ end
21
+
22
+ it 'deeply merges two options' do
23
+ sub_opts1 = SubOptions.from(sub_a: 3)
24
+ sub_opts2 = SubOptions.from(sub_b: 4)
25
+ opt1 = ParentOptions.from(a: 1, c: sub_opts1)
26
+ opt2 = ParentOptions.from(b: 2, c: sub_opts2)
27
+
28
+ merged = opt1.merge(opt2)
29
+
30
+ expected_sub_opts = SubOptions.from(sub_a: 3, sub_b: 4)
31
+ expected = ParentOptions.from(a: 1, b: 2, c: expected_sub_opts)
32
+ expect(merged).to eq(expected)
33
+ end
34
+
35
+ it 'deeply merges options with hashes' do
36
+ sub_opts1 = SubOptions.from(sub_a: 3)
37
+ sub_opts2 = { sub_b: 4 }
38
+ opt1 = ParentOptions.from(a: 1, c: sub_opts1)
39
+ opt2 = { b: 2, c: sub_opts2 }
40
+
41
+ merged = opt1.merge(opt2)
42
+
43
+ expected_sub_opts = SubOptions.from(sub_a: 3, sub_b: 4)
44
+ expected = ParentOptions.from(a: 1, b: 2, c: expected_sub_opts)
45
+ expect(merged).to eq(expected)
46
+ end
47
+
48
+ it 'deeply merges options with nil' do
49
+ sub_opts = SubOptions.new(3, 4)
50
+ options = ParentOptions.new(1, 2, sub_opts)
51
+ expect(options.a).to eq(1)
52
+ expect(options.b).to eq(2)
53
+ expect(options.c.sub_a).to eq(3)
54
+ expect(options.c.sub_b).to eq(4)
55
+
56
+ options2 = ParentOptions.from(b: 5, c: nil)
57
+
58
+ merged = options.merge(options2)
59
+
60
+ expect(merged.b).to eq(5)
61
+ expect(merged.c).to eq(sub_opts)
62
+ end
63
+
64
+ it 'deeply merges options with options having nil sub-options' do
65
+ options = ParentOptions.from(a: 1)
66
+
67
+ sub_opts = SubOptions.new(3, 4)
68
+ options2 = ParentOptions.from(b: 2, c: sub_opts)
69
+
70
+ expect(options.a).to eq(1)
71
+ expect(options2.b).to eq(2)
72
+ expect(options2.c.sub_a).to eq(3)
73
+ expect(options2.c.sub_b).to eq(4)
74
+
75
+ merged = options.merge(options2)
76
+
77
+ expect(merged.c).to eq(sub_opts)
78
+ end
79
+
80
+ describe '#dup' do
81
+ it 'duplicate options but not sub-options' do
82
+ sub_opts = SubOptions.from(sub_a: 3)
83
+ opts = ParentOptions.from(b: 1, c: sub_opts)
84
+
85
+ duped = opts.dup
86
+ duped.b = 2
87
+ duped.c.sub_a = 4
88
+
89
+ expect(opts.b).to eq(1)
90
+ expect(opts.c.sub_a).to eq(4)
91
+ end
92
+ end
93
+
94
+ describe '#deep_dup' do
95
+ it 'duplicate options and also suboptions' do
96
+ sub_opts = SubOptions.from(sub_a: 3)
97
+ opts = ParentOptions.from(b: 1, c: sub_opts)
98
+
99
+ duped = opts.deep_dup
100
+ duped.b = 2
101
+ duped.c.sub_a = 4
102
+
103
+ expect(opts.b).to eq(1)
104
+ expect(opts.c.sub_a).to eq(3)
105
+ end
106
+ end
107
+
108
+ describe '#clear' do
109
+ it 'clears the options' do
110
+ options = SubOptions.new(1)
111
+ expect(options.empty?).not_to be_truthy
112
+ options.clear
113
+ expect(options.empty?).to be_truthy
114
+ end
115
+ end
116
+
117
+ describe '#empty?' do
118
+ it 'returns true only if all options are nil' do
119
+ options = SubOptions.new
120
+ expect(options.empty?).to be_truthy
121
+ options.sub_a = 1
122
+ expect(options.empty?).not_to be_truthy
123
+ options.delete(:sub_a)
124
+ expect(options.empty?).to be_truthy
125
+ end
126
+ end
127
+
128
+ describe '#each_key' do
129
+ it 'allows to iterate through keys' do
130
+ options = ParentOptions.new(1, 2, 3)
131
+ enum = options.each_key
132
+ expect(enum.next.to_sym).to eq(:a)
133
+ expect(enum.next.to_sym).to eq(:b)
134
+ expect(enum.next.to_sym).to eq(:c)
135
+ end
136
+ end
137
+
138
+ describe '#key?' do
139
+ it 'returns true if the key exists and is not nil' do
140
+ options = SubOptions.new
141
+ expect(options.key?(:sub_a)).not_to be_truthy
142
+ options.sub_a = 1
143
+ expect(options.key?(:sub_a)).to be_truthy
144
+ end
145
+ end
146
+
147
+ describe '#each_value' do
148
+ it 'allows to iterate through values' do
149
+ options = ParentOptions.new(1, 2, 3)
150
+ enum = options.each_value
151
+ expect(enum.next).to eq(1)
152
+ expect(enum.next).to eq(2)
153
+ expect(enum.next).to eq(3)
154
+ end
155
+ end
156
+
157
+ describe '#value?' do
158
+ it 'returns true if any key has that value' do
159
+ options = SubOptions.new
160
+ expect(options.value?(1)).not_to be_truthy
161
+ options.sub_a = 1
162
+ expect(options.value?(1)).to be_truthy
163
+ end
164
+ end
165
+
166
+ describe '#update' do
167
+ it 'updates options from hashes' do
168
+ options = ParentOptions.new(1)
169
+ expect(options.a).to eq(1)
170
+ expect(options.b).to be_nil
171
+
172
+ updated = options.update a: 2, b: 3
173
+ expect(options.a).to eq(2)
174
+ expect(options.b).to eq(3)
175
+ expect(updated).to eq(options)
176
+ end
177
+ end
178
+
179
+ describe '#delete' do
180
+ it 'allows to remove value for key' do
181
+ options = ParentOptions.new(1)
182
+ expect(options.a).to eq(1)
183
+ expect(options.delete(:a)).to eq(1)
184
+ expect(options.a).to be_nil
185
+ end
186
+ end
187
+
188
+ describe '#from' do
189
+ it { expect { ParentOptions.from invalid: 1 }.to raise_error(NoMethodError) }
190
+
191
+ it 'works with options' do
192
+ options = ParentOptions.new(1)
193
+
194
+ value = ParentOptions.from(options)
195
+ expect(value.a).to eq(1)
196
+ expect(value.b).to be_nil
197
+ end
198
+
199
+ it 'works with options with sub object' do
200
+ sub = SubOptions.new(1)
201
+ options = ParentOptions.from a: 1, c: sub
202
+ expect(options).to be_a_kind_of(ParentOptions)
203
+ expect(options.a).to eq(1)
204
+ expect(options.b).to be_nil
205
+ expect(options.c).to be_a_kind_of(SubOptions)
206
+ expect(options.c.sub_a).to eq(1)
207
+ end
208
+
209
+ it 'works with hash' do
210
+ options = ParentOptions.from a: 1
211
+ expect(options).to be_a_kind_of(ParentOptions)
212
+ expect(options.a).to eq(1)
213
+ expect(options.b).to be_nil
214
+ end
215
+
216
+ it 'works with hash with sub object' do
217
+ options = ParentOptions.from a: 1, c: { sub_a: 1 }
218
+ expect(options).to be_a_kind_of(ParentOptions)
219
+ expect(options.a).to eq(1)
220
+ expect(options.b).to be_nil
221
+ expect(options.c).to be_a_kind_of(SubOptions)
222
+ expect(options.c.sub_a).to eq(1)
223
+ end
224
+
225
+ it 'works with deep hash' do
226
+ hash = { b: 1 }
227
+ options = ParentOptions.from a: hash
228
+ expect(options.a[:b]).to eq(1)
229
+
230
+ hash[:b] = 2
231
+ expect(options.a[:b]).to eq(1)
232
+
233
+ options.a[:b] = 3
234
+ expect(hash[:b]).to eq(2)
235
+ expect(options.a[:b]).to eq(3)
236
+ end
237
+
238
+ it 'works with nil' do
239
+ options = ParentOptions.from(nil)
240
+ expect(options).to be_a_kind_of(ParentOptions)
241
+ expect(options.a).to be_nil
242
+ expect(options.b).to be_nil
243
+ end
244
+
245
+ it 'respects inheritance' do
246
+ subclass = Class.new(ParentOptions)
247
+ options = subclass.from(c: { sub_a: 'hello' })
248
+ expect(options.c).to be_a_kind_of(SubOptions)
249
+ expect(options.c.sub_a).to eq('hello')
250
+ end
251
+ end
252
+
253
+ describe '#memoized' do
254
+ subject(:options_class) { Class.new(ParentOptions) }
255
+ it 'requires block' do
256
+ expect { options_class.memoized(:a) }.to raise_error(ArgumentError)
257
+ end
258
+
259
+ it 'accepts block' do
260
+ options_class.memoized(:a) { :foo }
261
+ expect(options_class.new.a).to eql(:foo)
262
+ end
263
+ end
264
+
265
+ describe '#fetch' do
266
+ subject { SubOptions.new }
267
+
268
+ context 'when the fetched key has no value' do
269
+ it 'uses falsey default' do
270
+ expect(subject.fetch(:sub_a, false) { |_| :blah }).to be_falsey
271
+ end
272
+
273
+ it 'accepts block' do
274
+ expect(subject.fetch(:sub_a) { |k| "yo #{k.inspect}" }).to eq('yo :sub_a')
275
+ end
276
+
277
+ it 'needs a default if key is missing' do
278
+ expect { subject.fetch(:sub_a) }.to raise_error(Faraday::Options.fetch_error_class)
279
+ end
280
+ end
281
+
282
+ context 'when the fetched key has a value' do
283
+ before do
284
+ subject.sub_a = 1
285
+ end
286
+
287
+ it 'grabs value' do
288
+ expect(subject.fetch(:sub_a, false) { |_| :blah }).to eq(1)
289
+ end
290
+
291
+ it 'works with key' do
292
+ expect(subject.fetch(:sub_a)).to eq(1)
293
+ end
294
+ end
295
+ end
296
+ end
297
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Faraday::ProxyOptions do
4
+ describe '#from' do
5
+ it 'works with string' do
6
+ options = Faraday::ProxyOptions.from 'http://user:pass@example.org'
7
+ expect(options.user).to eq('user')
8
+ expect(options.password).to eq('pass')
9
+ expect(options.uri).to be_a_kind_of(URI)
10
+ expect(options.path).to eq('')
11
+ expect(options.port).to eq(80)
12
+ expect(options.host).to eq('example.org')
13
+ expect(options.scheme).to eq('http')
14
+ expect(options.inspect).to match('#<Faraday::ProxyOptions uri=')
15
+ end
16
+
17
+ it 'defaults to http' do
18
+ options = Faraday::ProxyOptions.from 'example.org'
19
+ expect(options.port).to eq(80)
20
+ expect(options.host).to eq('example.org')
21
+ expect(options.scheme).to eq('http')
22
+ end
23
+
24
+ it 'works with nil' do
25
+ options = Faraday::ProxyOptions.from nil
26
+ expect(options).to be_a_kind_of(Faraday::ProxyOptions)
27
+ expect(options.inspect).to eq('#<Faraday::ProxyOptions (empty)>')
28
+ end
29
+
30
+ it 'works with no auth' do
31
+ proxy = Faraday::ProxyOptions.from 'http://example.org'
32
+ expect(proxy.user).to be_nil
33
+ expect(proxy.password).to be_nil
34
+ end
35
+
36
+ it 'treats empty string as nil' do
37
+ proxy = nil
38
+ proxy_string = proxy.to_s # => empty string
39
+ options = Faraday::ProxyOptions.from proxy_string
40
+ expect(options).to be_a_kind_of(Faraday::ProxyOptions)
41
+ expect(options.inspect).to eq('#<Faraday::ProxyOptions (empty)>')
42
+ end
43
+ end
44
+
45
+ it 'allows hash access' do
46
+ proxy = Faraday::ProxyOptions.from 'http://a%40b:pw%20d@example.org'
47
+ expect(proxy.user).to eq('a@b')
48
+ expect(proxy[:user]).to eq('a@b')
49
+ expect(proxy.password).to eq('pw d')
50
+ expect(proxy[:password]).to eq('pw d')
51
+ end
52
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Faraday::RequestOptions do
4
+ subject(:options) { Faraday::RequestOptions.new }
5
+
6
+ it 'allows to set the request proxy' do
7
+ expect(options.proxy).to be_nil
8
+
9
+ expect { options[:proxy] = { booya: 1 } }.to raise_error(NoMethodError)
10
+
11
+ options[:proxy] = { user: 'user' }
12
+ expect(options.proxy).to be_a_kind_of(Faraday::ProxyOptions)
13
+ expect(options.proxy.user).to eq('user')
14
+
15
+ options.proxy = nil
16
+ expect(options.proxy).to be_nil
17
+ expect(options.inspect).to eq('#<Faraday::RequestOptions (empty)>')
18
+ end
19
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rack/utils'
4
+
5
+ RSpec.describe Faraday::FlatParamsEncoder do
6
+ it_behaves_like 'a params encoder'
7
+
8
+ it 'decodes arrays' do
9
+ query = 'a=one&a=two&a=three'
10
+ expected = { 'a' => %w[one two three] }
11
+ expect(subject.decode(query)).to eq(expected)
12
+ end
13
+
14
+ it 'decodes boolean values' do
15
+ query = 'a=true&b=false'
16
+ expected = { 'a' => 'true', 'b' => 'false' }
17
+ expect(subject.decode(query)).to eq(expected)
18
+ end
19
+
20
+ it 'encodes boolean values' do
21
+ params = { a: true, b: false }
22
+ expect(subject.encode(params)).to eq('a=true&b=false')
23
+ end
24
+
25
+ it 'encodes boolean values in array' do
26
+ params = { a: [true, false] }
27
+ expect(subject.encode(params)).to eq('a=true&a=false')
28
+ end
29
+
30
+ it 'encodes empty array in hash' do
31
+ params = { a: [] }
32
+ expect(subject.encode(params)).to eq('a=')
33
+ end
34
+
35
+ it 'encodes unsorted when asked' do
36
+ params = { b: false, a: true }
37
+ expect(subject.encode(params)).to eq('a=true&b=false')
38
+ Faraday::FlatParamsEncoder.sort_params = false
39
+ expect(subject.encode(params)).to eq('b=false&a=true')
40
+ Faraday::FlatParamsEncoder.sort_params = true
41
+ end
42
+ end
@@ -0,0 +1,151 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rack/utils'
4
+
5
+ RSpec.describe Faraday::NestedParamsEncoder do
6
+ it_behaves_like 'a params encoder'
7
+
8
+ it 'decodes arrays' do
9
+ query = 'a[1]=one&a[2]=two&a[3]=three'
10
+ expected = { 'a' => %w[one two three] }
11
+ expect(subject.decode(query)).to eq(expected)
12
+ end
13
+
14
+ it 'decodes hashes' do
15
+ query = 'a[b1]=one&a[b2]=two&a[b][c]=foo'
16
+ expected = { 'a' => { 'b1' => 'one', 'b2' => 'two', 'b' => { 'c' => 'foo' } } }
17
+ expect(subject.decode(query)).to eq(expected)
18
+ end
19
+
20
+ it 'decodes nested arrays rack compat' do
21
+ query = 'a[][one]=1&a[][two]=2&a[][one]=3&a[][two]=4'
22
+ expected = Rack::Utils.parse_nested_query(query)
23
+ expect(subject.decode(query)).to eq(expected)
24
+ end
25
+
26
+ it 'decodes nested array mixed types' do
27
+ query = 'a[][one]=1&a[]=2&a[]=&a[]'
28
+ expected = Rack::Utils.parse_nested_query(query)
29
+ expect(subject.decode(query)).to eq(expected)
30
+ end
31
+
32
+ it 'decodes nested ignores invalid array' do
33
+ query = '[][a]=1&b=2'
34
+ expected = { 'a' => '1', 'b' => '2' }
35
+ expect(subject.decode(query)).to eq(expected)
36
+ end
37
+
38
+ it 'decodes nested ignores repeated array notation' do
39
+ query = 'a[][][]=1'
40
+ expected = { 'a' => ['1'] }
41
+ expect(subject.decode(query)).to eq(expected)
42
+ end
43
+
44
+ it 'decodes nested ignores malformed keys' do
45
+ query = '=1&[]=2'
46
+ expected = {}
47
+ expect(subject.decode(query)).to eq(expected)
48
+ end
49
+
50
+ it 'decodes nested subkeys dont have to be in brackets' do
51
+ query = 'a[b]c[d]e=1'
52
+ expected = { 'a' => { 'b' => { 'c' => { 'd' => { 'e' => '1' } } } } }
53
+ expect(subject.decode(query)).to eq(expected)
54
+ end
55
+
56
+ it 'decodes nested final value overrides any type' do
57
+ query = 'a[b][c]=1&a[b]=2'
58
+ expected = { 'a' => { 'b' => '2' } }
59
+ expect(subject.decode(query)).to eq(expected)
60
+ end
61
+
62
+ it 'encodes rack compat' do
63
+ params = { a: [{ one: '1', two: '2' }, '3', ''] }
64
+ result = Faraday::Utils.unescape(Faraday::NestedParamsEncoder.encode(params)).split('&')
65
+ escaped = Rack::Utils.build_nested_query(params)
66
+ expected = Rack::Utils.unescape(escaped).split('&')
67
+ expect(result).to match_array(expected)
68
+ end
69
+
70
+ it 'encodes empty string array value' do
71
+ expected = 'baz=&foo%5Bbar%5D='
72
+ result = Faraday::NestedParamsEncoder.encode(foo: { bar: '' }, baz: '')
73
+ expect(result).to eq(expected)
74
+ end
75
+
76
+ it 'encodes nil array value' do
77
+ expected = 'baz&foo%5Bbar%5D'
78
+ result = Faraday::NestedParamsEncoder.encode(foo: { bar: nil }, baz: nil)
79
+ expect(result).to eq(expected)
80
+ end
81
+
82
+ it 'encodes empty array value' do
83
+ expected = 'baz%5B%5D&foo%5Bbar%5D%5B%5D'
84
+ result = Faraday::NestedParamsEncoder.encode(foo: { bar: [] }, baz: [])
85
+ expect(result).to eq(expected)
86
+ end
87
+
88
+ it 'encodes boolean values' do
89
+ params = { a: true, b: false }
90
+ expect(subject.encode(params)).to eq('a=true&b=false')
91
+ end
92
+
93
+ it 'encodes boolean values in array' do
94
+ params = { a: [true, false] }
95
+ expect(subject.encode(params)).to eq('a%5B%5D=true&a%5B%5D=false')
96
+ end
97
+
98
+ it 'encodes unsorted when asked' do
99
+ params = { b: false, a: true }
100
+ expect(subject.encode(params)).to eq('a=true&b=false')
101
+ Faraday::NestedParamsEncoder.sort_params = false
102
+ expect(subject.encode(params)).to eq('b=false&a=true')
103
+ Faraday::NestedParamsEncoder.sort_params = true
104
+ end
105
+
106
+ it 'encodes arrays indices when asked' do
107
+ params = { a: [0, 1, 2] }
108
+ expect(subject.encode(params)).to eq('a%5B%5D=0&a%5B%5D=1&a%5B%5D=2')
109
+ Faraday::NestedParamsEncoder.array_indices = true
110
+ expect(subject.encode(params)).to eq('a%5B0%5D=0&a%5B1%5D=1&a%5B2%5D=2')
111
+ Faraday::NestedParamsEncoder.array_indices = false
112
+ end
113
+
114
+ shared_examples 'a wrong decoding' do
115
+ it do
116
+ expect { subject.decode(query) }.to raise_error(TypeError) do |e|
117
+ expect(e.message).to eq(error_message)
118
+ end
119
+ end
120
+ end
121
+
122
+ context 'when expecting hash but getting string' do
123
+ let(:query) { 'a=1&a[b]=2' }
124
+ let(:error_message) { "expected Hash (got String) for param `a'" }
125
+ it_behaves_like 'a wrong decoding'
126
+ end
127
+
128
+ context 'when expecting hash but getting array' do
129
+ let(:query) { 'a[]=1&a[b]=2' }
130
+ let(:error_message) { "expected Hash (got Array) for param `a'" }
131
+ it_behaves_like 'a wrong decoding'
132
+ end
133
+
134
+ context 'when expecting nested hash but getting non nested' do
135
+ let(:query) { 'a[b]=1&a[b][c]=2' }
136
+ let(:error_message) { "expected Hash (got String) for param `b'" }
137
+ it_behaves_like 'a wrong decoding'
138
+ end
139
+
140
+ context 'when expecting array but getting hash' do
141
+ let(:query) { 'a[b]=1&a[]=2' }
142
+ let(:error_message) { "expected Array (got Hash) for param `a'" }
143
+ it_behaves_like 'a wrong decoding'
144
+ end
145
+
146
+ context 'when expecting array but getting string' do
147
+ let(:query) { 'a=1&a[]=2' }
148
+ let(:error_message) { "expected Array (got String) for param `a'" }
149
+ it_behaves_like 'a wrong decoding'
150
+ end
151
+ end