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,86 @@
1
+ #--
2
+ #
3
+ # Author:: Nathaniel Talbott.
4
+ # Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
5
+ # License:: Ruby license.
6
+
7
+ require 'test/unit/util/procwrapper'
8
+
9
+ module Test
10
+ module Unit
11
+ module Util
12
+
13
+ # This is a utility class that allows anything mixing
14
+ # it in to notify a set of listeners about interesting
15
+ # events.
16
+ module Observable
17
+ # We use this for defaults since nil might mean something
18
+ NOTHING = "NOTHING/#{__id__}"
19
+
20
+ # Adds the passed proc as a listener on the
21
+ # channel indicated by channel_name. listener_key
22
+ # is used to remove the listener later; if none is
23
+ # specified, the proc itself is used.
24
+ #
25
+ # Whatever is used as the listener_key is
26
+ # returned, making it very easy to use the proc
27
+ # itself as the listener_key:
28
+ #
29
+ # listener = add_listener("Channel") { ... }
30
+ # remove_listener("Channel", listener)
31
+ def add_listener(channel_name, listener_key=NOTHING, &listener) # :yields: value
32
+ unless(block_given?)
33
+ raise ArgumentError.new("No callback was passed as a listener")
34
+ end
35
+
36
+ key = listener_key
37
+ if (listener_key == NOTHING)
38
+ listener_key = listener
39
+ key = ProcWrapper.new(listener)
40
+ end
41
+
42
+ channels[channel_name] ||= {}
43
+ channels[channel_name][key] = listener
44
+ return listener_key
45
+ end
46
+
47
+ # Removes the listener indicated by listener_key
48
+ # from the channel indicated by
49
+ # channel_name. Returns the registered proc, or
50
+ # nil if none was found.
51
+ def remove_listener(channel_name, listener_key)
52
+ channel = channels[channel_name]
53
+ return nil unless (channel)
54
+ key = listener_key
55
+ if (listener_key.instance_of?(Proc))
56
+ key = ProcWrapper.new(listener_key)
57
+ end
58
+ return channel.delete(key)
59
+ end
60
+
61
+ # Calls all the procs registered on the channel
62
+ # indicated by channel_name. If value is
63
+ # specified, it is passed in to the procs,
64
+ # otherwise they are called with no arguments.
65
+ #
66
+ #--
67
+ #
68
+ # Perhaps this should be private? Would it ever
69
+ # make sense for an external class to call this
70
+ # method directly?
71
+ def notify_listeners(channel_name, *arguments)
72
+ channel = channels[channel_name]
73
+ return 0 unless (channel)
74
+ channel.each_value { |listener| listener.call(*arguments) }
75
+ return channel.size
76
+ end
77
+
78
+ private
79
+ def channels
80
+ @channels ||= {}
81
+ return @channels
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,32 @@
1
+ module Test
2
+ module Unit
3
+ module Util
4
+ module Output
5
+ ##
6
+ # Returns output for standard output and standard
7
+ # error as string.
8
+ #
9
+ # Example:
10
+ #
11
+ # capture_output do
12
+ # puts("stdout")
13
+ # warn("stderr")
14
+ # end # -> ["stdout\n", "stderr\n"]
15
+ def capture_output
16
+ require 'stringio'
17
+
18
+ output = StringIO.new
19
+ error = StringIO.new
20
+ stdout_save, stderr_save = $stdout, $stderr
21
+ $stdout, $stderr = output, error
22
+ begin
23
+ yield
24
+ [output.string, error.string]
25
+ ensure
26
+ $stdout, $stderr = stdout_save, stderr_save
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,48 @@
1
+ #--
2
+ #
3
+ # Author:: Nathaniel Talbott.
4
+ # Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
5
+ # License:: Ruby license.
6
+
7
+ module Test
8
+ module Unit
9
+ module Util
10
+
11
+ # Allows the storage of a Proc passed through '&' in a
12
+ # hash.
13
+ #
14
+ # Note: this may be inefficient, since the hash being
15
+ # used is not necessarily very good. In Observable,
16
+ # efficiency is not too important, since the hash is
17
+ # only accessed when adding and removing listeners,
18
+ # not when notifying.
19
+
20
+ class ProcWrapper
21
+
22
+ # Creates a new wrapper for a_proc.
23
+ def initialize(a_proc)
24
+ @a_proc = a_proc
25
+ @hash = a_proc.inspect.sub(/^(#<#{a_proc.class}:)/){''}.sub(/(>)$/){''}.hex
26
+ end
27
+
28
+ def hash
29
+ return @hash
30
+ end
31
+
32
+ def ==(other)
33
+ case(other)
34
+ when ProcWrapper
35
+ return @a_proc == other.to_proc
36
+ else
37
+ return super
38
+ end
39
+ end
40
+ alias :eql? :==
41
+
42
+ def to_proc
43
+ return @a_proc
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,5 @@
1
+ module Test
2
+ module Unit
3
+ VERSION = "3.6.7"
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ if defined?(Warning) and Warning.respond_to?(:[]=)
2
+ Warning[:deprecated] = true
3
+ end
@@ -0,0 +1,521 @@
1
+ require "test/unit/warning"
2
+
3
+ require 'test/unit/testcase'
4
+ require 'test/unit/autorunner'
5
+
6
+ module Test # :nodoc:
7
+ #
8
+ # # Test::Unit - Ruby Unit Testing Framework
9
+ #
10
+ # ## Introduction
11
+ #
12
+ # Unit testing is making waves all over the place, largely due to the
13
+ # fact that it is a core practice of XP. While XP is great, unit testing
14
+ # has been around for a long time and has always been a good idea. One
15
+ # of the keys to good unit testing, though, is not just writing tests,
16
+ # but having tests. What's the difference? Well, if you just _write_ a
17
+ # test and throw it away, you have no guarantee that something won't
18
+ # change later which breaks your code. If, on the other hand, you _have_
19
+ # tests (obviously you have to write them first), and run them as often
20
+ # as possible, you slowly build up a wall of things that cannot break
21
+ # without you immediately knowing about it. This is when unit testing
22
+ # hits its peak usefulness.
23
+ #
24
+ # Enter Test::Unit, a framework for unit testing in Ruby, helping you to
25
+ # design, debug and evaluate your code by making it easy to write and
26
+ # have tests for it.
27
+ #
28
+ #
29
+ # ## Notes
30
+ #
31
+ # Test::Unit has grown out of and superceded Lapidary.
32
+ #
33
+ #
34
+ # ## Feedback
35
+ #
36
+ # I like (and do my best to practice) XP, so I value early releases,
37
+ # user feedback, and clean, simple, expressive code. There is always
38
+ # room for improvement in everything I do, and Test::Unit is no
39
+ # exception. Please, let me know what you think of Test::Unit as it
40
+ # stands, and what you'd like to see expanded/changed/improved/etc. If
41
+ # you find a bug, let me know ASAP; one good way to let me know what the
42
+ # bug is is to submit a new test that catches it :-) Also, I'd love to
43
+ # hear about any successes you have with Test::Unit, and any
44
+ # documentation you might add will be greatly appreciated. My contact
45
+ # info is below.
46
+ #
47
+ #
48
+ # ## Contact Information
49
+ #
50
+ # * [GitHub issues on
51
+ # test-unit/test-unit](https://github.com/test-unit/test-unit/issues):
52
+ # If you have any issues, please report them to here.
53
+ #
54
+ # * [GitHub pull requests on
55
+ # test-unit/test-unit](https://github.com/test-unit/test-unit/pulls):
56
+ # If you have any patches, please report them to here.
57
+ #
58
+ # * [ruby-talk mailing
59
+ # list](https://www.ruby-lang.org/en/community/mailing-lists/):
60
+ # If you have any questions, you can ask them here.
61
+ #
62
+ #
63
+ # ## Credits
64
+ #
65
+ # I'd like to thank...
66
+ #
67
+ # Matz, for a great language!
68
+ #
69
+ # Masaki Suketa, for his work on RubyUnit, which filled a vital need in
70
+ # the Ruby world for a very long time. I'm also grateful for his help in
71
+ # polishing Test::Unit and getting the RubyUnit compatibility layer
72
+ # right. His graciousness in allowing Test::Unit to supercede RubyUnit
73
+ # continues to be a challenge to me to be more willing to defer my own
74
+ # rights.
75
+ #
76
+ # Ken McKinlay, for his interest and work on unit testing, and for his
77
+ # willingness to dialog about it. He was also a great help in pointing
78
+ # out some of the holes in the RubyUnit compatibility layer.
79
+ #
80
+ # Dave Thomas, for the original idea that led to the extremely simple
81
+ # "require 'test/unit'", plus his code to improve it even more by
82
+ # allowing the selection of tests from the command-line. Also, without
83
+ # RDoc, the documentation for Test::Unit would stink a lot more than it
84
+ # does now.
85
+ #
86
+ # Everyone who's helped out with bug reports, feature ideas,
87
+ # encouragement to continue, etc. It's a real privilege to be a part of
88
+ # the Ruby community.
89
+ #
90
+ # The guys at RoleModel Software, for putting up with me repeating, "But
91
+ # this would be so much easier in Ruby!" whenever we're coding in Java.
92
+ #
93
+ # My Creator, for giving me life, and giving it more abundantly.
94
+ #
95
+ #
96
+ # ## License
97
+ #
98
+ # Test::Unit is copyright (c) 2000-2003 Nathaniel Talbott. It is free
99
+ # software, and is distributed under the Ruby license. See the COPYING
100
+ # file.
101
+ #
102
+ # Exception: lib/test/unit/diff.rb is copyright (c)
103
+ # 2008-2010 Kouhei Sutou and 2001-2008 Python Software
104
+ # Foundation. It is free software, and is distributed
105
+ # under the Ruby license and/or the PSF license. See the
106
+ # COPYING file and PSFL file.
107
+ #
108
+ # ## Warranty
109
+ #
110
+ # This software is provided "as is" and without any express or
111
+ # implied warranties, including, without limitation, the implied
112
+ # warranties of merchantibility and fitness for a particular
113
+ # purpose.
114
+ #
115
+ #
116
+ # ## Author
117
+ #
118
+ # Nathaniel Talbott.
119
+ # Copyright (c) 2000-2003, Nathaniel Talbott
120
+ #
121
+ # ----
122
+ #
123
+ # # Usage
124
+ #
125
+ # The general idea behind unit testing is that you write a _test_
126
+ # _method_ that makes certain _assertions_ about your code, working
127
+ # against a _test_ _fixture_. A bunch of these _test_ _methods_ are
128
+ # bundled up into a _test_ _suite_ and can be run any time the
129
+ # developer wants. The results of a run are gathered in a _test_
130
+ # _result_ and displayed to the user through some UI. So, lets break
131
+ # this down and see how Test::Unit provides each of these necessary
132
+ # pieces.
133
+ #
134
+ #
135
+ # ## Assertions
136
+ #
137
+ # These are the heart of the framework. Think of an assertion as a
138
+ # statement of expected outcome, i.e. "I assert that x should be equal
139
+ # to y". If, when the assertion is executed, it turns out to be
140
+ # correct, nothing happens, and life is good. If, on the other hand,
141
+ # your assertion turns out to be false, an error is propagated with
142
+ # pertinent information so that you can go back and make your
143
+ # assertion succeed, and, once again, life is good. For an explanation
144
+ # of the current assertions, see Test::Unit::Assertions.
145
+ #
146
+ #
147
+ # ## Test Method & Test Fixture
148
+ #
149
+ # Obviously, these assertions have to be called within a context that
150
+ # knows about them and can do something meaningful with their
151
+ # pass/fail value. Also, it's handy to collect a bunch of related
152
+ # tests, each test represented by a method, into a common test class
153
+ # that knows how to run them. The tests will be in a separate class
154
+ # from the code they're testing for a couple of reasons. First of all,
155
+ # it allows your code to stay uncluttered with test code, making it
156
+ # easier to maintain. Second, it allows the tests to be stripped out
157
+ # for deployment, since they're really there for you, the developer,
158
+ # and your users don't need them. Third, and most importantly, it
159
+ # allows you to set up a common test fixture for your tests to run
160
+ # against.
161
+ #
162
+ # What's a test fixture? Well, tests do not live in a vacuum; rather,
163
+ # they're run against the code they are testing. Often, a collection
164
+ # of tests will run against a common set of data, also called a
165
+ # fixture. If they're all bundled into the same test class, they can
166
+ # all share the setting up and tearing down of that data, eliminating
167
+ # unnecessary duplication and making it much easier to add related
168
+ # tests.
169
+ #
170
+ # Test::Unit::TestCase wraps up a collection of test methods together
171
+ # and allows you to easily set up and tear down the same test fixture
172
+ # for each test. This is done by overriding #setup and/or #teardown,
173
+ # which will be called before and after each test method that is
174
+ # run. The TestCase also knows how to collect the results of your
175
+ # assertions into a Test::Unit::TestResult, which can then be reported
176
+ # back to you... but I'm getting ahead of myself. To write a test,
177
+ # follow these steps:
178
+ #
179
+ # * Make sure Test::Unit is in your library path.
180
+ # * require 'test/unit' in your test script.
181
+ # * Create a class that subclasses Test::Unit::TestCase.
182
+ # * Add a method that begins with "test" to your class.
183
+ # * Make assertions in your test method.
184
+ # * Optionally define #setup and/or #teardown to set up and/or tear
185
+ # down your common test fixture.
186
+ # * You can now run your test as you would any other Ruby
187
+ # script... try it and see!
188
+ #
189
+ # A really simple test might look like this (#setup and #teardown are
190
+ # commented out to indicate that they are completely optional):
191
+ #
192
+ # require 'test/unit'
193
+ #
194
+ # class MyTest < Test::Unit::TestCase
195
+ # # def setup
196
+ # # end
197
+ #
198
+ # # def teardown
199
+ # # end
200
+ #
201
+ # def test_fail
202
+ # assert(false, 'Assertion was false.')
203
+ # end
204
+ # end
205
+ #
206
+ #
207
+ # ## Test Runners
208
+ #
209
+ # So, now you have this great test class, but you still
210
+ # need a way to run it and view any failures that occur
211
+ # during the run. There are some test runner; console test
212
+ # runner, GTK+ test runner and so on. The console test
213
+ # runner is automatically invoked for you if you require
214
+ # 'test/unit' and simply run the file. To use another
215
+ # runner simply set default test runner ID to
216
+ # Test::Unit::AutoRunner:
217
+ #
218
+ # require 'test/unit'
219
+ # Test::Unit::AutoRunner.default_runner = "gtk2"
220
+ #
221
+ # ## Test Suite
222
+ #
223
+ # As more and more unit tests accumulate for a given project, it
224
+ # becomes a real drag running them one at a time, and it also
225
+ # introduces the potential to overlook a failing test because you
226
+ # forget to run it. Suddenly it becomes very handy that the
227
+ # TestRunners can take any object that returns a Test::Unit::TestSuite
228
+ # in response to a suite method. The TestSuite can, in turn, contain
229
+ # other TestSuites or individual tests (typically created by a
230
+ # TestCase). In other words, you can easily wrap up a group of
231
+ # TestCases and TestSuites.
232
+ #
233
+ # Test::Unit does a little bit more for you, by wrapping
234
+ # these up automatically when you require
235
+ # 'test/unit'. What does this mean? It means you could
236
+ # write the above test case like this instead:
237
+ #
238
+ # require 'test/unit'
239
+ # require 'test_myfirsttests'
240
+ # require 'test_moretestsbyme'
241
+ # require 'test_anothersetoftests'
242
+ #
243
+ # Test::Unit is smart enough to find all the test cases existing in
244
+ # the ObjectSpace and wrap them up into a suite for you. It then runs
245
+ # the dynamic suite using the console TestRunner.
246
+ #
247
+ #
248
+ # ## Configuration file
249
+ #
250
+ # Test::Unit reads 'test-unit.yml' in the current working
251
+ # directory as Test::Unit's configuration file. It can
252
+ # contain the following configurations:
253
+ #
254
+ # * color scheme definitions
255
+ # * test runner to be used
256
+ # * test runner options
257
+ # * test collector to be used
258
+ #
259
+ # Except color scheme definitions, all of them are
260
+ # specified by command line option.
261
+ #
262
+ # Here are sample color scheme definitions:
263
+ #
264
+ # color_schemes:
265
+ # inverted:
266
+ # success:
267
+ # name: red
268
+ # bold: true
269
+ # failure:
270
+ # name: green
271
+ # bold: true
272
+ # other_scheme:
273
+ # ...
274
+ #
275
+ # Here are the syntax of color scheme definitions:
276
+ #
277
+ # color_schemes:
278
+ # SCHEME_NAME:
279
+ # EVENT_NAME:
280
+ # name: COLOR_NAME
281
+ # intensity: BOOLEAN
282
+ # bold: BOOLEAN
283
+ # italic: BOOLEAN
284
+ # underline: BOOLEAN
285
+ # ...
286
+ # ...
287
+ #
288
+ # SCHEME_NAME
289
+ # : the name of the color scheme
290
+ #
291
+ # EVENT_NAME
292
+ # : one of [success, failure, pending, omission, notification, error]
293
+ #
294
+ # COLOR_NAME
295
+ # : one of [black, red, green, yellow, blue, magenta, cyan, white]
296
+ #
297
+ # BOOLEAN
298
+ # : true or false
299
+ #
300
+ # You can use the above 'inverted' color scheme with the
301
+ # following configuration:
302
+ #
303
+ # runner: console
304
+ # console_options:
305
+ # color_scheme: inverted
306
+ # color_schemes:
307
+ # inverted:
308
+ # success:
309
+ # name: red
310
+ # bold: true
311
+ # failure:
312
+ # name: green
313
+ # bold: true
314
+ #
315
+ # ## Questions?
316
+ #
317
+ # I'd really like to get feedback from all levels of Ruby
318
+ # practitioners about typos, grammatical errors, unclear statements,
319
+ # missing points, etc., in this document (or any other).
320
+ #
321
+
322
+ module Unit
323
+ class << self
324
+ # Set true when Test::Unit has run. If set to true Test::Unit
325
+ # will not automatically run at exit.
326
+ #
327
+ # @deprecated Use {Test::Unit::AutoRunner.need_auto_run=} instead.
328
+ def run=(have_run)
329
+ AutoRunner.need_auto_run = (not have_run)
330
+ end
331
+
332
+ # Already tests have run?
333
+ #
334
+ # @deprecated Use {Test::Unit::AutoRunner.need_auto_run?} instead.
335
+ def run?
336
+ not AutoRunner.need_auto_run?
337
+ end
338
+
339
+ # @api private
340
+ @@at_start_hooks = []
341
+
342
+ # Register a hook that is run before running tests.
343
+ # To register multiple hooks, call this method multiple times.
344
+ #
345
+ # Here is an example test case:
346
+ #
347
+ # Test::Unit.at_start do
348
+ # # ...
349
+ # end
350
+ #
351
+ # class TestMyClass1 < Test::Unit::TestCase
352
+ # class << self
353
+ # def startup
354
+ # # ...
355
+ # end
356
+ # end
357
+ #
358
+ # def setup
359
+ # # ...
360
+ # end
361
+ #
362
+ # def test_my_class1
363
+ # # ...
364
+ # end
365
+ #
366
+ # def test_my_class2
367
+ # # ...
368
+ # end
369
+ # end
370
+ #
371
+ # class TestMyClass2 < Test::Unit::TestCase
372
+ # class << self
373
+ # def startup
374
+ # # ...
375
+ # end
376
+ # end
377
+ #
378
+ # def setup
379
+ # # ...
380
+ # end
381
+ #
382
+ # def test_my_class1
383
+ # # ...
384
+ # end
385
+ #
386
+ # def test_my_class2
387
+ # # ...
388
+ # end
389
+ # end
390
+ #
391
+ # Here is a call order:
392
+ #
393
+ # * at_start
394
+ # * TestMyClass1.startup
395
+ # * TestMyClass1#setup
396
+ # * TestMyClass1#test_my_class1
397
+ # * TestMyClass1#setup
398
+ # * TestMyClass1#test_my_class2
399
+ # * TestMyClass2#setup
400
+ # * TestMyClass2#test_my_class1
401
+ # * TestMyClass2#setup
402
+ # * TestMyClass2#test_my_class2
403
+ #
404
+ # @example
405
+ # Test::Unit.at_start do
406
+ # puts "Start!"
407
+ # end
408
+ #
409
+ # @yield A block that is run before running tests.
410
+ # @yieldreturn [void]
411
+ # @return [void]
412
+ #
413
+ # @since 2.5.2
414
+ def at_start(&hook)
415
+ @@at_start_hooks << hook
416
+ end
417
+
418
+ # @api private
419
+ def run_at_start_hooks
420
+ @@at_start_hooks.each do |hook|
421
+ hook.call
422
+ end
423
+ end
424
+
425
+ # @api private
426
+ @@at_exit_hooks = []
427
+
428
+ # Register a hook that is run after running tests.
429
+ # To register multiple hooks, call this method multiple times.
430
+ #
431
+ # Here is an example test case:
432
+ #
433
+ # Test::Unit.at_exit do
434
+ # # ...
435
+ # end
436
+ #
437
+ # class TestMyClass1 < Test::Unit::TestCase
438
+ # class << self
439
+ # def shutdown
440
+ # # ...
441
+ # end
442
+ # end
443
+ #
444
+ # def teardown
445
+ # # ...
446
+ # end
447
+ #
448
+ # def test_my_class1
449
+ # # ...
450
+ # end
451
+ #
452
+ # def test_my_class2
453
+ # # ...
454
+ # end
455
+ # end
456
+ #
457
+ # class TestMyClass2 < Test::Unit::TestCase
458
+ # class << self
459
+ # def shutdown
460
+ # # ...
461
+ # end
462
+ # end
463
+ #
464
+ # def teardown
465
+ # # ...
466
+ # end
467
+ #
468
+ # def test_my_class1
469
+ # # ...
470
+ # end
471
+ #
472
+ # def test_my_class2
473
+ # # ...
474
+ # end
475
+ # end
476
+ #
477
+ # Here is a call order:
478
+ #
479
+ # * TestMyClass1#test_my_class1
480
+ # * TestMyClass1#teardown
481
+ # * TestMyClass1#test_my_class2
482
+ # * TestMyClass1#teardown
483
+ # * TestMyClass1.shutdown
484
+ # * TestMyClass2#test_my_class1
485
+ # * TestMyClass2#teardown
486
+ # * TestMyClass2#test_my_class2
487
+ # * TestMyClass2#teardown
488
+ # * TestMyClass2.shutdown
489
+ # * at_exit
490
+ #
491
+ # @example
492
+ # Test::Unit.at_exit do
493
+ # puts "Exit!"
494
+ # end
495
+ #
496
+ # @yield A block that is run after running tests.
497
+ # @yieldreturn [void]
498
+ # @return [void]
499
+ #
500
+ # @since 2.5.2
501
+ def at_exit(&hook)
502
+ @@at_exit_hooks << hook
503
+ end
504
+
505
+ # @api private
506
+ def run_at_exit_hooks
507
+ @@at_exit_hooks.each do |hook|
508
+ hook.call
509
+ end
510
+ end
511
+ end
512
+ end
513
+ end
514
+
515
+ Module.new do
516
+ at_exit do
517
+ if $!.nil? and Test::Unit::AutoRunner.need_auto_run?
518
+ exit Test::Unit::AutoRunner.run
519
+ end
520
+ end
521
+ end