es_cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.bundle/config +2 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +12 -0
- data/exe/es +8 -0
- data/lib/es_cli/cli.rb +247 -0
- data/lib/es_cli/version.rb +5 -0
- data/lib/es_cli.rb +11 -0
- data/readme.org +78 -0
- data/sig/es_cli.rbs +4 -0
- data/vendor/bundle/ruby/3.1.0/bin/rake +29 -0
- data/vendor/bundle/ruby/3.1.0/bin/thor +29 -0
- data/vendor/bundle/ruby/3.1.0/cache/event_stream_parser-1.0.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/faraday-2.12.2.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/faraday-multipart-1.1.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/faraday-net_http-3.4.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/json-2.9.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/logger-1.6.5.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/multipart-post-2.4.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/net-http-0.6.0.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/power_assert-2.0.5.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/rake-13.2.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/ruby-openai-7.3.1.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/test-unit-3.6.7.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/thor-1.3.2.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/cache/uri-1.0.2.gem +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/gem.build_complete +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/gem_make.out +22 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/json/ext/generator.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/json/ext/parser.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-23/3.1.0/json-2.9.1/mkmf.log +208 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/README.md +99 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/lib/event_stream_parser/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/event_stream_parser-1.0.0/lib/event_stream_parser.rb +222 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/CHANGELOG.md +574 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/README.md +67 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/Rakefile +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/examples/client_spec.rb +119 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/examples/client_test.rb +144 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter/test.rb +311 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter.rb +101 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/adapter_registry.rb +30 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/connection.rb +564 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/encoders/flat_params_encoder.rb +105 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/encoders/nested_params_encoder.rb +183 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/error.rb +165 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/logging/formatter.rb +118 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/methods.rb +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/middleware.rb +72 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/middleware_registry.rb +83 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/connection_options.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/env.rb +204 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/proxy_options.rb +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/request_options.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options/ssl_options.rb +73 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/options.rb +219 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/parameters.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/rack_builder.rb +251 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/authorization.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/instrumentation.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/json.rb +70 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request/url_encoded.rb +60 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/request.rb +139 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/json.rb +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/logger.rb +37 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response/raise_error.rb +83 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/response.rb +91 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils/headers.rb +150 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils/params_hash.rb +61 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/utils.rb +121 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/lib/faraday.rb +157 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/external_adapters/faraday_specs_setup.rb +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter/test_spec.rb +442 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter_registry_spec.rb +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/adapter_spec.rb +55 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/connection_spec.rb +808 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/error_spec.rb +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/middleware_registry_spec.rb +31 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/middleware_spec.rb +213 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/env_spec.rb +76 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/options_spec.rb +297 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/proxy_options_spec.rb +52 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/options/request_options_spec.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/params_encoders/flat_spec.rb +42 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/params_encoders/nested_spec.rb +151 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/rack_builder_spec.rb +317 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/authorization_spec.rb +118 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/instrumentation_spec.rb +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/json_spec.rb +199 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request/url_encoded_spec.rb +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/request_spec.rb +110 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/json_spec.rb +206 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/logger_spec.rb +278 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response/raise_error_spec.rb +275 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/response_spec.rb +77 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/utils/headers_spec.rb +109 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday/utils_spec.rb +119 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/faraday_spec.rb +43 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/spec_helper.rb +133 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/disabling_stub.rb +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/fake_safe_buffer.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/faraday_middleware_subclasses.rb +18 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/helper_methods.rb +96 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/adapter.rb +105 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/params_encoder.rb +18 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/shared_examples/request_method.rb +263 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-2.12.2/spec/support/streaming_response_checker.rb +35 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/CHANGELOG.md +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/README.md +170 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/file_part.rb +130 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/middleware.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/param_part.rb +55 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart/version.rb +16 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-multipart-1.1.0/lib/faraday/multipart.rb +26 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/README.md +57 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/adapter/net_http.rb +206 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http/version.rb +7 -0
- data/vendor/bundle/ruby/3.1.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/CHANGES.md +572 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/LEGAL +60 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/README.md +195 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/fbuffer/fbuffer.h +214 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/.sitearchdir.-.json.-.ext.time +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/Makefile +269 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/extconf.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.c +1691 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/generator/generator.o +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/.sitearchdir.-.json.-.ext.time +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/Makefile +269 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/extconf.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.c +3238 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.o +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/ext/json/ext/parser/parser.rl +1465 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/json.gemspec +64 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/bigdecimal.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/complex.rb +51 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/core.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/date.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/date_time.rb +67 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/exception.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/ostruct.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/range.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/rational.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/regexp.rb +48 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/set.rb +48 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/struct.rb +52 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/symbol.rb +47 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/add/time.rb +52 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/common.rb +896 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/generator/state.rb +116 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/generator.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext/parser.bundle +0 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/ext.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/generic_object.rb +75 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/truffle_ruby/generator.rb +629 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/json-2.9.1/lib/json.rb +587 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/dependabot.yml +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/workflows/push_gem.yml +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.github/workflows/test.yml +32 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/.gitignore +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/Gemfile +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/README.md +104 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/Rakefile +30 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/bin/console +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/bin/setup +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/errors.rb +9 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/formatter.rb +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/log_device.rb +241 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/period.rb +47 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/severity.rb +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/lib/logger.rb +761 -0
- data/vendor/bundle/ruby/3.1.0/gems/logger-1.6.5/logger.gemspec +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/changelog.md +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/composite_io.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/composite_read_io.rb +91 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/multipartable.rb +70 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/parts.rb +148 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/upload_io.rb +64 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post/version.rb +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart/post.rb +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipart_post.rb +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/multipartable.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/net/http/post/multipart.rb +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/lib/parts.rb +25 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/license.md +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/multipart-post-2.4.1/readme.md +170 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/Gemfile +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/README.md +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/Rakefile +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/bin/console +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/bin/setup +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/doc/net-http/examples.rdoc +31 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/doc/net-http/included_getters.rdoc +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/exceptions.rb +34 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/generic_request.rb +414 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/header.rb +981 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/proxy_delta.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/request.rb +88 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/requests.rb +430 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/response.rb +738 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/responses.rb +1174 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http/status.rb +84 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/http.rb +2580 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/lib/net/https.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/net-http-0.6.0/net-http.gemspec +39 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.github/dependabot.yml +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.github/workflows/ci.yml +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/.gitignore +9 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/COPYING +57 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/Gemfile +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/LEGAL +4 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/README.md +98 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/Rakefile +59 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/colorize.rb +7 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/configuration.rb +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/context.rb +233 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/enable_tracepoint_events.rb +62 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/inspector.rb +66 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/parser.rb +251 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert/version.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/lib/power_assert.rb +93 -0
- data/vendor/bundle/ruby/3.1.0/gems/power_assert-2.0.5/power_assert.gemspec +24 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/History.rdoc +2403 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/README.rdoc +155 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/exe/rake +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/application.rb +861 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/backtrace.rb +25 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/dsl_definition.rb +196 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_task.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_utils.rb +132 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/file_utils_ext.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/packagetask.rb +222 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task.rb +434 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/task_manager.rb +331 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/testtask.rb +189 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake.rb +70 -0
- data/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/rake.gemspec +101 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.circleci/config.yml +46 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/Dockerfile +16 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/devcontainer.json +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.devcontainer/docker-compose.yml +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/FUNDING.yml +13 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.github/dependabot.yml +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.gitignore +69 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.rspec +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/.rubocop.yml +31 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CHANGELOG.md +467 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CODE_OF_CONDUCT.md +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/CONTRIBUTING.md +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Gemfile +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Gemfile.lock +92 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/LICENSE.txt +21 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/README.md +1381 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/Rakefile +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/bin/console +14 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/bin/setup +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/assistants.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/audio.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/batches.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/client.rb +122 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/compatibility.rb +10 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/files.rb +75 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/finetunes.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/http.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/http_headers.rb +36 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/images.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/messages.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/models.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/run_steps.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/runs.rb +37 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/threads.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_store_file_batches.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_store_files.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_stores.rb +27 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/version.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai.rb +92 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/ruby/openai.rb +2 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/pull_request_template.md +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/ruby-openai.gemspec +32 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/BSDL +24 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/COPYING +64 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/PSFL +271 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/README.md +108 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/Rakefile +74 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/getting-started.md +246 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/how-to.md +90 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/doc/text/news.md +1853 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertion-failed-error.rb +60 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb +2541 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/attribute-matcher.rb +26 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/attribute.rb +228 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/auto-runner-loader.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/autorunner.rb +629 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/code-snippet-fetcher.rb +58 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/descendant.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/dir.rb +110 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/load.rb +201 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/objectspace.rb +35 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector/xml.rb +249 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/collector.rb +104 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/color-scheme.rb +225 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/color.rb +134 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/data-sets.rb +127 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/data.rb +371 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/diff.rb +745 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/error.rb +158 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/exception-handler.rb +82 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/failure.rb +169 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fault-location-detector.rb +104 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb +304 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/notification.rb +138 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/omission.rb +198 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/pending.rb +155 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/priority.rb +194 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/console.rb +86 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/emacs.rb +8 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/runner/xml.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/sub-test-result.rb +59 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-creator.rb +103 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb +128 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-thread-runner.rb +69 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb +963 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testresult.rb +132 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testsuite.rb +108 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/outputlevel.rb +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/testrunner.rb +891 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/emacs/testrunner.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunner.rb +53 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnermediator.rb +119 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/ui/xml/testrunner.rb +224 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/backtracefilter.rb +59 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/memory-usage.rb +47 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/method-owner-finder.rb +28 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/observable.rb +86 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/output.rb +32 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/util/procwrapper.rb +48 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/version.rb +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit/warning.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test/unit.rb +521 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/lib/test-unit.rb +19 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/adder.rb +13 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/subtracter.rb +12 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_adder.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_subtracter.rb +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/test-unit-3.6.7/sample/test_user.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/.document +5 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/CONTRIBUTING.md +15 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/README.md +45 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/bin/thor +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/create_file.rb +105 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/create_link.rb +61 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/directory.rb +108 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/empty_directory.rb +143 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/file_manipulation.rb +371 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions/inject_into_file.rb +130 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/actions.rb +340 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/base.rb +825 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/command.rb +151 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/core_ext/hash_with_indifferent_access.rb +107 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/error.rb +106 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/group.rb +292 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/invocation.rb +178 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor/basic.rb +37 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor/readline.rb +88 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/line_editor.rb +17 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/nested_context.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/argument.rb +86 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/arguments.rb +195 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/option.rb +178 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser/options.rb +294 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/parser.rb +4 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/rake_compat.rb +72 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/runner.rb +335 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/basic.rb +388 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/color.rb +115 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/column_printer.rb +29 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/html.rb +84 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/lcs_diff.rb +49 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/table_printer.rb +118 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/terminal.rb +42 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell/wrapped_printer.rb +38 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/shell.rb +81 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/util.rb +285 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor/version.rb +3 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/lib/thor.rb +674 -0
- data/vendor/bundle/ruby/3.1.0/gems/thor-1.3.2/thor.gemspec +33 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/BSDL +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/COPYING +56 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/README.md +55 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/common.rb +876 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/file.rb +100 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ftp.rb +267 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/generic.rb +1578 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/http.rb +125 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/https.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ldap.rb +261 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ldaps.rb +22 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/mailto.rb +293 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/rfc2396_parser.rb +546 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/rfc3986_parser.rb +206 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/version.rb +6 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/ws.rb +83 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri/wss.rb +23 -0
- data/vendor/bundle/ruby/3.1.0/gems/uri-1.0.2/lib/uri.rb +104 -0
- data/vendor/bundle/ruby/3.1.0/specifications/event_stream_parser-1.0.0.gemspec +23 -0
- data/vendor/bundle/ruby/3.1.0/specifications/faraday-2.12.2.gemspec +0 -0
- data/vendor/bundle/ruby/3.1.0/specifications/faraday-multipart-1.1.0.gemspec +32 -0
- data/vendor/bundle/ruby/3.1.0/specifications/faraday-net_http-3.4.0.gemspec +32 -0
- data/vendor/bundle/ruby/3.1.0/specifications/json-2.9.1.gemspec +0 -0
- data/vendor/bundle/ruby/3.1.0/specifications/logger-1.6.5.gemspec +22 -0
- data/vendor/bundle/ruby/3.1.0/specifications/multipart-post-2.4.1.gemspec +21 -0
- data/vendor/bundle/ruby/3.1.0/specifications/net-http-0.6.0.gemspec +33 -0
- data/vendor/bundle/ruby/3.1.0/specifications/power_assert-2.0.5.gemspec +24 -0
- data/vendor/bundle/ruby/3.1.0/specifications/rake-13.2.1.gemspec +26 -0
- data/vendor/bundle/ruby/3.1.0/specifications/ruby-openai-7.3.1.gemspec +36 -0
- data/vendor/bundle/ruby/3.1.0/specifications/test-unit-3.6.7.gemspec +31 -0
- data/vendor/bundle/ruby/3.1.0/specifications/thor-1.3.2.gemspec +34 -0
- data/vendor/bundle/ruby/3.1.0/specifications/uri-1.0.2.gemspec +23 -0
- metadata +560 -0
@@ -0,0 +1,674 @@
|
|
1
|
+
require_relative "thor/base"
|
2
|
+
|
3
|
+
class Thor
|
4
|
+
$thor_runner ||= false
|
5
|
+
class << self
|
6
|
+
# Allows for custom "Command" package naming.
|
7
|
+
#
|
8
|
+
# === Parameters
|
9
|
+
# name<String>
|
10
|
+
# options<Hash>
|
11
|
+
#
|
12
|
+
def package_name(name, _ = {})
|
13
|
+
@package_name = name.nil? || name == "" ? nil : name
|
14
|
+
end
|
15
|
+
|
16
|
+
# Sets the default command when thor is executed without an explicit command to be called.
|
17
|
+
#
|
18
|
+
# ==== Parameters
|
19
|
+
# meth<Symbol>:: name of the default command
|
20
|
+
#
|
21
|
+
def default_command(meth = nil)
|
22
|
+
if meth
|
23
|
+
@default_command = meth == :none ? "help" : meth.to_s
|
24
|
+
else
|
25
|
+
@default_command ||= from_superclass(:default_command, "help")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
alias_method :default_task, :default_command
|
29
|
+
|
30
|
+
# Registers another Thor subclass as a command.
|
31
|
+
#
|
32
|
+
# ==== Parameters
|
33
|
+
# klass<Class>:: Thor subclass to register
|
34
|
+
# command<String>:: Subcommand name to use
|
35
|
+
# usage<String>:: Short usage for the subcommand
|
36
|
+
# description<String>:: Description for the subcommand
|
37
|
+
def register(klass, subcommand_name, usage, description, options = {})
|
38
|
+
if klass <= Thor::Group
|
39
|
+
desc usage, description, options
|
40
|
+
define_method(subcommand_name) { |*args| invoke(klass, args) }
|
41
|
+
else
|
42
|
+
desc usage, description, options
|
43
|
+
subcommand subcommand_name, klass
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Defines the usage and the description of the next command.
|
48
|
+
#
|
49
|
+
# ==== Parameters
|
50
|
+
# usage<String>
|
51
|
+
# description<String>
|
52
|
+
# options<String>
|
53
|
+
#
|
54
|
+
def desc(usage, description, options = {})
|
55
|
+
if options[:for]
|
56
|
+
command = find_and_refresh_command(options[:for])
|
57
|
+
command.usage = usage if usage
|
58
|
+
command.description = description if description
|
59
|
+
else
|
60
|
+
@usage = usage
|
61
|
+
@desc = description
|
62
|
+
@hide = options[:hide] || false
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Defines the long description of the next command.
|
67
|
+
#
|
68
|
+
# Long description is by default indented, line-wrapped and repeated whitespace merged.
|
69
|
+
# In order to print long description verbatim, with indentation and spacing exactly
|
70
|
+
# as found in the code, use the +wrap+ option
|
71
|
+
#
|
72
|
+
# long_desc 'your very long description', wrap: false
|
73
|
+
#
|
74
|
+
# ==== Parameters
|
75
|
+
# long description<String>
|
76
|
+
# options<Hash>
|
77
|
+
#
|
78
|
+
def long_desc(long_description, options = {})
|
79
|
+
if options[:for]
|
80
|
+
command = find_and_refresh_command(options[:for])
|
81
|
+
command.long_description = long_description if long_description
|
82
|
+
else
|
83
|
+
@long_desc = long_description
|
84
|
+
@long_desc_wrap = options[:wrap] != false
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Maps an input to a command. If you define:
|
89
|
+
#
|
90
|
+
# map "-T" => "list"
|
91
|
+
#
|
92
|
+
# Running:
|
93
|
+
#
|
94
|
+
# thor -T
|
95
|
+
#
|
96
|
+
# Will invoke the list command.
|
97
|
+
#
|
98
|
+
# ==== Parameters
|
99
|
+
# Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command.
|
100
|
+
#
|
101
|
+
def map(mappings = nil, **kw)
|
102
|
+
@map ||= from_superclass(:map, {})
|
103
|
+
|
104
|
+
if mappings && !kw.empty?
|
105
|
+
mappings = kw.merge!(mappings)
|
106
|
+
else
|
107
|
+
mappings ||= kw
|
108
|
+
end
|
109
|
+
if mappings
|
110
|
+
mappings.each do |key, value|
|
111
|
+
if key.respond_to?(:each)
|
112
|
+
key.each { |subkey| @map[subkey] = value }
|
113
|
+
else
|
114
|
+
@map[key] = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
@map
|
120
|
+
end
|
121
|
+
|
122
|
+
# Declares the options for the next command to be declared.
|
123
|
+
#
|
124
|
+
# ==== Parameters
|
125
|
+
# Hash[Symbol => Object]:: The hash key is the name of the option and the value
|
126
|
+
# is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
|
127
|
+
# or :required (string). If you give a value, the type of the value is used.
|
128
|
+
#
|
129
|
+
def method_options(options = nil)
|
130
|
+
@method_options ||= {}
|
131
|
+
build_options(options, @method_options) if options
|
132
|
+
@method_options
|
133
|
+
end
|
134
|
+
|
135
|
+
alias_method :options, :method_options
|
136
|
+
|
137
|
+
# Adds an option to the set of method options. If :for is given as option,
|
138
|
+
# it allows you to change the options from a previous defined command.
|
139
|
+
#
|
140
|
+
# def previous_command
|
141
|
+
# # magic
|
142
|
+
# end
|
143
|
+
#
|
144
|
+
# method_option :foo, :for => :previous_command
|
145
|
+
#
|
146
|
+
# def next_command
|
147
|
+
# # magic
|
148
|
+
# end
|
149
|
+
#
|
150
|
+
# ==== Parameters
|
151
|
+
# name<Symbol>:: The name of the argument.
|
152
|
+
# options<Hash>:: Described below.
|
153
|
+
#
|
154
|
+
# ==== Options
|
155
|
+
# :desc - Description for the argument.
|
156
|
+
# :required - If the argument is required or not.
|
157
|
+
# :default - Default value for this argument. It cannot be required and have default values.
|
158
|
+
# :aliases - Aliases for this option.
|
159
|
+
# :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
|
160
|
+
# :banner - String to show on usage notes.
|
161
|
+
# :hide - If you want to hide this option from the help.
|
162
|
+
#
|
163
|
+
def method_option(name, options = {})
|
164
|
+
unless [ Symbol, String ].any? { |klass| name.is_a?(klass) }
|
165
|
+
raise ArgumentError, "Expected a Symbol or String, got #{name.inspect}"
|
166
|
+
end
|
167
|
+
scope = if options[:for]
|
168
|
+
find_and_refresh_command(options[:for]).options
|
169
|
+
else
|
170
|
+
method_options
|
171
|
+
end
|
172
|
+
|
173
|
+
build_option(name, options, scope)
|
174
|
+
end
|
175
|
+
alias_method :option, :method_option
|
176
|
+
|
177
|
+
# Adds and declares option group for exclusive options in the
|
178
|
+
# block and arguments. You can declare options as the outside of the block.
|
179
|
+
#
|
180
|
+
# If :for is given as option, it allows you to change the options from
|
181
|
+
# a previous defined command.
|
182
|
+
#
|
183
|
+
# ==== Parameters
|
184
|
+
# Array[Thor::Option.name]
|
185
|
+
# options<Hash>:: :for is applied for previous defined command.
|
186
|
+
#
|
187
|
+
# ==== Examples
|
188
|
+
#
|
189
|
+
# exclusive do
|
190
|
+
# option :one
|
191
|
+
# option :two
|
192
|
+
# end
|
193
|
+
#
|
194
|
+
# Or
|
195
|
+
#
|
196
|
+
# option :one
|
197
|
+
# option :two
|
198
|
+
# exclusive :one, :two
|
199
|
+
#
|
200
|
+
# If you give "--one" and "--two" at the same time ExclusiveArgumentsError
|
201
|
+
# will be raised.
|
202
|
+
#
|
203
|
+
def method_exclusive(*args, &block)
|
204
|
+
register_options_relation_for(:method_options,
|
205
|
+
:method_exclusive_option_names, *args, &block)
|
206
|
+
end
|
207
|
+
alias_method :exclusive, :method_exclusive
|
208
|
+
|
209
|
+
# Adds and declares option group for required at least one of options in the
|
210
|
+
# block of arguments. You can declare options as the outside of the block.
|
211
|
+
#
|
212
|
+
# If :for is given as option, it allows you to change the options from
|
213
|
+
# a previous defined command.
|
214
|
+
#
|
215
|
+
# ==== Parameters
|
216
|
+
# Array[Thor::Option.name]
|
217
|
+
# options<Hash>:: :for is applied for previous defined command.
|
218
|
+
#
|
219
|
+
# ==== Examples
|
220
|
+
#
|
221
|
+
# at_least_one do
|
222
|
+
# option :one
|
223
|
+
# option :two
|
224
|
+
# end
|
225
|
+
#
|
226
|
+
# Or
|
227
|
+
#
|
228
|
+
# option :one
|
229
|
+
# option :two
|
230
|
+
# at_least_one :one, :two
|
231
|
+
#
|
232
|
+
# If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError
|
233
|
+
# will be raised.
|
234
|
+
#
|
235
|
+
# You can use at_least_one and exclusive at the same time.
|
236
|
+
#
|
237
|
+
# exclusive do
|
238
|
+
# at_least_one do
|
239
|
+
# option :one
|
240
|
+
# option :two
|
241
|
+
# end
|
242
|
+
# end
|
243
|
+
#
|
244
|
+
# Then it is required either only one of "--one" or "--two".
|
245
|
+
#
|
246
|
+
def method_at_least_one(*args, &block)
|
247
|
+
register_options_relation_for(:method_options,
|
248
|
+
:method_at_least_one_option_names, *args, &block)
|
249
|
+
end
|
250
|
+
alias_method :at_least_one, :method_at_least_one
|
251
|
+
|
252
|
+
# Prints help information for the given command.
|
253
|
+
#
|
254
|
+
# ==== Parameters
|
255
|
+
# shell<Thor::Shell>
|
256
|
+
# command_name<String>
|
257
|
+
#
|
258
|
+
def command_help(shell, command_name)
|
259
|
+
meth = normalize_command_name(command_name)
|
260
|
+
command = all_commands[meth]
|
261
|
+
handle_no_command_error(meth) unless command
|
262
|
+
|
263
|
+
shell.say "Usage:"
|
264
|
+
shell.say " #{banner(command).split("\n").join("\n ")}"
|
265
|
+
shell.say
|
266
|
+
class_options_help(shell, nil => command.options.values)
|
267
|
+
print_exclusive_options(shell, command)
|
268
|
+
print_at_least_one_required_options(shell, command)
|
269
|
+
|
270
|
+
if command.long_description
|
271
|
+
shell.say "Description:"
|
272
|
+
if command.wrap_long_description
|
273
|
+
shell.print_wrapped(command.long_description, indent: 2)
|
274
|
+
else
|
275
|
+
shell.say command.long_description
|
276
|
+
end
|
277
|
+
else
|
278
|
+
shell.say command.description
|
279
|
+
end
|
280
|
+
end
|
281
|
+
alias_method :task_help, :command_help
|
282
|
+
|
283
|
+
# Prints help information for this class.
|
284
|
+
#
|
285
|
+
# ==== Parameters
|
286
|
+
# shell<Thor::Shell>
|
287
|
+
#
|
288
|
+
def help(shell, subcommand = false)
|
289
|
+
list = printable_commands(true, subcommand)
|
290
|
+
Thor::Util.thor_classes_in(self).each do |klass|
|
291
|
+
list += klass.printable_commands(false)
|
292
|
+
end
|
293
|
+
sort_commands!(list)
|
294
|
+
|
295
|
+
if defined?(@package_name) && @package_name
|
296
|
+
shell.say "#{@package_name} commands:"
|
297
|
+
else
|
298
|
+
shell.say "Commands:"
|
299
|
+
end
|
300
|
+
|
301
|
+
shell.print_table(list, indent: 2, truncate: true)
|
302
|
+
shell.say
|
303
|
+
class_options_help(shell)
|
304
|
+
print_exclusive_options(shell)
|
305
|
+
print_at_least_one_required_options(shell)
|
306
|
+
end
|
307
|
+
|
308
|
+
# Returns commands ready to be printed.
|
309
|
+
def printable_commands(all = true, subcommand = false)
|
310
|
+
(all ? all_commands : commands).map do |_, command|
|
311
|
+
next if command.hidden?
|
312
|
+
item = []
|
313
|
+
item << banner(command, false, subcommand)
|
314
|
+
item << (command.description ? "# #{command.description.gsub(/\s+/m, ' ')}" : "")
|
315
|
+
item
|
316
|
+
end.compact
|
317
|
+
end
|
318
|
+
alias_method :printable_tasks, :printable_commands
|
319
|
+
|
320
|
+
def subcommands
|
321
|
+
@subcommands ||= from_superclass(:subcommands, [])
|
322
|
+
end
|
323
|
+
alias_method :subtasks, :subcommands
|
324
|
+
|
325
|
+
def subcommand_classes
|
326
|
+
@subcommand_classes ||= {}
|
327
|
+
end
|
328
|
+
|
329
|
+
def subcommand(subcommand, subcommand_class)
|
330
|
+
subcommands << subcommand.to_s
|
331
|
+
subcommand_class.subcommand_help subcommand
|
332
|
+
subcommand_classes[subcommand.to_s] = subcommand_class
|
333
|
+
|
334
|
+
define_method(subcommand) do |*args|
|
335
|
+
args, opts = Thor::Arguments.split(args)
|
336
|
+
invoke_args = [args, opts, {invoked_via_subcommand: true, class_options: options}]
|
337
|
+
invoke_args.unshift "help" if opts.delete("--help") || opts.delete("-h")
|
338
|
+
invoke subcommand_class, *invoke_args
|
339
|
+
end
|
340
|
+
subcommand_class.commands.each do |_meth, command|
|
341
|
+
command.ancestor_name = subcommand
|
342
|
+
end
|
343
|
+
end
|
344
|
+
alias_method :subtask, :subcommand
|
345
|
+
|
346
|
+
# Extend check unknown options to accept a hash of conditions.
|
347
|
+
#
|
348
|
+
# === Parameters
|
349
|
+
# options<Hash>: A hash containing :only and/or :except keys
|
350
|
+
def check_unknown_options!(options = {})
|
351
|
+
@check_unknown_options ||= {}
|
352
|
+
options.each do |key, value|
|
353
|
+
if value
|
354
|
+
@check_unknown_options[key] = Array(value)
|
355
|
+
else
|
356
|
+
@check_unknown_options.delete(key)
|
357
|
+
end
|
358
|
+
end
|
359
|
+
@check_unknown_options
|
360
|
+
end
|
361
|
+
|
362
|
+
# Overwrite check_unknown_options? to take subcommands and options into account.
|
363
|
+
def check_unknown_options?(config) #:nodoc:
|
364
|
+
options = check_unknown_options
|
365
|
+
return false unless options
|
366
|
+
|
367
|
+
command = config[:current_command]
|
368
|
+
return true unless command
|
369
|
+
|
370
|
+
name = command.name
|
371
|
+
|
372
|
+
if subcommands.include?(name)
|
373
|
+
false
|
374
|
+
elsif options[:except]
|
375
|
+
!options[:except].include?(name.to_sym)
|
376
|
+
elsif options[:only]
|
377
|
+
options[:only].include?(name.to_sym)
|
378
|
+
else
|
379
|
+
true
|
380
|
+
end
|
381
|
+
end
|
382
|
+
|
383
|
+
# Stop parsing of options as soon as an unknown option or a regular
|
384
|
+
# argument is encountered. All remaining arguments are passed to the command.
|
385
|
+
# This is useful if you have a command that can receive arbitrary additional
|
386
|
+
# options, and where those additional options should not be handled by
|
387
|
+
# Thor.
|
388
|
+
#
|
389
|
+
# ==== Example
|
390
|
+
#
|
391
|
+
# To better understand how this is useful, let's consider a command that calls
|
392
|
+
# an external command. A user may want to pass arbitrary options and
|
393
|
+
# arguments to that command. The command itself also accepts some options,
|
394
|
+
# which should be handled by Thor.
|
395
|
+
#
|
396
|
+
# class_option "verbose", :type => :boolean
|
397
|
+
# stop_on_unknown_option! :exec
|
398
|
+
# check_unknown_options! :except => :exec
|
399
|
+
#
|
400
|
+
# desc "exec", "Run a shell command"
|
401
|
+
# def exec(*args)
|
402
|
+
# puts "diagnostic output" if options[:verbose]
|
403
|
+
# Kernel.exec(*args)
|
404
|
+
# end
|
405
|
+
#
|
406
|
+
# Here +exec+ can be called with +--verbose+ to get diagnostic output,
|
407
|
+
# e.g.:
|
408
|
+
#
|
409
|
+
# $ thor exec --verbose echo foo
|
410
|
+
# diagnostic output
|
411
|
+
# foo
|
412
|
+
#
|
413
|
+
# But if +--verbose+ is given after +echo+, it is passed to +echo+ instead:
|
414
|
+
#
|
415
|
+
# $ thor exec echo --verbose foo
|
416
|
+
# --verbose foo
|
417
|
+
#
|
418
|
+
# ==== Parameters
|
419
|
+
# Symbol ...:: A list of commands that should be affected.
|
420
|
+
def stop_on_unknown_option!(*command_names)
|
421
|
+
@stop_on_unknown_option = stop_on_unknown_option | command_names
|
422
|
+
end
|
423
|
+
|
424
|
+
def stop_on_unknown_option?(command) #:nodoc:
|
425
|
+
command && stop_on_unknown_option.include?(command.name.to_sym)
|
426
|
+
end
|
427
|
+
|
428
|
+
# Disable the check for required options for the given commands.
|
429
|
+
# This is useful if you have a command that does not need the required options
|
430
|
+
# to work, like help.
|
431
|
+
#
|
432
|
+
# ==== Parameters
|
433
|
+
# Symbol ...:: A list of commands that should be affected.
|
434
|
+
def disable_required_check!(*command_names)
|
435
|
+
@disable_required_check = disable_required_check | command_names
|
436
|
+
end
|
437
|
+
|
438
|
+
def disable_required_check?(command) #:nodoc:
|
439
|
+
command && disable_required_check.include?(command.name.to_sym)
|
440
|
+
end
|
441
|
+
|
442
|
+
# Checks if a specified command exists.
|
443
|
+
#
|
444
|
+
# ==== Parameters
|
445
|
+
# command_name<String>:: The name of the command to check for existence.
|
446
|
+
#
|
447
|
+
# ==== Returns
|
448
|
+
# Boolean:: +true+ if the command exists, +false+ otherwise.
|
449
|
+
def command_exists?(command_name) #:nodoc:
|
450
|
+
commands.keys.include?(normalize_command_name(command_name))
|
451
|
+
end
|
452
|
+
|
453
|
+
protected
|
454
|
+
|
455
|
+
# Returns this class exclusive options array set.
|
456
|
+
#
|
457
|
+
# ==== Returns
|
458
|
+
# Array[Array[Thor::Option.name]]
|
459
|
+
#
|
460
|
+
def method_exclusive_option_names #:nodoc:
|
461
|
+
@method_exclusive_option_names ||= []
|
462
|
+
end
|
463
|
+
|
464
|
+
# Returns this class at least one of required options array set.
|
465
|
+
#
|
466
|
+
# ==== Returns
|
467
|
+
# Array[Array[Thor::Option.name]]
|
468
|
+
#
|
469
|
+
def method_at_least_one_option_names #:nodoc:
|
470
|
+
@method_at_least_one_option_names ||= []
|
471
|
+
end
|
472
|
+
|
473
|
+
def stop_on_unknown_option #:nodoc:
|
474
|
+
@stop_on_unknown_option ||= []
|
475
|
+
end
|
476
|
+
|
477
|
+
# help command has the required check disabled by default.
|
478
|
+
def disable_required_check #:nodoc:
|
479
|
+
@disable_required_check ||= [:help]
|
480
|
+
end
|
481
|
+
|
482
|
+
def print_exclusive_options(shell, command = nil) # :nodoc:
|
483
|
+
opts = []
|
484
|
+
opts = command.method_exclusive_option_names unless command.nil?
|
485
|
+
opts += class_exclusive_option_names
|
486
|
+
unless opts.empty?
|
487
|
+
shell.say "Exclusive Options:"
|
488
|
+
shell.print_table(opts.map{ |ex| ex.map{ |e| "--#{e}"}}, indent: 2 )
|
489
|
+
shell.say
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
def print_at_least_one_required_options(shell, command = nil) # :nodoc:
|
494
|
+
opts = []
|
495
|
+
opts = command.method_at_least_one_option_names unless command.nil?
|
496
|
+
opts += class_at_least_one_option_names
|
497
|
+
unless opts.empty?
|
498
|
+
shell.say "Required At Least One:"
|
499
|
+
shell.print_table(opts.map{ |ex| ex.map{ |e| "--#{e}"}}, indent: 2 )
|
500
|
+
shell.say
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
# The method responsible for dispatching given the args.
|
505
|
+
def dispatch(meth, given_args, given_opts, config) #:nodoc:
|
506
|
+
meth ||= retrieve_command_name(given_args)
|
507
|
+
command = all_commands[normalize_command_name(meth)]
|
508
|
+
|
509
|
+
if !command && config[:invoked_via_subcommand]
|
510
|
+
# We're a subcommand and our first argument didn't match any of our
|
511
|
+
# commands. So we put it back and call our default command.
|
512
|
+
given_args.unshift(meth)
|
513
|
+
command = all_commands[normalize_command_name(default_command)]
|
514
|
+
end
|
515
|
+
|
516
|
+
if command
|
517
|
+
args, opts = Thor::Options.split(given_args)
|
518
|
+
if stop_on_unknown_option?(command) && !args.empty?
|
519
|
+
# given_args starts with a non-option, so we treat everything as
|
520
|
+
# ordinary arguments
|
521
|
+
args.concat opts
|
522
|
+
opts.clear
|
523
|
+
end
|
524
|
+
else
|
525
|
+
args = given_args
|
526
|
+
opts = nil
|
527
|
+
command = dynamic_command_class.new(meth)
|
528
|
+
end
|
529
|
+
|
530
|
+
opts = given_opts || opts || []
|
531
|
+
config[:current_command] = command
|
532
|
+
config[:command_options] = command.options
|
533
|
+
|
534
|
+
instance = new(args, opts, config)
|
535
|
+
yield instance if block_given?
|
536
|
+
args = instance.args
|
537
|
+
trailing = args[Range.new(arguments.size, -1)]
|
538
|
+
instance.invoke_command(command, trailing || [])
|
539
|
+
end
|
540
|
+
|
541
|
+
# The banner for this class. You can customize it if you are invoking the
|
542
|
+
# thor class by another ways which is not the Thor::Runner. It receives
|
543
|
+
# the command that is going to be invoked and a boolean which indicates if
|
544
|
+
# the namespace should be displayed as arguments.
|
545
|
+
#
|
546
|
+
def banner(command, namespace = nil, subcommand = false)
|
547
|
+
command.formatted_usage(self, $thor_runner, subcommand).split("\n").map do |formatted_usage|
|
548
|
+
"#{basename} #{formatted_usage}"
|
549
|
+
end.join("\n")
|
550
|
+
end
|
551
|
+
|
552
|
+
def baseclass #:nodoc:
|
553
|
+
Thor
|
554
|
+
end
|
555
|
+
|
556
|
+
def dynamic_command_class #:nodoc:
|
557
|
+
Thor::DynamicCommand
|
558
|
+
end
|
559
|
+
|
560
|
+
def create_command(meth) #:nodoc:
|
561
|
+
@usage ||= nil
|
562
|
+
@desc ||= nil
|
563
|
+
@long_desc ||= nil
|
564
|
+
@long_desc_wrap ||= nil
|
565
|
+
@hide ||= nil
|
566
|
+
|
567
|
+
if @usage && @desc
|
568
|
+
base_class = @hide ? Thor::HiddenCommand : Thor::Command
|
569
|
+
relations = {exclusive_option_names: method_exclusive_option_names,
|
570
|
+
at_least_one_option_names: method_at_least_one_option_names}
|
571
|
+
commands[meth] = base_class.new(meth, @desc, @long_desc, @long_desc_wrap, @usage, method_options, relations)
|
572
|
+
@usage, @desc, @long_desc, @long_desc_wrap, @method_options, @hide = nil
|
573
|
+
@method_exclusive_option_names, @method_at_least_one_option_names = nil
|
574
|
+
true
|
575
|
+
elsif all_commands[meth] || meth == "method_missing"
|
576
|
+
true
|
577
|
+
else
|
578
|
+
puts "[WARNING] Attempted to create command #{meth.inspect} without usage or description. " \
|
579
|
+
"Call desc if you want this method to be available as command or declare it inside a " \
|
580
|
+
"no_commands{} block. Invoked from #{caller[1].inspect}."
|
581
|
+
false
|
582
|
+
end
|
583
|
+
end
|
584
|
+
alias_method :create_task, :create_command
|
585
|
+
|
586
|
+
def initialize_added #:nodoc:
|
587
|
+
class_options.merge!(method_options)
|
588
|
+
@method_options = nil
|
589
|
+
end
|
590
|
+
|
591
|
+
# Retrieve the command name from given args.
|
592
|
+
def retrieve_command_name(args) #:nodoc:
|
593
|
+
meth = args.first.to_s unless args.empty?
|
594
|
+
args.shift if meth && (map[meth] || meth !~ /^\-/)
|
595
|
+
end
|
596
|
+
alias_method :retrieve_task_name, :retrieve_command_name
|
597
|
+
|
598
|
+
# receives a (possibly nil) command name and returns a name that is in
|
599
|
+
# the commands hash. In addition to normalizing aliases, this logic
|
600
|
+
# will determine if a shortened command is an unambiguous substring of
|
601
|
+
# a command or alias.
|
602
|
+
#
|
603
|
+
# +normalize_command_name+ also converts names like +animal-prison+
|
604
|
+
# into +animal_prison+.
|
605
|
+
def normalize_command_name(meth) #:nodoc:
|
606
|
+
return default_command.to_s.tr("-", "_") unless meth
|
607
|
+
|
608
|
+
possibilities = find_command_possibilities(meth)
|
609
|
+
raise AmbiguousTaskError, "Ambiguous command #{meth} matches [#{possibilities.join(', ')}]" if possibilities.size > 1
|
610
|
+
|
611
|
+
if possibilities.empty?
|
612
|
+
meth ||= default_command
|
613
|
+
elsif map[meth]
|
614
|
+
meth = map[meth]
|
615
|
+
else
|
616
|
+
meth = possibilities.first
|
617
|
+
end
|
618
|
+
|
619
|
+
meth.to_s.tr("-", "_") # treat foo-bar as foo_bar
|
620
|
+
end
|
621
|
+
alias_method :normalize_task_name, :normalize_command_name
|
622
|
+
|
623
|
+
# this is the logic that takes the command name passed in by the user
|
624
|
+
# and determines whether it is an unambiguous substrings of a command or
|
625
|
+
# alias name.
|
626
|
+
def find_command_possibilities(meth)
|
627
|
+
len = meth.to_s.length
|
628
|
+
possibilities = all_commands.merge(map).keys.select { |n| meth == n[0, len] }.sort
|
629
|
+
unique_possibilities = possibilities.map { |k| map[k] || k }.uniq
|
630
|
+
|
631
|
+
if possibilities.include?(meth)
|
632
|
+
[meth]
|
633
|
+
elsif unique_possibilities.size == 1
|
634
|
+
unique_possibilities
|
635
|
+
else
|
636
|
+
possibilities
|
637
|
+
end
|
638
|
+
end
|
639
|
+
alias_method :find_task_possibilities, :find_command_possibilities
|
640
|
+
|
641
|
+
def subcommand_help(cmd)
|
642
|
+
desc "help [COMMAND]", "Describe subcommands or one specific subcommand"
|
643
|
+
class_eval "
|
644
|
+
def help(command = nil, subcommand = true); super; end
|
645
|
+
"
|
646
|
+
end
|
647
|
+
alias_method :subtask_help, :subcommand_help
|
648
|
+
|
649
|
+
# Sort the commands, lexicographically by default.
|
650
|
+
#
|
651
|
+
# Can be overridden in the subclass to change the display order of the
|
652
|
+
# commands.
|
653
|
+
def sort_commands!(list)
|
654
|
+
list.sort! { |a, b| a[0] <=> b[0] }
|
655
|
+
end
|
656
|
+
end
|
657
|
+
|
658
|
+
include Thor::Base
|
659
|
+
|
660
|
+
map HELP_MAPPINGS => :help
|
661
|
+
|
662
|
+
desc "help [COMMAND]", "Describe available commands or one specific command"
|
663
|
+
def help(command = nil, subcommand = false)
|
664
|
+
if command
|
665
|
+
if self.class.subcommands.include? command
|
666
|
+
self.class.subcommand_classes[command].help(shell, true)
|
667
|
+
else
|
668
|
+
self.class.command_help(shell, command)
|
669
|
+
end
|
670
|
+
else
|
671
|
+
self.class.help(shell, subcommand)
|
672
|
+
end
|
673
|
+
end
|
674
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib/", __FILE__)
|
3
|
+
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
4
|
+
require "thor/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "thor"
|
8
|
+
spec.version = Thor::VERSION
|
9
|
+
spec.licenses = %w(MIT)
|
10
|
+
spec.authors = ["Yehuda Katz", "José Valim"]
|
11
|
+
spec.email = "ruby-thor@googlegroups.com"
|
12
|
+
spec.homepage = "http://whatisthor.com/"
|
13
|
+
spec.description = "Thor is a toolkit for building powerful command-line interfaces."
|
14
|
+
spec.summary = spec.description
|
15
|
+
|
16
|
+
spec.metadata = {
|
17
|
+
"bug_tracker_uri" => "https://github.com/rails/thor/issues",
|
18
|
+
"changelog_uri" => "https://github.com/rails/thor/releases/tag/v#{Thor::VERSION}",
|
19
|
+
"documentation_uri" => "http://whatisthor.com/",
|
20
|
+
"source_code_uri" => "https://github.com/rails/thor/tree/v#{Thor::VERSION}",
|
21
|
+
"wiki_uri" => "https://github.com/rails/thor/wiki",
|
22
|
+
"rubygems_mfa_required" => "true",
|
23
|
+
}
|
24
|
+
|
25
|
+
spec.required_ruby_version = ">= 2.6.0"
|
26
|
+
spec.required_rubygems_version = ">= 1.3.5"
|
27
|
+
|
28
|
+
spec.files = %w(.document thor.gemspec) + Dir["*.md", "bin/*", "lib/**/*.rb"]
|
29
|
+
spec.executables = %w(thor)
|
30
|
+
spec.require_paths = %w(lib)
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", ">= 1.0", "< 3"
|
33
|
+
end
|