fluid_cli 0.1.2
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/README.md +1 -0
- data/dev.yml +5 -0
- data/exe/fluid +24 -0
- data/lib/fluid_cli/api.rb +135 -0
- data/lib/fluid_cli/assets/post_auth_page/index.html.erb +34 -0
- data/lib/fluid_cli/assets/post_auth_page/style.css +58 -0
- data/lib/fluid_cli/command.rb +55 -0
- data/lib/fluid_cli/commands/help.rb +21 -0
- data/lib/fluid_cli/commands/login.rb +30 -0
- data/lib/fluid_cli/commands/logout.rb +38 -0
- data/lib/fluid_cli/commands/switch.rb +23 -0
- data/lib/fluid_cli/commands/theme/common/company_helper.rb +15 -0
- data/lib/fluid_cli/commands/theme/common/root_helper.rb +95 -0
- data/lib/fluid_cli/commands/theme/dev.rb +61 -0
- data/lib/fluid_cli/commands/theme/help.rb +21 -0
- data/lib/fluid_cli/commands/theme/init.rb +46 -0
- data/lib/fluid_cli/commands/theme/pull.rb +68 -0
- data/lib/fluid_cli/commands/theme/push.rb +132 -0
- data/lib/fluid_cli/commands/theme.rb +23 -0
- data/lib/fluid_cli/commands/whoami.rb +23 -0
- data/lib/fluid_cli/commands.rb +19 -0
- data/lib/fluid_cli/company_switcher.rb +69 -0
- data/lib/fluid_cli/context.rb +691 -0
- data/lib/fluid_cli/db.rb +114 -0
- data/lib/fluid_cli/entry_point.rb +10 -0
- data/lib/fluid_cli/environment.rb +32 -0
- data/lib/fluid_cli/file_system_listener.rb +29 -0
- data/lib/fluid_cli/form.rb +42 -0
- data/lib/fluid_cli/git.rb +319 -0
- data/lib/fluid_cli/http_request.rb +54 -0
- data/lib/fluid_cli/identity_auth/servlet.rb +39 -0
- data/lib/fluid_cli/identity_auth.rb +126 -0
- data/lib/fluid_cli/options.rb +38 -0
- data/lib/fluid_cli/theme/dev_server/certificate_manager.rb +79 -0
- data/lib/fluid_cli/theme/dev_server/errors.rb +9 -0
- data/lib/fluid_cli/theme/dev_server/header_hash.rb +98 -0
- data/lib/fluid_cli/theme/dev_server/hooks/file_change_hook.rb +39 -0
- data/lib/fluid_cli/theme/dev_server/hot_reload/resources/hot-reload-no-script.html +27 -0
- data/lib/fluid_cli/theme/dev_server/hot_reload/resources/hot_reload.js +28 -0
- data/lib/fluid_cli/theme/dev_server/hot_reload/resources/sse_client.js +43 -0
- data/lib/fluid_cli/theme/dev_server/hot_reload/resources/theme.js +16 -0
- data/lib/fluid_cli/theme/dev_server/hot_reload/script_injector.rb +54 -0
- data/lib/fluid_cli/theme/dev_server/hot_reload.rb +75 -0
- data/lib/fluid_cli/theme/dev_server/local_assets.rb +92 -0
- data/lib/fluid_cli/theme/dev_server/proxy.rb +235 -0
- data/lib/fluid_cli/theme/dev_server/proxy_param_builder.rb +82 -0
- data/lib/fluid_cli/theme/dev_server/reload_mode.rb +34 -0
- data/lib/fluid_cli/theme/dev_server/sse.rb +75 -0
- data/lib/fluid_cli/theme/dev_server/watcher.rb +57 -0
- data/lib/fluid_cli/theme/dev_server/web_server.rb +140 -0
- data/lib/fluid_cli/theme/dev_server.rb +289 -0
- data/lib/fluid_cli/theme/development_theme.rb +101 -0
- data/lib/fluid_cli/theme/file.rb +105 -0
- data/lib/fluid_cli/theme/forms/select.rb +33 -0
- data/lib/fluid_cli/theme/mime_type.rb +34 -0
- data/lib/fluid_cli/theme/presenters/theme_presenter.rb +49 -0
- data/lib/fluid_cli/theme/presenters/themes_presenter.rb +31 -0
- data/lib/fluid_cli/theme/root.rb +62 -0
- data/lib/fluid_cli/theme/syncer/checksums.rb +66 -0
- data/lib/fluid_cli/theme/syncer/downloader.rb +54 -0
- data/lib/fluid_cli/theme/syncer/error_reporter.rb +45 -0
- data/lib/fluid_cli/theme/syncer/merger.rb +53 -0
- data/lib/fluid_cli/theme/syncer/operation.rb +58 -0
- data/lib/fluid_cli/theme/syncer/standard_reporter.rb +32 -0
- data/lib/fluid_cli/theme/syncer/unsupported_script_warning.rb +90 -0
- data/lib/fluid_cli/theme/syncer/uploader/forms/apply_to_all.rb +41 -0
- data/lib/fluid_cli/theme/syncer/uploader/forms/apply_to_all_form.rb +37 -0
- data/lib/fluid_cli/theme/syncer/uploader/forms/base_strategy_form.rb +64 -0
- data/lib/fluid_cli/theme/syncer/uploader/forms/select_delete_strategy.rb +29 -0
- data/lib/fluid_cli/theme/syncer/uploader/forms/select_update_strategy.rb +30 -0
- data/lib/fluid_cli/theme/syncer/uploader/json_delete_handler.rb +49 -0
- data/lib/fluid_cli/theme/syncer/uploader/json_update_handler.rb +71 -0
- data/lib/fluid_cli/theme/syncer/uploader.rb +105 -0
- data/lib/fluid_cli/theme/syncer.rb +412 -0
- data/lib/fluid_cli/theme/theme.rb +186 -0
- data/lib/fluid_cli/theme/ui/sync_progress_bar.rb +22 -0
- data/lib/fluid_cli/thread_pool/job.rb +35 -0
- data/lib/fluid_cli/thread_pool.rb +49 -0
- data/lib/fluid_cli/version.rb +3 -0
- data/lib/fluid_cli.rb +59 -0
- data/vendor/deps/base64/.document +5 -0
- data/vendor/deps/base64/.gitignore +9 -0
- data/vendor/deps/base64/BSDL +22 -0
- data/vendor/deps/base64/COPYING +56 -0
- data/vendor/deps/base64/Gemfile +9 -0
- data/vendor/deps/base64/LEGAL +60 -0
- data/vendor/deps/base64/README.md +48 -0
- data/vendor/deps/base64/Rakefile +31 -0
- data/vendor/deps/base64/base64.gemspec +28 -0
- data/vendor/deps/base64/bin/console +14 -0
- data/vendor/deps/base64/bin/setup +8 -0
- data/vendor/deps/base64/lib/base64.rb +382 -0
- data/vendor/deps/base64/sig/base64.rbs +358 -0
- data/vendor/deps/base64/test/base64/test_base64.rb +115 -0
- data/vendor/deps/base64/test_sig/test_base64.rb +44 -0
- data/vendor/deps/cli-kit/REVISION +1 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/definition.rb +286 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/evaluation.rb +215 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/parser/node.rb +128 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/parser.rb +125 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/tokenizer.rb +130 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args.rb +16 -0
- data/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +30 -0
- data/vendor/deps/cli-kit/lib/cli/kit/command_help.rb +268 -0
- data/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +150 -0
- data/vendor/deps/cli-kit/lib/cli/kit/config.rb +137 -0
- data/vendor/deps/cli-kit/lib/cli/kit/core_ext.rb +28 -0
- data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +166 -0
- data/vendor/deps/cli-kit/lib/cli/kit/executor.rb +92 -0
- data/vendor/deps/cli-kit/lib/cli/kit/ini.rb +91 -0
- data/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +92 -0
- data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +94 -0
- data/vendor/deps/cli-kit/lib/cli/kit/opts.rb +248 -0
- data/vendor/deps/cli-kit/lib/cli/kit/parse_args.rb +55 -0
- data/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +66 -0
- data/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +260 -0
- data/vendor/deps/cli-kit/lib/cli/kit/support.rb +11 -0
- data/vendor/deps/cli-kit/lib/cli/kit/system.rb +290 -0
- data/vendor/deps/cli-kit/lib/cli/kit/util.rb +118 -0
- data/vendor/deps/cli-kit/lib/cli/kit/version.rb +7 -0
- data/vendor/deps/cli-kit/lib/cli/kit.rb +139 -0
- data/vendor/deps/cli-ui/REVISION +1 -0
- data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +218 -0
- data/vendor/deps/cli-ui/lib/cli/ui/color.rb +101 -0
- data/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +219 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +67 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +179 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +152 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +127 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +286 -0
- data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +92 -0
- data/vendor/deps/cli-ui/lib/cli/ui/os.rb +63 -0
- data/vendor/deps/cli-ui/lib/cli/ui/printer.rb +64 -0
- data/vendor/deps/cli-ui/lib/cli/ui/progress.rb +132 -0
- data/vendor/deps/cli-ui/lib/cli/ui/progress_reporter.rb +209 -0
- data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +583 -0
- data/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +36 -0
- data/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +381 -0
- data/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +48 -0
- data/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +602 -0
- data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +79 -0
- data/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +399 -0
- data/vendor/deps/cli-ui/lib/cli/ui/table.rb +83 -0
- data/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +55 -0
- data/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +106 -0
- data/vendor/deps/cli-ui/lib/cli/ui/version.rb +8 -0
- data/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +46 -0
- data/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +79 -0
- data/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +89 -0
- data/vendor/deps/cli-ui/lib/cli/ui/work_queue.rb +142 -0
- data/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +61 -0
- data/vendor/deps/cli-ui/lib/cli/ui.rb +359 -0
- data/vendor/deps/cli-ui/vendor/reentrant_mutex.rb +78 -0
- data/vendor/deps/debug/CONTRIBUTING.md +573 -0
- data/vendor/deps/debug/Gemfile +10 -0
- data/vendor/deps/debug/LICENSE.txt +22 -0
- data/vendor/deps/debug/README.md +996 -0
- data/vendor/deps/debug/Rakefile +57 -0
- data/vendor/deps/debug/TODO.md +23 -0
- data/vendor/deps/debug/debug.gemspec +33 -0
- data/vendor/deps/debug/exe/rdbg +53 -0
- data/vendor/deps/debug/ext/debug/Makefile +273 -0
- data/vendor/deps/debug/ext/debug/debug.c +228 -0
- data/vendor/deps/debug/ext/debug/debug_version.h +1 -0
- data/vendor/deps/debug/ext/debug/extconf.rb +27 -0
- data/vendor/deps/debug/ext/debug/iseq_collector.c +93 -0
- data/vendor/deps/debug/lib/debug/abbrev_command.rb +77 -0
- data/vendor/deps/debug/lib/debug/breakpoint.rb +556 -0
- data/vendor/deps/debug/lib/debug/client.rb +263 -0
- data/vendor/deps/debug/lib/debug/color.rb +123 -0
- data/vendor/deps/debug/lib/debug/config.rb +592 -0
- data/vendor/deps/debug/lib/debug/console.rb +224 -0
- data/vendor/deps/debug/lib/debug/dap_custom/traceInspector.rb +336 -0
- data/vendor/deps/debug/lib/debug/debug.bundle +0 -0
- data/vendor/deps/debug/lib/debug/frame_info.rb +190 -0
- data/vendor/deps/debug/lib/debug/irb_integration.rb +37 -0
- data/vendor/deps/debug/lib/debug/local.rb +115 -0
- data/vendor/deps/debug/lib/debug/open.rb +13 -0
- data/vendor/deps/debug/lib/debug/open_nonstop.rb +15 -0
- data/vendor/deps/debug/lib/debug/prelude.rb +50 -0
- data/vendor/deps/debug/lib/debug/server.rb +534 -0
- data/vendor/deps/debug/lib/debug/server_cdp.rb +1348 -0
- data/vendor/deps/debug/lib/debug/server_dap.rb +1108 -0
- data/vendor/deps/debug/lib/debug/session.rb +2667 -0
- data/vendor/deps/debug/lib/debug/source_repository.rb +150 -0
- data/vendor/deps/debug/lib/debug/start.rb +5 -0
- data/vendor/deps/debug/lib/debug/thread_client.rb +1457 -0
- data/vendor/deps/debug/lib/debug/tracer.rb +241 -0
- data/vendor/deps/debug/lib/debug/version.rb +5 -0
- data/vendor/deps/debug/lib/debug.rb +9 -0
- data/vendor/deps/debug/misc/README.md.erb +660 -0
- data/vendor/deps/listen/.github/release-drafter.yml +17 -0
- data/vendor/deps/listen/.github/workflows/development.yml +67 -0
- data/vendor/deps/listen/.github/workflows/push.yml +12 -0
- data/vendor/deps/listen/.gitignore +28 -0
- data/vendor/deps/listen/.rspec +3 -0
- data/vendor/deps/listen/.rubocop.yml +283 -0
- data/vendor/deps/listen/.yardopts +11 -0
- data/vendor/deps/listen/CHANGELOG.md +1 -0
- data/vendor/deps/listen/CONTRIBUTING.md +45 -0
- data/vendor/deps/listen/Gemfile +33 -0
- data/vendor/deps/listen/Guardfile +26 -0
- data/vendor/deps/listen/LICENSE.txt +22 -0
- data/vendor/deps/listen/README.md +490 -0
- data/vendor/deps/listen/Rakefile +154 -0
- data/vendor/deps/listen/bin/listen +11 -0
- data/vendor/deps/listen/lib/listen/adapter/base.rb +129 -0
- data/vendor/deps/listen/lib/listen/adapter/bsd.rb +104 -0
- data/vendor/deps/listen/lib/listen/adapter/config.rb +31 -0
- data/vendor/deps/listen/lib/listen/adapter/darwin.rb +77 -0
- data/vendor/deps/listen/lib/listen/adapter/linux.rb +108 -0
- data/vendor/deps/listen/lib/listen/adapter/polling.rb +40 -0
- data/vendor/deps/listen/lib/listen/adapter/windows.rb +96 -0
- data/vendor/deps/listen/lib/listen/adapter.rb +43 -0
- data/vendor/deps/listen/lib/listen/backend.rb +40 -0
- data/vendor/deps/listen/lib/listen/change.rb +69 -0
- data/vendor/deps/listen/lib/listen/cli.rb +65 -0
- data/vendor/deps/listen/lib/listen/directory.rb +93 -0
- data/vendor/deps/listen/lib/listen/error.rb +11 -0
- data/vendor/deps/listen/lib/listen/event/config.rb +39 -0
- data/vendor/deps/listen/lib/listen/event/loop.rb +92 -0
- data/vendor/deps/listen/lib/listen/event/processor.rb +128 -0
- data/vendor/deps/listen/lib/listen/event/queue.rb +52 -0
- data/vendor/deps/listen/lib/listen/file.rb +95 -0
- data/vendor/deps/listen/lib/listen/fsm.rb +131 -0
- data/vendor/deps/listen/lib/listen/listener/config.rb +41 -0
- data/vendor/deps/listen/lib/listen/listener.rb +136 -0
- data/vendor/deps/listen/lib/listen/logger.rb +65 -0
- data/vendor/deps/listen/lib/listen/monotonic_time.rb +27 -0
- data/vendor/deps/listen/lib/listen/options.rb +24 -0
- data/vendor/deps/listen/lib/listen/queue_optimizer.rb +129 -0
- data/vendor/deps/listen/lib/listen/record/entry.rb +66 -0
- data/vendor/deps/listen/lib/listen/record/symlink_detector.rb +47 -0
- data/vendor/deps/listen/lib/listen/record.rb +122 -0
- data/vendor/deps/listen/lib/listen/silencer/controller.rb +50 -0
- data/vendor/deps/listen/lib/listen/silencer.rb +106 -0
- data/vendor/deps/listen/lib/listen/thread.rb +54 -0
- data/vendor/deps/listen/lib/listen/version.rb +5 -0
- data/vendor/deps/listen/lib/listen.rb +47 -0
- data/vendor/deps/listen/listen.gemspec +40 -0
- data/vendor/deps/listen/spec/acceptance/listen_spec.rb +320 -0
- data/vendor/deps/listen/spec/lib/listen/adapter/base_spec.rb +101 -0
- data/vendor/deps/listen/spec/lib/listen/adapter/bsd_spec.rb +13 -0
- data/vendor/deps/listen/spec/lib/listen/adapter/config_spec.rb +122 -0
- data/vendor/deps/listen/spec/lib/listen/adapter/darwin_spec.rb +82 -0
- data/vendor/deps/listen/spec/lib/listen/adapter/linux_spec.rb +199 -0
- data/vendor/deps/listen/spec/lib/listen/adapter/polling_spec.rb +83 -0
- data/vendor/deps/listen/spec/lib/listen/adapter/windows_spec.rb +13 -0
- data/vendor/deps/listen/spec/lib/listen/adapter_spec.rb +69 -0
- data/vendor/deps/listen/spec/lib/listen/backend_spec.rb +82 -0
- data/vendor/deps/listen/spec/lib/listen/change_spec.rb +102 -0
- data/vendor/deps/listen/spec/lib/listen/cli_spec.rb +116 -0
- data/vendor/deps/listen/spec/lib/listen/directory_spec.rb +284 -0
- data/vendor/deps/listen/spec/lib/listen/event/config_spec.rb +33 -0
- data/vendor/deps/listen/spec/lib/listen/event/loop_spec.rb +118 -0
- data/vendor/deps/listen/spec/lib/listen/event/processor_spec.rb +250 -0
- data/vendor/deps/listen/spec/lib/listen/event/queue_spec.rb +118 -0
- data/vendor/deps/listen/spec/lib/listen/file_spec.rb +254 -0
- data/vendor/deps/listen/spec/lib/listen/fsm_spec.rb +147 -0
- data/vendor/deps/listen/spec/lib/listen/listener/config_spec.rb +29 -0
- data/vendor/deps/listen/spec/lib/listen/listener_spec.rb +321 -0
- data/vendor/deps/listen/spec/lib/listen/logger_spec.rb +212 -0
- data/vendor/deps/listen/spec/lib/listen/monotonic_time_spec.rb +58 -0
- data/vendor/deps/listen/spec/lib/listen/queue_optimizer_spec.rb +111 -0
- data/vendor/deps/listen/spec/lib/listen/record_spec.rb +424 -0
- data/vendor/deps/listen/spec/lib/listen/silencer/controller_spec.rb +97 -0
- data/vendor/deps/listen/spec/lib/listen/silencer_spec.rb +109 -0
- data/vendor/deps/listen/spec/lib/listen/thread_spec.rb +133 -0
- data/vendor/deps/listen/spec/lib/listen_spec.rb +25 -0
- data/vendor/deps/listen/spec/spec_helper.rb +49 -0
- data/vendor/deps/listen/spec/support/acceptance_helper.rb +260 -0
- data/vendor/deps/listen/spec/support/fixtures_helper.rb +32 -0
- data/vendor/deps/listen/spec/support/platform_helper.rb +17 -0
- data/vendor/deps/observer/.github/dependabot.yml +6 -0
- data/vendor/deps/observer/.github/workflows/test.yml +33 -0
- data/vendor/deps/observer/.gitignore +8 -0
- data/vendor/deps/observer/BSDL +22 -0
- data/vendor/deps/observer/COPYING +56 -0
- data/vendor/deps/observer/Gemfile +9 -0
- data/vendor/deps/observer/README.md +139 -0
- data/vendor/deps/observer/Rakefile +10 -0
- data/vendor/deps/observer/bin/console +14 -0
- data/vendor/deps/observer/bin/setup +8 -0
- data/vendor/deps/observer/lib/observer.rb +229 -0
- data/vendor/deps/observer/observer.gemspec +32 -0
- data/vendor/deps/observer/test/test_observer.rb +66 -0
- data/vendor/deps/webrick/.gitignore +9 -0
- data/vendor/deps/webrick/Gemfile +3 -0
- data/vendor/deps/webrick/LICENSE.txt +22 -0
- data/vendor/deps/webrick/README.md +61 -0
- data/vendor/deps/webrick/Rakefile +10 -0
- data/vendor/deps/webrick/lib/webrick/accesslog.rb +157 -0
- data/vendor/deps/webrick/lib/webrick/cgi.rb +313 -0
- data/vendor/deps/webrick/lib/webrick/compat.rb +36 -0
- data/vendor/deps/webrick/lib/webrick/config.rb +158 -0
- data/vendor/deps/webrick/lib/webrick/cookie.rb +172 -0
- data/vendor/deps/webrick/lib/webrick/htmlutils.rb +30 -0
- data/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +117 -0
- data/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +116 -0
- data/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +395 -0
- data/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +132 -0
- data/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +97 -0
- data/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +158 -0
- data/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +53 -0
- data/vendor/deps/webrick/lib/webrick/httpauth.rb +96 -0
- data/vendor/deps/webrick/lib/webrick/httpproxy.rb +354 -0
- data/vendor/deps/webrick/lib/webrick/httprequest.rb +636 -0
- data/vendor/deps/webrick/lib/webrick/httpresponse.rb +564 -0
- data/vendor/deps/webrick/lib/webrick/https.rb +152 -0
- data/vendor/deps/webrick/lib/webrick/httpserver.rb +294 -0
- data/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +152 -0
- data/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +47 -0
- data/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +126 -0
- data/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +88 -0
- data/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +552 -0
- data/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +47 -0
- data/vendor/deps/webrick/lib/webrick/httpservlet.rb +23 -0
- data/vendor/deps/webrick/lib/webrick/httpstatus.rb +194 -0
- data/vendor/deps/webrick/lib/webrick/httputils.rb +512 -0
- data/vendor/deps/webrick/lib/webrick/httpversion.rb +76 -0
- data/vendor/deps/webrick/lib/webrick/log.rb +156 -0
- data/vendor/deps/webrick/lib/webrick/server.rb +381 -0
- data/vendor/deps/webrick/lib/webrick/ssl.rb +215 -0
- data/vendor/deps/webrick/lib/webrick/utils.rb +265 -0
- data/vendor/deps/webrick/lib/webrick/version.rb +18 -0
- data/vendor/deps/webrick/lib/webrick.rb +232 -0
- data/vendor/deps/webrick/webrick.gemspec +74 -0
- metadata +412 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module CLI
|
|
5
|
+
module UI
|
|
6
|
+
module Frame
|
|
7
|
+
module FrameStack
|
|
8
|
+
class StackItem
|
|
9
|
+
#: CLI::UI::Color
|
|
10
|
+
attr_reader :color
|
|
11
|
+
|
|
12
|
+
#: CLI::UI::Frame::FrameStyle
|
|
13
|
+
attr_reader :frame_style
|
|
14
|
+
|
|
15
|
+
#: (CLI::UI::colorable color_name, frame_stylable style_name) -> void
|
|
16
|
+
def initialize(color_name, style_name)
|
|
17
|
+
@color = CLI::UI.resolve_color(color_name)
|
|
18
|
+
@frame_style = CLI::UI.resolve_style(style_name)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class << self
|
|
23
|
+
# Fetch all items off the frame stack
|
|
24
|
+
#: -> Array[StackItem]
|
|
25
|
+
def items
|
|
26
|
+
Thread.current[:cliui_frame_stack] ||= []
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Push a new item onto the frame stack.
|
|
30
|
+
#
|
|
31
|
+
# Either an item or a :color/:style pair should be pushed onto the stack.
|
|
32
|
+
#
|
|
33
|
+
# ==== Attributes
|
|
34
|
+
#
|
|
35
|
+
# * +item+ a +StackItem+ to push onto the stack. Defaults to nil
|
|
36
|
+
#
|
|
37
|
+
# ==== Options
|
|
38
|
+
#
|
|
39
|
+
# * +:color+ the color of the new stack item. Defaults to nil
|
|
40
|
+
# * +:style+ the style of the new stack item. Defaults to nil
|
|
41
|
+
#
|
|
42
|
+
# ==== Raises
|
|
43
|
+
#
|
|
44
|
+
# If both an item and a color/style pair are given, raises an +ArgumentError+
|
|
45
|
+
# If the given item is not a +StackItem+, raises an +ArgumentError+
|
|
46
|
+
#
|
|
47
|
+
#: (?StackItem? item, ?color: CLI::UI::Color?, ?style: CLI::UI::Frame::FrameStyle?) -> void
|
|
48
|
+
def push(item = nil, color: nil, style: nil)
|
|
49
|
+
if color.nil? != style.nil? || item.nil? == color.nil?
|
|
50
|
+
raise ArgumentError, 'Must give one of item or color: and style:'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
c = color #: as !nil
|
|
54
|
+
s = style #: as !nil
|
|
55
|
+
items.push(item || StackItem.new(c, s))
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Removes and returns the last stack item off the stack
|
|
59
|
+
#: -> StackItem?
|
|
60
|
+
def pop
|
|
61
|
+
items.pop
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module CLI
|
|
5
|
+
module UI
|
|
6
|
+
module Frame
|
|
7
|
+
module FrameStyle
|
|
8
|
+
module Box
|
|
9
|
+
extend FrameStyle
|
|
10
|
+
|
|
11
|
+
VERTICAL = '┃'
|
|
12
|
+
HORIZONTAL = '━'
|
|
13
|
+
DIVIDER = '┣'
|
|
14
|
+
TOP_LEFT = '┏'
|
|
15
|
+
BOTTOM_LEFT = '┗'
|
|
16
|
+
|
|
17
|
+
class << self
|
|
18
|
+
# @override
|
|
19
|
+
#: -> Symbol
|
|
20
|
+
def style_name
|
|
21
|
+
:box
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @override
|
|
25
|
+
#: -> String
|
|
26
|
+
def prefix
|
|
27
|
+
VERTICAL
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Draws the "Open" line for this frame style
|
|
31
|
+
#
|
|
32
|
+
# ==== Attributes
|
|
33
|
+
#
|
|
34
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
35
|
+
#
|
|
36
|
+
# ==== Options
|
|
37
|
+
#
|
|
38
|
+
# * +:color+ - (required) The color of the frame.
|
|
39
|
+
#
|
|
40
|
+
# ==== Output:
|
|
41
|
+
#
|
|
42
|
+
# ┏━━ Open ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
#
|
|
44
|
+
# @override
|
|
45
|
+
#: (String text, color: CLI::UI::Color) -> String
|
|
46
|
+
def start(text, color:)
|
|
47
|
+
edge(text, color: color, first: TOP_LEFT)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Draws a "divider" line for the current frame style
|
|
51
|
+
#
|
|
52
|
+
# ==== Attributes
|
|
53
|
+
#
|
|
54
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
55
|
+
#
|
|
56
|
+
# ==== Options
|
|
57
|
+
#
|
|
58
|
+
# * +:color+ - (required) The color of the frame.
|
|
59
|
+
#
|
|
60
|
+
# ==== Output:
|
|
61
|
+
#
|
|
62
|
+
# ┣━━ Divider ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
63
|
+
#
|
|
64
|
+
# @override
|
|
65
|
+
#: (String text, color: CLI::UI::Color) -> String
|
|
66
|
+
def divider(text, color:)
|
|
67
|
+
edge(text, color: color, first: DIVIDER)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Draws the "Close" line for this frame style
|
|
71
|
+
#
|
|
72
|
+
# ==== Attributes
|
|
73
|
+
#
|
|
74
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
75
|
+
#
|
|
76
|
+
# ==== Options
|
|
77
|
+
#
|
|
78
|
+
# * +:color+ - (required) The color of the frame.
|
|
79
|
+
# * +:right_text+ - Text to print at the right of the line. Defaults to nil
|
|
80
|
+
#
|
|
81
|
+
# ==== Output:
|
|
82
|
+
#
|
|
83
|
+
# ┗━━ Close ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
84
|
+
#
|
|
85
|
+
# @override
|
|
86
|
+
#: (String text, color: CLI::UI::Color, ?right_text: String?) -> String
|
|
87
|
+
def close(text, color:, right_text: nil)
|
|
88
|
+
edge(text, color: color, right_text: right_text, first: BOTTOM_LEFT)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
private
|
|
92
|
+
|
|
93
|
+
#: (String text, color: CLI::UI::Color, first: String, ?right_text: String?) -> String
|
|
94
|
+
def edge(text, color:, first:, right_text: nil)
|
|
95
|
+
color = CLI::UI.resolve_color(color)
|
|
96
|
+
|
|
97
|
+
preamble = +''
|
|
98
|
+
|
|
99
|
+
preamble << color.code if CLI::UI.enable_color?
|
|
100
|
+
preamble << first << (HORIZONTAL * 2)
|
|
101
|
+
|
|
102
|
+
unless text.empty?
|
|
103
|
+
preamble << ' ' << CLI::UI.resolve_text("{{#{color.name}:#{text}}}") << ' '
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
termwidth = CLI::UI::Terminal.width
|
|
107
|
+
|
|
108
|
+
suffix = +''
|
|
109
|
+
|
|
110
|
+
if right_text
|
|
111
|
+
suffix << ' ' << right_text << ' '
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
preamble_width = CLI::UI::ANSI.printing_width(preamble)
|
|
115
|
+
preamble_start = Frame.prefix_width
|
|
116
|
+
# If prefix_width is non-zero, we need to subtract the width of
|
|
117
|
+
# the final space, since we're going to write over it.
|
|
118
|
+
preamble_start -= 1 if preamble_start.nonzero?
|
|
119
|
+
preamble_end = preamble_start + preamble_width
|
|
120
|
+
|
|
121
|
+
suffix_width = CLI::UI::ANSI.printing_width(suffix)
|
|
122
|
+
suffix_end = termwidth - 2
|
|
123
|
+
suffix_start = suffix_end - suffix_width
|
|
124
|
+
|
|
125
|
+
if preamble_end > suffix_start
|
|
126
|
+
suffix = ''
|
|
127
|
+
# if preamble_end > termwidth
|
|
128
|
+
# we *could* truncate it, but let's just let it overflow to the
|
|
129
|
+
# next line and call it poor usage of this API.
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
o = +''
|
|
133
|
+
|
|
134
|
+
unless CLI::UI.enable_cursor?
|
|
135
|
+
linewidth = [0, termwidth - (preamble_end + suffix_width + 1)].max
|
|
136
|
+
|
|
137
|
+
o << color.code if CLI::UI.enable_color?
|
|
138
|
+
o << preamble
|
|
139
|
+
o << color.code if CLI::UI.enable_color?
|
|
140
|
+
o << (HORIZONTAL * linewidth)
|
|
141
|
+
o << color.code if CLI::UI.enable_color?
|
|
142
|
+
o << suffix
|
|
143
|
+
o << CLI::UI::Color::RESET.code if CLI::UI.enable_color?
|
|
144
|
+
o << "\n"
|
|
145
|
+
return o
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Jumping around the line can cause some unwanted flashes
|
|
149
|
+
o << CLI::UI::ANSI.hide_cursor
|
|
150
|
+
|
|
151
|
+
# reset to column 1 so that things like ^C don't ruin formatting
|
|
152
|
+
o << "\r"
|
|
153
|
+
|
|
154
|
+
# This code will print out a full line with the given preamble and
|
|
155
|
+
# suffix, as exemplified below.
|
|
156
|
+
#
|
|
157
|
+
# preamble_start suffix_start
|
|
158
|
+
# | preamble_end | suffix_end
|
|
159
|
+
# | | | | termwidth
|
|
160
|
+
# | | | | |
|
|
161
|
+
# V V V V V
|
|
162
|
+
# --- Preamble text --------------------- suffix text --
|
|
163
|
+
o << color.code if CLI::UI.enable_color?
|
|
164
|
+
o << print_at_x(preamble_start, HORIZONTAL * (termwidth - preamble_start)) # draw a full line
|
|
165
|
+
o << print_at_x(preamble_start, preamble)
|
|
166
|
+
o << color.code if CLI::UI.enable_color?
|
|
167
|
+
o << print_at_x(suffix_start, suffix)
|
|
168
|
+
o << CLI::UI::Color::RESET.code if CLI::UI.enable_color?
|
|
169
|
+
o << CLI::UI::ANSI.show_cursor
|
|
170
|
+
o << "\n"
|
|
171
|
+
|
|
172
|
+
o
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module CLI
|
|
5
|
+
module UI
|
|
6
|
+
module Frame
|
|
7
|
+
module FrameStyle
|
|
8
|
+
module Bracket
|
|
9
|
+
extend FrameStyle
|
|
10
|
+
|
|
11
|
+
VERTICAL = '┃'
|
|
12
|
+
HORIZONTAL = '━'
|
|
13
|
+
DIVIDER = '┣'
|
|
14
|
+
TOP_LEFT = '┏'
|
|
15
|
+
BOTTOM_LEFT = '┗'
|
|
16
|
+
|
|
17
|
+
class << self
|
|
18
|
+
# @override
|
|
19
|
+
#: -> Symbol
|
|
20
|
+
def style_name
|
|
21
|
+
:bracket
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @override
|
|
25
|
+
#: -> String
|
|
26
|
+
def prefix
|
|
27
|
+
VERTICAL
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Draws the "Open" line for this frame style
|
|
31
|
+
#
|
|
32
|
+
# ==== Attributes
|
|
33
|
+
#
|
|
34
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
35
|
+
#
|
|
36
|
+
# ==== Options
|
|
37
|
+
#
|
|
38
|
+
# * +:color+ - (required) The color of the frame.
|
|
39
|
+
#
|
|
40
|
+
# ==== Output
|
|
41
|
+
#
|
|
42
|
+
# ┏━━ Open
|
|
43
|
+
#
|
|
44
|
+
# @override
|
|
45
|
+
#: (String text, color: CLI::UI::Color) -> String
|
|
46
|
+
def start(text, color:)
|
|
47
|
+
edge(text, color: color, first: TOP_LEFT)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Draws a "divider" line for the current frame style
|
|
51
|
+
#
|
|
52
|
+
# ==== Attributes
|
|
53
|
+
#
|
|
54
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
55
|
+
#
|
|
56
|
+
# ==== Options
|
|
57
|
+
#
|
|
58
|
+
# * +:color+ - (required) The color of the frame.
|
|
59
|
+
#
|
|
60
|
+
# ==== Output:
|
|
61
|
+
#
|
|
62
|
+
# ┣━━ Divider
|
|
63
|
+
#
|
|
64
|
+
# @override
|
|
65
|
+
#: (String text, color: CLI::UI::Color) -> String
|
|
66
|
+
def divider(text, color:)
|
|
67
|
+
edge(text, color: color, first: DIVIDER)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Draws the "Close" line for this frame style
|
|
71
|
+
#
|
|
72
|
+
# ==== Attributes
|
|
73
|
+
#
|
|
74
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
75
|
+
#
|
|
76
|
+
# ==== Options
|
|
77
|
+
#
|
|
78
|
+
# * +:color+ - (required) The color of the frame.
|
|
79
|
+
# * +:right_text+ - Text to print at the right of the line. Defaults to nil
|
|
80
|
+
#
|
|
81
|
+
# ==== Output:
|
|
82
|
+
#
|
|
83
|
+
# ┗━━ Close
|
|
84
|
+
#
|
|
85
|
+
# @override
|
|
86
|
+
#: (String text, color: CLI::UI::Color, ?right_text: String?) -> String
|
|
87
|
+
def close(text, color:, right_text: nil)
|
|
88
|
+
edge(text, color: color, right_text: right_text, first: BOTTOM_LEFT)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
private
|
|
92
|
+
|
|
93
|
+
#: (String text, color: CLI::UI::Color, first: String, ?right_text: String?) -> String
|
|
94
|
+
def edge(text, color:, first:, right_text: nil)
|
|
95
|
+
color = CLI::UI.resolve_color(color)
|
|
96
|
+
|
|
97
|
+
preamble = +''
|
|
98
|
+
|
|
99
|
+
preamble << color.code if CLI::UI.enable_color?
|
|
100
|
+
preamble << first << (HORIZONTAL * 2)
|
|
101
|
+
|
|
102
|
+
unless text.empty?
|
|
103
|
+
preamble << ' ' << CLI::UI.resolve_text("{{#{color.name}:#{text}}}") << ' '
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
suffix = +''
|
|
107
|
+
|
|
108
|
+
if right_text
|
|
109
|
+
suffix << ' ' << right_text << ' '
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
o = +''
|
|
113
|
+
|
|
114
|
+
unless CLI::UI.enable_cursor?
|
|
115
|
+
o << color.code if CLI::UI.enable_color?
|
|
116
|
+
o << preamble
|
|
117
|
+
o << color.code if CLI::UI.enable_color?
|
|
118
|
+
o << suffix
|
|
119
|
+
o << CLI::UI::Color::RESET.code if CLI::UI.enable_color?
|
|
120
|
+
o << "\n"
|
|
121
|
+
|
|
122
|
+
return o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
preamble_start = Frame.prefix_width
|
|
126
|
+
|
|
127
|
+
# If prefix_width is non-zero, we need to subtract the width of
|
|
128
|
+
# the final space, since we're going to write over it.
|
|
129
|
+
preamble_start -= 1 if preamble_start.nonzero?
|
|
130
|
+
|
|
131
|
+
# Jumping around the line can cause some unwanted flashes
|
|
132
|
+
o << CLI::UI::ANSI.hide_cursor
|
|
133
|
+
|
|
134
|
+
# reset to column 1 so that things like ^C don't ruin formatting
|
|
135
|
+
o << "\r"
|
|
136
|
+
|
|
137
|
+
o << color.code if CLI::UI.enable_color?
|
|
138
|
+
o << print_at_x(preamble_start, preamble)
|
|
139
|
+
o << color.code if CLI::UI.enable_color?
|
|
140
|
+
o << suffix
|
|
141
|
+
o << CLI::UI::Color::RESET.code if CLI::UI.enable_color?
|
|
142
|
+
o << CLI::UI::ANSI.show_cursor
|
|
143
|
+
o << "\n"
|
|
144
|
+
|
|
145
|
+
o
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'cli/ui/frame'
|
|
5
|
+
|
|
6
|
+
module CLI
|
|
7
|
+
module UI
|
|
8
|
+
module Frame
|
|
9
|
+
# @abstract
|
|
10
|
+
module FrameStyle
|
|
11
|
+
include Kernel
|
|
12
|
+
|
|
13
|
+
autoload(:Box, 'cli/ui/frame/frame_style/box')
|
|
14
|
+
autoload(:Bracket, 'cli/ui/frame/frame_style/bracket')
|
|
15
|
+
|
|
16
|
+
MAP = {
|
|
17
|
+
box: -> { FrameStyle::Box },
|
|
18
|
+
bracket: -> { FrameStyle::Bracket },
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class << self
|
|
22
|
+
# Lookup a frame style via its name
|
|
23
|
+
#
|
|
24
|
+
# ==== Attributes
|
|
25
|
+
#
|
|
26
|
+
# * +symbol+ - frame style name to lookup
|
|
27
|
+
#: ((String | Symbol) name) -> FrameStyle
|
|
28
|
+
def lookup(name)
|
|
29
|
+
MAP.fetch(name.to_sym).call
|
|
30
|
+
rescue KeyError
|
|
31
|
+
raise(InvalidFrameStyleName, name)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @abstract
|
|
36
|
+
#: -> Symbol
|
|
37
|
+
def style_name
|
|
38
|
+
raise(NotImplementedError)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns the character(s) that should be printed at the beginning
|
|
42
|
+
# of lines inside this frame
|
|
43
|
+
# @abstract
|
|
44
|
+
#: -> String
|
|
45
|
+
def prefix
|
|
46
|
+
raise(NotImplementedError)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns the printing width of the prefix
|
|
50
|
+
#: -> Integer
|
|
51
|
+
def prefix_width
|
|
52
|
+
CLI::UI::ANSI.printing_width(prefix)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Draws the "Open" line for this frame style
|
|
56
|
+
#
|
|
57
|
+
# ==== Attributes
|
|
58
|
+
#
|
|
59
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
60
|
+
#
|
|
61
|
+
# ==== Options
|
|
62
|
+
#
|
|
63
|
+
# * +:color+ - (required) The color of the frame.
|
|
64
|
+
#
|
|
65
|
+
# @abstract
|
|
66
|
+
#: (String, color: CLI::UI::Color) -> String
|
|
67
|
+
def start(text, color:)
|
|
68
|
+
raise(NotImplementedError)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Draws the "Close" line for this frame style
|
|
72
|
+
#
|
|
73
|
+
# ==== Attributes
|
|
74
|
+
#
|
|
75
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
76
|
+
#
|
|
77
|
+
# ==== Options
|
|
78
|
+
#
|
|
79
|
+
# * +:color+ - (required) The color of the frame.
|
|
80
|
+
# * +:right_text+ - Text to print at the right of the line. Defaults to nil
|
|
81
|
+
#
|
|
82
|
+
# @abstract
|
|
83
|
+
#: (String, color: CLI::UI::Color, ?right_text: String?) -> String
|
|
84
|
+
def close(text, color:, right_text: nil)
|
|
85
|
+
raise(NotImplementedError)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Draws a "divider" line for the current frame style
|
|
89
|
+
#
|
|
90
|
+
# ==== Attributes
|
|
91
|
+
#
|
|
92
|
+
# * +text+ - (required) the text/title to output in the frame
|
|
93
|
+
#
|
|
94
|
+
# ==== Options
|
|
95
|
+
#
|
|
96
|
+
# * +:color+ - (required) The color of the frame.
|
|
97
|
+
#
|
|
98
|
+
# @abstract
|
|
99
|
+
#: (String, color: CLI::UI::Color) -> String
|
|
100
|
+
def divider(text, color:)
|
|
101
|
+
raise(NotImplementedError)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
#: (Integer x, String str) -> String
|
|
105
|
+
def print_at_x(x, str)
|
|
106
|
+
CLI::UI::ANSI.cursor_horizontal_absolute(1 + x) + str
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
class InvalidFrameStyleName < ArgumentError
|
|
110
|
+
#: ((String | Symbol) name) -> void
|
|
111
|
+
def initialize(name)
|
|
112
|
+
super
|
|
113
|
+
@name = name
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
#: -> String
|
|
117
|
+
def message
|
|
118
|
+
keys = FrameStyle::MAP.keys.map(&:inspect).join(', ')
|
|
119
|
+
"invalid frame style: #{@name.inspect} " \
|
|
120
|
+
'-- must be one of CLI::UI::Frame::FrameStyle::MAP ' \
|
|
121
|
+
"(#{keys})"
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|