ruby_raider 1.1.4 → 3.0.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 +4 -4
- data/.github/workflows/e2e_tests.yml +58 -0
- data/.github/workflows/integration.yml +4 -6
- data/.github/workflows/reek.yml +6 -5
- data/.github/workflows/release.yml +175 -0
- data/.github/workflows/rubocop.yml +7 -6
- data/.github/workflows/steep.yml +21 -0
- data/.github/workflows/system_tests.yml +83 -0
- data/.gitignore +1 -1
- data/.reek.yml +46 -4
- data/.rubocop.yml +24 -0
- data/.ruby-version +1 -1
- data/README.md +140 -77
- data/RELEASE.md +412 -0
- data/RELEASE_QUICK_GUIDE.md +77 -0
- data/Steepfile +22 -0
- data/assets/ruby_raider_logo.svg +51 -0
- data/bin/release +186 -0
- data/lib/adopter/adopt_menu.rb +146 -0
- data/lib/adopter/converters/base_converter.rb +84 -0
- data/lib/adopter/converters/identity_converter.rb +53 -0
- data/lib/adopter/migration_plan.rb +74 -0
- data/lib/adopter/migrator.rb +96 -0
- data/lib/adopter/plan_builder.rb +275 -0
- data/lib/adopter/project_analyzer.rb +252 -0
- data/lib/adopter/project_detector.rb +157 -0
- data/lib/commands/adopt_commands.rb +42 -0
- data/lib/commands/plugin_commands.rb +0 -2
- data/lib/commands/scaffolding_commands.rb +220 -37
- data/lib/commands/utility_commands.rb +82 -2
- data/lib/generators/automation/automation_generator.rb +0 -7
- data/lib/generators/automation/templates/account.tt +9 -5
- data/lib/generators/automation/templates/appium_caps.tt +60 -6
- data/lib/generators/automation/templates/home.tt +4 -4
- data/lib/generators/automation/templates/login.tt +61 -4
- data/lib/generators/automation/templates/page.tt +13 -7
- data/lib/generators/automation/templates/partials/element.tt +1 -1
- data/lib/generators/automation/templates/partials/home_page_selector.tt +4 -4
- data/lib/generators/automation/templates/partials/initialize_selector.tt +3 -8
- data/lib/generators/automation/templates/partials/pdp_page_selector.tt +4 -4
- data/lib/generators/automation/templates/partials/url_methods.tt +0 -1
- data/lib/generators/automation/templates/partials/visit_method.tt +11 -1
- data/lib/generators/automation/templates/pdp.tt +1 -1
- data/lib/generators/common_generator.rb +12 -0
- data/lib/generators/cucumber/cucumber_generator.rb +36 -0
- data/lib/generators/cucumber/templates/accessibility_feature.tt +5 -0
- data/lib/generators/cucumber/templates/accessibility_steps.tt +21 -0
- data/lib/generators/cucumber/templates/cucumber.tt +8 -1
- data/lib/generators/cucumber/templates/env.tt +6 -4
- data/lib/generators/cucumber/templates/feature.tt +0 -4
- data/lib/generators/cucumber/templates/partials/appium_env.tt +5 -0
- data/lib/generators/cucumber/templates/partials/capybara_env.tt +38 -0
- data/lib/generators/cucumber/templates/partials/capybara_world.tt +6 -0
- data/lib/generators/cucumber/templates/partials/driver_world.tt +1 -4
- data/lib/generators/cucumber/templates/partials/mobile_steps.tt +2 -2
- data/lib/generators/cucumber/templates/partials/selenium_env.tt +22 -35
- data/lib/generators/cucumber/templates/partials/watir_env.tt +20 -1
- data/lib/generators/cucumber/templates/partials/web_steps.tt +10 -15
- data/lib/generators/cucumber/templates/performance_feature.tt +5 -0
- data/lib/generators/cucumber/templates/performance_steps.tt +17 -0
- data/lib/generators/cucumber/templates/steps.tt +2 -2
- data/lib/generators/cucumber/templates/visual_feature.tt +5 -0
- data/lib/generators/cucumber/templates/visual_steps.tt +19 -0
- data/lib/generators/cucumber/templates/world.tt +5 -3
- data/lib/generators/generator.rb +50 -7
- data/lib/generators/helper_generator.rb +39 -9
- data/lib/generators/infrastructure/github_generator.rb +6 -0
- data/lib/generators/infrastructure/templates/github.tt +12 -8
- data/lib/generators/infrastructure/templates/github_appium.tt +108 -0
- data/lib/generators/infrastructure/templates/gitlab.tt +6 -3
- data/lib/generators/invoke_generators.rb +43 -9
- data/lib/generators/menu_generator.rb +122 -11
- data/lib/generators/minitest/minitest_generator.rb +35 -0
- data/lib/generators/minitest/templates/accessibility_test.tt +26 -0
- data/lib/generators/minitest/templates/performance_test.tt +18 -0
- data/lib/generators/minitest/templates/test.tt +64 -0
- data/lib/generators/minitest/templates/visual_test.tt +23 -0
- data/lib/generators/rspec/rspec_generator.rb +16 -4
- data/lib/generators/rspec/templates/accessibility_spec.tt +25 -0
- data/lib/generators/rspec/templates/performance_spec.tt +18 -0
- data/lib/generators/rspec/templates/spec.tt +13 -41
- data/lib/generators/rspec/templates/visual_spec.tt +20 -0
- data/lib/generators/template_renderer/partial_cache.rb +126 -0
- data/lib/generators/template_renderer/partial_resolver.rb +110 -0
- data/lib/generators/template_renderer/template_error.rb +50 -0
- data/lib/generators/template_renderer.rb +106 -0
- data/lib/generators/templates/common/config.tt +2 -2
- data/lib/generators/templates/common/gemfile.tt +36 -9
- data/lib/generators/templates/common/git_ignore.tt +6 -1
- data/lib/generators/templates/common/partials/mobile_config.tt +5 -1
- data/lib/generators/templates/common/partials/web_config.tt +17 -8
- data/lib/generators/templates/common/rakefile.tt +36 -0
- data/lib/generators/templates/common/read_me.tt +43 -91
- data/lib/generators/templates/common/rspec.tt +3 -0
- data/lib/generators/templates/common/ruby_version.tt +1 -0
- data/lib/generators/templates/helpers/allure_helper.tt +13 -2
- data/lib/generators/templates/helpers/browser_helper.tt +13 -2
- data/lib/generators/templates/helpers/capybara_helper.tt +32 -0
- data/lib/generators/templates/helpers/debug_helper.tt +190 -0
- data/lib/generators/templates/helpers/driver_helper.tt +3 -11
- data/lib/generators/templates/helpers/partials/allure_imports.tt +3 -1
- data/lib/generators/templates/helpers/partials/allure_requirements.tt +3 -1
- data/lib/generators/templates/helpers/partials/appium_driver.tt +44 -0
- data/lib/generators/templates/helpers/partials/browserstack_config.tt +13 -0
- data/lib/generators/templates/helpers/partials/debug_diagnostics.tt +7 -0
- data/lib/generators/templates/helpers/partials/debug_start.tt +7 -0
- data/lib/generators/templates/helpers/partials/driver_and_options.tt +5 -115
- data/lib/generators/templates/helpers/partials/quit_driver.tt +3 -1
- data/lib/generators/templates/helpers/partials/screenshot.tt +3 -1
- data/lib/generators/templates/helpers/partials/selenium_driver.tt +26 -0
- data/lib/generators/templates/helpers/partials/video_start.tt +9 -0
- data/lib/generators/templates/helpers/partials/video_stop.tt +4 -0
- data/lib/generators/templates/helpers/performance_helper.tt +57 -0
- data/lib/generators/templates/helpers/spec_helper.tt +72 -10
- data/lib/generators/templates/helpers/test_helper.tt +94 -0
- data/lib/generators/templates/helpers/video_helper.tt +270 -0
- data/lib/generators/templates/helpers/visual_helper.tt +39 -46
- data/lib/llm/client.rb +79 -0
- data/lib/llm/config.rb +57 -0
- data/lib/llm/prompts.rb +84 -0
- data/lib/llm/provider.rb +27 -0
- data/lib/llm/providers/anthropic_provider.rb +43 -0
- data/lib/llm/providers/ollama_provider.rb +56 -0
- data/lib/llm/providers/openai_provider.rb +42 -0
- data/lib/llm/response_parser.rb +67 -0
- data/lib/plugin/plugin.rb +22 -20
- data/lib/plugin/plugin_exposer.rb +16 -38
- data/lib/ruby_raider.rb +51 -11
- data/lib/scaffolding/crud_generator.rb +94 -0
- data/lib/scaffolding/dry_run_presenter.rb +16 -0
- data/lib/scaffolding/name_normalizer.rb +63 -0
- data/lib/scaffolding/page_introspector.rb +45 -0
- data/lib/scaffolding/project_detector.rb +72 -0
- data/lib/scaffolding/scaffold_menu.rb +103 -0
- data/lib/scaffolding/scaffolding.rb +158 -11
- data/lib/scaffolding/templates/component.tt +30 -0
- data/lib/scaffolding/templates/feature.tt +4 -4
- data/lib/scaffolding/templates/helper.tt +15 -1
- data/lib/scaffolding/templates/page_from_url.tt +75 -0
- data/lib/scaffolding/templates/page_object.tt +50 -1
- data/lib/scaffolding/templates/spec.tt +33 -2
- data/lib/scaffolding/templates/spec_from_page.tt +31 -0
- data/lib/scaffolding/templates/spec_from_url.tt +46 -0
- data/lib/scaffolding/templates/steps.tt +17 -5
- data/lib/scaffolding/url_analyzer.rb +179 -0
- data/lib/utilities/desktop_downloader.rb +177 -0
- data/lib/utilities/logo.rb +83 -0
- data/lib/utilities/utilities.rb +53 -20
- data/lib/version +1 -1
- data/ruby_raider.gemspec +1 -0
- data/sig/adopter/adopt_menu.rbs +25 -0
- data/sig/adopter/converters/base_converter.rbs +23 -0
- data/sig/adopter/converters/identity_converter.rbs +16 -0
- data/sig/adopter/migration_plan.rbs +34 -0
- data/sig/adopter/migrator.rbs +21 -0
- data/sig/adopter/plan_builder.rbs +38 -0
- data/sig/adopter/project_analyzer.rbs +39 -0
- data/sig/adopter/project_detector.rbs +26 -0
- data/sig/commands/adopt_commands.rbs +8 -0
- data/sig/commands/loaded_commands.rbs +5 -0
- data/sig/commands/plugin_commands.rbs +9 -0
- data/sig/commands/scaffolding_commands.rbs +28 -0
- data/sig/commands/utility_commands.rbs +21 -0
- data/sig/generators/automation/automation_generator.rbs +20 -0
- data/sig/generators/common_generator.rbs +12 -0
- data/sig/generators/cucumber/cucumber_generator.rbs +16 -0
- data/sig/generators/generator.rbs +40 -0
- data/sig/generators/helper_generator.rbs +18 -0
- data/sig/generators/infrastructure/github_generator.rbs +5 -0
- data/sig/generators/infrastructure/gitlab_generator.rbs +4 -0
- data/sig/generators/invoke_generators.rbs +10 -0
- data/sig/generators/menu_generator.rbs +29 -0
- data/sig/generators/minitest/minitest_generator.rbs +8 -0
- data/sig/generators/rspec/rspec_generator.rbs +8 -0
- data/sig/generators/template_renderer/partial_cache.rbs +20 -0
- data/sig/generators/template_renderer/partial_resolver.rbs +20 -0
- data/sig/generators/template_renderer/template_error.rbs +19 -0
- data/sig/generators/template_renderer.rbs +10 -0
- data/sig/llm/client.rbs +15 -0
- data/sig/llm/config.rbs +20 -0
- data/sig/llm/prompts.rbs +8 -0
- data/sig/llm/provider.rbs +12 -0
- data/sig/llm/providers/anthropic_provider.rbs +16 -0
- data/sig/llm/providers/ollama_provider.rbs +18 -0
- data/sig/llm/providers/openai_provider.rbs +16 -0
- data/sig/llm/response_parser.rbs +13 -0
- data/sig/plugin/plugin.rbs +24 -0
- data/sig/plugin/plugin_exposer.rbs +20 -0
- data/sig/ruby_raider.rbs +15 -0
- data/sig/scaffolding/crud_generator.rbs +16 -0
- data/sig/scaffolding/dry_run_presenter.rbs +4 -0
- data/sig/scaffolding/name_normalizer.rbs +17 -0
- data/sig/scaffolding/page_introspector.rbs +14 -0
- data/sig/scaffolding/project_detector.rbs +14 -0
- data/sig/scaffolding/scaffold_menu.rbs +18 -0
- data/sig/scaffolding/scaffolding.rbs +55 -0
- data/sig/scaffolding/url_analyzer.rbs +28 -0
- data/sig/utilities/desktop_downloader.rbs +23 -0
- data/sig/utilities/logger.rbs +13 -0
- data/sig/utilities/logo.rbs +16 -0
- data/sig/utilities/utilities.rbs +30 -0
- data/sig/vendor/thor.rbs +34 -0
- data/sig/vendor/tty_prompt.rbs +15 -0
- data/spec/adopter/adopt_menu_spec.rb +176 -0
- data/spec/adopter/converters/identity_converter_spec.rb +145 -0
- data/spec/adopter/migration_plan_spec.rb +113 -0
- data/spec/adopter/migrator_spec.rb +277 -0
- data/spec/adopter/plan_builder_spec.rb +298 -0
- data/spec/adopter/project_analyzer_spec.rb +337 -0
- data/spec/adopter/project_detector_spec.rb +295 -0
- data/spec/commands/raider_commands_spec.rb +129 -0
- data/spec/generators/fixtures/templates/test.tt +1 -0
- data/spec/generators/fixtures/templates/test_partial.tt +1 -0
- data/spec/generators/generator_spec.rb +23 -0
- data/spec/generators/template_renderer_spec.rb +298 -0
- data/spec/integration/commands/scaffolding_commands_spec.rb +2 -2
- data/spec/integration/commands/utility_commands_spec.rb +24 -4
- data/spec/integration/content/ci_content_spec.rb +119 -0
- data/spec/integration/content/common_content_spec.rb +288 -0
- data/spec/integration/content/config_content_spec.rb +175 -0
- data/spec/integration/content/content_helper.rb +32 -0
- data/spec/integration/content/gemfile_content_spec.rb +209 -0
- data/spec/integration/content/helper_content_spec.rb +485 -0
- data/spec/integration/content/page_content_spec.rb +259 -0
- data/spec/integration/content/reporter_content_spec.rb +236 -0
- data/spec/integration/content/skip_flags_content_spec.rb +206 -0
- data/spec/integration/content/syntax_validation_spec.rb +30 -0
- data/spec/integration/content/test_content_spec.rb +266 -0
- data/spec/integration/end_to_end_features_spec.rb +690 -0
- data/spec/integration/end_to_end_spec.rb +361 -0
- data/spec/integration/generators/automation_generator_spec.rb +9 -21
- data/spec/integration/generators/axe_addon_spec.rb +150 -0
- data/spec/integration/generators/common_generator_spec.rb +48 -49
- data/spec/integration/generators/config_features_spec.rb +155 -0
- data/spec/integration/generators/cucumber_generator_spec.rb +7 -7
- data/spec/integration/generators/debug_helper_spec.rb +68 -0
- data/spec/integration/generators/github_generator_spec.rb +8 -8
- data/spec/integration/generators/gitlab_generator_spec.rb +8 -8
- data/spec/integration/generators/helpers_generator_spec.rb +70 -44
- data/spec/integration/generators/lighthouse_addon_spec.rb +132 -0
- data/spec/integration/generators/minitest_generator_spec.rb +64 -0
- data/spec/integration/generators/reporter_spec.rb +159 -0
- data/spec/integration/generators/rspec_generator_spec.rb +7 -7
- data/spec/integration/generators/skip_flags_spec.rb +134 -0
- data/spec/integration/generators/visual_addon_spec.rb +148 -0
- data/spec/integration/settings_helper.rb +1 -4
- data/spec/integration/spec_helper.rb +46 -11
- data/spec/llm/client_spec.rb +79 -0
- data/spec/llm/config_spec.rb +92 -0
- data/spec/llm/prompts_spec.rb +49 -0
- data/spec/llm/response_parser_spec.rb +92 -0
- data/spec/menus/adopter_adopt_menu_spec.rb +97 -0
- data/spec/menus/menu_generator_spec.rb +263 -0
- data/spec/scaffolding/name_normalizer_spec.rb +113 -0
- data/spec/scaffolding/page_introspector_spec.rb +82 -0
- data/spec/scaffolding/scaffold_project_detector_spec.rb +104 -0
- data/spec/scaffolding/scaffolding_features_spec.rb +311 -0
- data/spec/scaffolding/url_analyzer_spec.rb +110 -0
- data/spec/system/adopt_matrix_spec.rb +537 -0
- data/spec/system/adopt_spec.rb +225 -0
- data/spec/system/capybara_spec.rb +42 -0
- data/spec/system/selenium_spec.rb +19 -17
- data/spec/system/support/system_test_helper.rb +33 -0
- data/spec/system/watir_spec.rb +19 -17
- data/spec/utilities/desktop_downloader_spec.rb +92 -0
- metadata +193 -18
- data/.github/workflows/push_gem.yml +0 -37
- data/.github/workflows/selenium.yml +0 -22
- data/.github/workflows/watir.yml +0 -22
- data/lib/generators/automation/templates/partials/android_caps.tt +0 -17
- data/lib/generators/automation/templates/partials/cross_platform_caps.tt +0 -25
- data/lib/generators/automation/templates/partials/ios_caps.tt +0 -18
- data/lib/generators/automation/templates/partials/selenium_account.tt +0 -9
- data/lib/generators/automation/templates/partials/selenium_login.tt +0 -34
- data/lib/generators/automation/templates/partials/watir_account.tt +0 -7
- data/lib/generators/automation/templates/partials/watir_login.tt +0 -32
- data/lib/generators/automation/templates/visual_options.tt +0 -16
- data/lib/generators/templates/helpers/visual_spec_helper.tt +0 -35
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Type definitions for MenuGenerator
|
|
2
|
+
class MenuGenerator
|
|
3
|
+
include InvokeGenerators
|
|
4
|
+
|
|
5
|
+
attr_reader prompt: TTY::Prompt
|
|
6
|
+
attr_reader name: String
|
|
7
|
+
|
|
8
|
+
def initialize: (String project_name) -> void
|
|
9
|
+
def generate_choice_menu: () -> void
|
|
10
|
+
def choose_test_framework: (String automation) -> void
|
|
11
|
+
def set_up_framework: (untyped options) -> void
|
|
12
|
+
def choose_mobile_platform: () -> void
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def offer_desktop_download: () -> void
|
|
17
|
+
def select_test_framework: (String automation) -> void
|
|
18
|
+
def create_framework_options: (Hash[Symbol, untyped] params) -> untyped
|
|
19
|
+
def select_reporter: (String framework, String automation_type, ?String? ci_platform) -> void
|
|
20
|
+
def select_accessibility: (String framework, String automation_type, ?String? ci_platform, ?String? reporter) -> void
|
|
21
|
+
def select_visual: (String framework, String automation_type, ?String? ci_platform, ?String? reporter, ?bool accessibility) -> void
|
|
22
|
+
def select_performance: (String framework, String automation_type, ?String? ci_platform, ?String? reporter, ?bool accessibility, ?bool visual) -> void
|
|
23
|
+
def mobile_automation?: (String automation_type) -> bool
|
|
24
|
+
def create_framework: (String framework, String automation_type, ?String? ci_platform, ?String? reporter, ?bool accessibility, ?bool visual, ?bool performance) -> void
|
|
25
|
+
def yes_no_menu_choices: () -> Hash[Symbol, Proc]
|
|
26
|
+
def select_automation_framework: (untyped menu) -> void
|
|
27
|
+
def automation_options: (untyped menu) -> void
|
|
28
|
+
def select_ci_platform: (String framework, String automation) -> void
|
|
29
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Type definitions for MinitestGenerator
|
|
2
|
+
class MinitestGenerator < Generator
|
|
3
|
+
def generate_login_test: () -> void
|
|
4
|
+
def generate_pdp_test: () -> void
|
|
5
|
+
def generate_visual_test: () -> void
|
|
6
|
+
def generate_accessibility_test: () -> void
|
|
7
|
+
def generate_performance_test: () -> void
|
|
8
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Type definitions for RspecGenerator
|
|
2
|
+
class RspecGenerator < Generator
|
|
3
|
+
def generate_login_spec: () -> void
|
|
4
|
+
def generate_pdp_spec: () -> void
|
|
5
|
+
def generate_visual_spec: () -> void
|
|
6
|
+
def generate_accessibility_spec: () -> void
|
|
7
|
+
def generate_performance_spec: () -> void
|
|
8
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Type definitions for PartialCache
|
|
2
|
+
module TemplateRenderer
|
|
3
|
+
class PartialCache
|
|
4
|
+
@cache: Hash[String, Hash[Symbol, untyped]]
|
|
5
|
+
@generator_class: Class
|
|
6
|
+
@resolver: PartialResolver
|
|
7
|
+
|
|
8
|
+
def initialize: (Class generator_class) -> void
|
|
9
|
+
def render_partial: (String name, Binding binding, ?Hash[Symbol, untyped] options) -> String
|
|
10
|
+
def clear: () -> void
|
|
11
|
+
def stats: () -> Hash[Symbol, untyped]
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def build_cache_key: (String name, String? trim_mode) -> String
|
|
16
|
+
def get_or_compile: (String cache_key, String path, String? trim_mode) -> ERB
|
|
17
|
+
def compile_template: (String path, String? trim_mode) -> ERB
|
|
18
|
+
def estimate_cache_size: () -> Integer
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Type definitions for PartialResolver
|
|
2
|
+
module TemplateRenderer
|
|
3
|
+
class PartialResolver
|
|
4
|
+
PARTIAL_EXTENSION: String
|
|
5
|
+
PARTIALS_DIR: String
|
|
6
|
+
|
|
7
|
+
@generator_class: Class
|
|
8
|
+
|
|
9
|
+
def initialize: (Class generator_class) -> void
|
|
10
|
+
def resolve: (String name, Binding binding) -> String
|
|
11
|
+
def search_paths: (String name, Binding binding) -> Array[String]
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def caller_file_from_binding: (Binding binding) -> String?
|
|
16
|
+
def search_source_paths: (String partial_filename) -> { found: String?, searched: Array[String] }
|
|
17
|
+
def source_paths: () -> Array[String]
|
|
18
|
+
def partial_dirs: () -> Array[String]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Type definitions for template errors
|
|
2
|
+
module TemplateRenderer
|
|
3
|
+
class TemplateError < StandardError
|
|
4
|
+
attr_reader partial_name: String?
|
|
5
|
+
attr_reader searched_paths: Array[String]?
|
|
6
|
+
attr_reader original_error: StandardError?
|
|
7
|
+
|
|
8
|
+
def initialize: (String message, ?partial_name: String?, ?searched_paths: Array[String]?, ?original_error: StandardError?) -> void
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
class TemplateNotFoundError < TemplateError
|
|
12
|
+
def to_s: () -> String
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class TemplateRenderError < TemplateError
|
|
16
|
+
def initialize: (String message, partial_name: String?, ?original_error: StandardError?) -> void
|
|
17
|
+
def to_s: () -> String
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Type definitions for TemplateRenderer module
|
|
2
|
+
module TemplateRenderer
|
|
3
|
+
def partial: (String name, ?Hash[Symbol, untyped] options) -> String
|
|
4
|
+
|
|
5
|
+
module ClassMethods
|
|
6
|
+
def template_renderer: () -> TemplateRenderer::PartialCache
|
|
7
|
+
def clear_template_cache: () -> void
|
|
8
|
+
def template_cache_stats: () -> Hash[Symbol, untyped]
|
|
9
|
+
end
|
|
10
|
+
end
|
data/sig/llm/client.rbs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Type definitions for Llm::Client
|
|
2
|
+
module Llm
|
|
3
|
+
module Client
|
|
4
|
+
MAX_RETRIES: Integer
|
|
5
|
+
BASE_DELAY: Integer
|
|
6
|
+
|
|
7
|
+
def self?.complete: (String prompt, ?String? system_prompt) -> String?
|
|
8
|
+
def self?.available?: () -> bool
|
|
9
|
+
def self?.status: () -> Hash[Symbol, untyped]
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def self?.build_provider: () -> Llm::Provider?
|
|
14
|
+
end
|
|
15
|
+
end
|
data/sig/llm/config.rbs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Type definitions for Llm::Config
|
|
2
|
+
module Llm
|
|
3
|
+
class Config
|
|
4
|
+
PROVIDERS: Array[String]
|
|
5
|
+
|
|
6
|
+
attr_reader provider_name: String?
|
|
7
|
+
attr_reader api_key: String?
|
|
8
|
+
attr_reader model: String?
|
|
9
|
+
attr_reader url: String?
|
|
10
|
+
|
|
11
|
+
def initialize: () -> void
|
|
12
|
+
def configured?: () -> bool
|
|
13
|
+
def build_provider: () -> Provider?
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def env: (String key) -> String?
|
|
18
|
+
def config_value: (String key) -> String?
|
|
19
|
+
end
|
|
20
|
+
end
|
data/sig/llm/prompts.rbs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Type definitions for Llm::Prompts
|
|
2
|
+
module Llm
|
|
3
|
+
module Prompts
|
|
4
|
+
def self?.analyze_page: (String html, String url) -> String
|
|
5
|
+
def self?.generate_test_scenarios: (String class_name, Array[Hash[Symbol, untyped]] methods, String automation, String framework) -> String
|
|
6
|
+
def self?.system_prompt: () -> String
|
|
7
|
+
end
|
|
8
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Type definitions for Llm::Provider
|
|
2
|
+
module Llm
|
|
3
|
+
class Provider
|
|
4
|
+
def complete: (String prompt, ?system_prompt: String?) -> String?
|
|
5
|
+
def available?: () -> bool
|
|
6
|
+
def name: () -> String
|
|
7
|
+
|
|
8
|
+
private
|
|
9
|
+
|
|
10
|
+
def build_messages: (String prompt, String? system_prompt) -> Array[Hash[String, String]]
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Type definitions for Anthropic provider
|
|
2
|
+
module Llm
|
|
3
|
+
module Providers
|
|
4
|
+
class AnthropicProvider < Provider
|
|
5
|
+
DEFAULT_MODEL: String
|
|
6
|
+
|
|
7
|
+
def initialize: (api_key: String, ?model: String?) -> void
|
|
8
|
+
def complete: (String prompt, ?system_prompt: String?) -> String?
|
|
9
|
+
def available?: () -> bool
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def build_client: () -> untyped
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Type definitions for Ollama provider
|
|
2
|
+
module Llm
|
|
3
|
+
module Providers
|
|
4
|
+
class OllamaProvider < Provider
|
|
5
|
+
DEFAULT_MODEL: String
|
|
6
|
+
DEFAULT_URL: String
|
|
7
|
+
TIMEOUT: Integer
|
|
8
|
+
|
|
9
|
+
def initialize: (?model: String?, ?url: String?) -> void
|
|
10
|
+
def complete: (String prompt, ?system_prompt: String?) -> String?
|
|
11
|
+
def available?: () -> bool
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def post_request: (URI::Generic uri, Hash[Symbol, untyped] body) -> Net::HTTPResponse
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Type definitions for OpenAI provider
|
|
2
|
+
module Llm
|
|
3
|
+
module Providers
|
|
4
|
+
class OpenaiProvider < Provider
|
|
5
|
+
DEFAULT_MODEL: String
|
|
6
|
+
|
|
7
|
+
def initialize: (api_key: String, ?model: String?) -> void
|
|
8
|
+
def complete: (String prompt, ?system_prompt: String?) -> String?
|
|
9
|
+
def available?: () -> bool
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def build_client: () -> untyped
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Type definitions for Llm::ResponseParser
|
|
2
|
+
module Llm
|
|
3
|
+
module ResponseParser
|
|
4
|
+
def self?.parse_json: (String? response) -> Hash[Symbol, untyped]?
|
|
5
|
+
def self?.extract_elements: (String? response) -> Array[Hash[Symbol, untyped]]?
|
|
6
|
+
def self?.extract_scenarios: (String? response) -> Array[Hash[Symbol, untyped]]?
|
|
7
|
+
|
|
8
|
+
private
|
|
9
|
+
|
|
10
|
+
def self?.normalize_element: (Hash[Symbol, untyped] element) -> Hash[Symbol, untyped]?
|
|
11
|
+
def self?.extract_json: (String text) -> String?
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Type definitions for Plugin
|
|
2
|
+
module RubyRaider
|
|
3
|
+
module Plugin
|
|
4
|
+
def self?.add_plugin: (String plugin_name) -> void
|
|
5
|
+
def self?.delete_plugin: (String plugin_name) -> String?
|
|
6
|
+
def self?.installed_plugins: () -> Array[String]
|
|
7
|
+
def self?.installed?: (String plugin_name) -> bool
|
|
8
|
+
def self?.available?: (String plugin_name) -> bool
|
|
9
|
+
def self?.camelize: (String str) -> String
|
|
10
|
+
def self?.plugins: () -> Array[String]
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def self?.add_plugin_to_gemfile: (String plugin_name) -> void
|
|
15
|
+
def self?.remove_plugin_from_gemfile: (String plugin_name) -> void
|
|
16
|
+
def self?.last_plugin?: () -> bool
|
|
17
|
+
def self?.read_gemfile: () -> Array[String]
|
|
18
|
+
def self?.comment_present?: () -> bool
|
|
19
|
+
def self?.plugin_present?: (String plugin_name) -> bool
|
|
20
|
+
def self?.remove_plugins_and_comments: (String plugin_name) -> Array[String]
|
|
21
|
+
def self?.update_gemfile: (Array[String] output_lines) -> void
|
|
22
|
+
def self?.gemfile_guard: () -> untyped
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Type definitions for PluginExposer
|
|
2
|
+
module RubyRaider
|
|
3
|
+
module PluginExposer
|
|
4
|
+
FILE_PATH: String
|
|
5
|
+
|
|
6
|
+
def self?.expose_commands: (String plugin_name) -> void
|
|
7
|
+
def self?.remove_command: (String plugin_name) -> void
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def self?.any_commands?: () -> bool
|
|
12
|
+
def self?.read_loaded_commands: () -> Array[String]
|
|
13
|
+
def self?.formatted_command_without_space: (String plugin_name) -> String
|
|
14
|
+
def self?.formatted_command_with_space: (String plugin_name) -> String
|
|
15
|
+
def self?.plugin_present?: (String plugin_name) -> bool
|
|
16
|
+
def self?.select_command_formatting: (String plugin_name, String line) -> String?
|
|
17
|
+
def self?.require_plugin: (String plugin_name, String line) -> String?
|
|
18
|
+
def self?.delete_plugin_command: (String plugin_name) -> void
|
|
19
|
+
end
|
|
20
|
+
end
|
data/sig/ruby_raider.rbs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Type definitions for main RubyRaider entry point
|
|
2
|
+
module RubyRaider
|
|
3
|
+
class Raider < Thor
|
|
4
|
+
def self.plugin_commands?: () -> bool
|
|
5
|
+
def current_version: () -> String
|
|
6
|
+
|
|
7
|
+
def new: (String project_name) -> void
|
|
8
|
+
def version: () -> void
|
|
9
|
+
def adopt: () -> void
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def merge_skip_flags: (Hash[Symbol, untyped] params) -> void
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Type definitions for CrudGenerator
|
|
2
|
+
class CrudGenerator
|
|
3
|
+
ACTIONS: Array[String]
|
|
4
|
+
|
|
5
|
+
def initialize: (String base_name, Class scaffolding_class, ^(String) -> String? config_loader) -> void
|
|
6
|
+
def generate: () -> Array[String]
|
|
7
|
+
def planned_files: () -> Array[String]
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def generate_page: (String name) -> void
|
|
12
|
+
def generate_test: (String name) -> void
|
|
13
|
+
def generate_model: () -> void
|
|
14
|
+
def model_content: () -> String
|
|
15
|
+
def test_path: (String name) -> String
|
|
16
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Type definitions for NameNormalizer
|
|
2
|
+
module NameNormalizer
|
|
3
|
+
SUFFIXES: Array[String]
|
|
4
|
+
|
|
5
|
+
def self?.normalize: (String input) -> String
|
|
6
|
+
def self?.to_class_name: (String input, String suffix) -> String
|
|
7
|
+
def self?.to_page_class: (String input) -> String
|
|
8
|
+
def self?.to_file_name: (String input) -> String
|
|
9
|
+
def self?.nested?: (String input) -> bool
|
|
10
|
+
def self?.module_parts: (String input) -> Array[String]
|
|
11
|
+
def self?.leaf_name: (String input) -> String
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def self?.camel_to_snake: (String str) -> String
|
|
16
|
+
def self?.strip_suffixes: (String name) -> String
|
|
17
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Type definitions for PageIntrospector
|
|
2
|
+
class PageIntrospector
|
|
3
|
+
SKIP_METHODS: Array[String]
|
|
4
|
+
|
|
5
|
+
attr_reader class_name: String
|
|
6
|
+
attr_reader methods: Array[Hash[Symbol, untyped]]
|
|
7
|
+
|
|
8
|
+
def initialize: (String file_path) -> void
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def extract_class_name: () -> String
|
|
13
|
+
def extract_public_methods: () -> Array[Hash[Symbol, untyped]]
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Type definitions for ScaffoldProjectDetector
|
|
2
|
+
module ScaffoldProjectDetector
|
|
3
|
+
AUTOMATION_GEMS: Hash[String, String]
|
|
4
|
+
FRAMEWORK_GEMS: Hash[String, String]
|
|
5
|
+
|
|
6
|
+
def self?.detect: () -> Hash[Symbol, String | bool | nil]
|
|
7
|
+
def self?.detect_automation: (?String? gemfile) -> String
|
|
8
|
+
def self?.detect_framework: (?String? gemfile) -> String
|
|
9
|
+
def self?.read_gemfile: () -> String
|
|
10
|
+
def self?.selenium?: () -> bool
|
|
11
|
+
def self?.capybara?: () -> bool
|
|
12
|
+
def self?.watir?: () -> bool
|
|
13
|
+
def self?.config: () -> Hash[String, untyped]
|
|
14
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Type definitions for ScaffoldMenu
|
|
2
|
+
class ScaffoldMenu
|
|
3
|
+
COMPONENTS: Hash[String, Symbol]
|
|
4
|
+
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
def run: () -> Hash[Symbol, untyped]?
|
|
7
|
+
def self.build_options: (names: Array[String] | String, components: Array[Symbol] | Symbol, ?uses: Array[String] | String) -> Hash[Symbol, untyped]
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def ask_names: () -> Array[String]
|
|
12
|
+
def ask_components: () -> Array[Symbol]
|
|
13
|
+
def ask_relationships: () -> Array[String]
|
|
14
|
+
def preview_and_confirm: (Array[String] names, Array[Symbol] components, Array[String] uses) -> Hash[Symbol, untyped]?
|
|
15
|
+
def planned_files: (Array[String] names, Array[Symbol] components) -> Array[String]
|
|
16
|
+
def file_for: (String name, Symbol component) -> String?
|
|
17
|
+
def default_components: (Hash[Symbol, untyped] project) -> Array[String]
|
|
18
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Type definitions for Scaffolding
|
|
2
|
+
class Scaffolding < Thor::Group
|
|
3
|
+
include Thor::Actions
|
|
4
|
+
|
|
5
|
+
OVERRIDE_DIR: String
|
|
6
|
+
|
|
7
|
+
attr_writer uses: Array[String]
|
|
8
|
+
|
|
9
|
+
def self.source_root: () -> String
|
|
10
|
+
def self.planned_path: (String name, String type, ?String? custom_path) -> String?
|
|
11
|
+
|
|
12
|
+
# Generation methods
|
|
13
|
+
def generate_page: () -> void
|
|
14
|
+
def generate_feature: () -> void
|
|
15
|
+
def generate_spec: () -> void
|
|
16
|
+
def generate_helper: () -> void
|
|
17
|
+
def generate_steps: () -> void
|
|
18
|
+
def generate_component: () -> void
|
|
19
|
+
def generate_config: () -> void
|
|
20
|
+
def generate_spec_from_page: (String source_file, ?ai: bool) -> void
|
|
21
|
+
def generate_page_from_url: (Hash[Symbol, untyped] analysis) -> void
|
|
22
|
+
def generate_spec_from_url: (Hash[Symbol, untyped] analysis) -> void
|
|
23
|
+
|
|
24
|
+
# Deletion methods
|
|
25
|
+
def delete_page: () -> void
|
|
26
|
+
def delete_feature: () -> void
|
|
27
|
+
def delete_spec: () -> void
|
|
28
|
+
def delete_helper: () -> void
|
|
29
|
+
def delete_steps: () -> void
|
|
30
|
+
def delete_component: () -> void
|
|
31
|
+
def delete_config: () -> void
|
|
32
|
+
|
|
33
|
+
# Template helpers
|
|
34
|
+
def class_name: () -> String?
|
|
35
|
+
def page_class_name: () -> String
|
|
36
|
+
def normalized_name: () -> String
|
|
37
|
+
def nested?: () -> bool
|
|
38
|
+
def module_parts: () -> Array[String]
|
|
39
|
+
def leaf_name: () -> String
|
|
40
|
+
def automation_type: () -> String
|
|
41
|
+
def framework_type: () -> String
|
|
42
|
+
def project_config: () -> Hash[String, untyped]
|
|
43
|
+
def selenium?: () -> bool
|
|
44
|
+
def capybara?: () -> bool
|
|
45
|
+
def watir?: () -> bool
|
|
46
|
+
def uses_list: () -> Array[String]
|
|
47
|
+
def introspected: () -> PageIntrospector?
|
|
48
|
+
def url_data: () -> Hash[Symbol, untyped]?
|
|
49
|
+
def ai_scenarios: () -> Hash[Symbol, untyped]
|
|
50
|
+
def default_path: (String standard_path, String file_type) -> String
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
def enrich_with_ai_scenarios: () -> void
|
|
55
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Type definitions for UrlAnalyzer
|
|
2
|
+
class UrlAnalyzer
|
|
3
|
+
INTERACTIVE_TAGS: Array[String]
|
|
4
|
+
|
|
5
|
+
attr_reader url: String
|
|
6
|
+
attr_reader page_name: String
|
|
7
|
+
attr_reader elements: Array[Hash[Symbol, untyped]]
|
|
8
|
+
|
|
9
|
+
def initialize: (String url, ?name_override: String?, ?ai: bool) -> void
|
|
10
|
+
def analyze: () -> UrlAnalyzer
|
|
11
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def fetch_html: () -> String
|
|
16
|
+
def parse_elements: (String html) -> void
|
|
17
|
+
def parse_inputs: (String html) -> void
|
|
18
|
+
def parse_selects: (String html) -> void
|
|
19
|
+
def parse_textareas: (String html) -> void
|
|
20
|
+
def parse_buttons: (String html) -> void
|
|
21
|
+
def parse_links: (String html) -> void
|
|
22
|
+
def parse_attributes: (String attr_string) -> Hash[String, String]
|
|
23
|
+
def best_locator: (Hash[String, String] attrs, ?text: String?) -> Hash[Symbol, Symbol | String]
|
|
24
|
+
def infer_tag: (Hash[String, String] attrs) -> String
|
|
25
|
+
def build_element: (name: String, type: Symbol, locator: Hash[Symbol, Symbol | String], **untyped extra) -> Hash[Symbol, untyped]
|
|
26
|
+
def analyze_with_llm: (String html) -> Array[Hash[Symbol, untyped]]?
|
|
27
|
+
def derive_page_name: () -> String
|
|
28
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Type definitions for DesktopDownloader
|
|
2
|
+
module DesktopDownloader
|
|
3
|
+
REPO: String
|
|
4
|
+
API_URL: String
|
|
5
|
+
PLATFORM_PATTERNS: Hash[String, Regexp]
|
|
6
|
+
|
|
7
|
+
def self?.download: (?String? destination_dir) -> String?
|
|
8
|
+
def self?.latest_version: () -> String?
|
|
9
|
+
def self?.download_url: () -> String?
|
|
10
|
+
def self?.clear_cache: () -> void
|
|
11
|
+
def self?.platform: () -> String
|
|
12
|
+
def self?.platform_display_name: () -> String
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def self?.find_asset: () -> Hash[Symbol, untyped]?
|
|
17
|
+
def self?.fetch_latest_release: () -> Hash[String, untyped]?
|
|
18
|
+
def self?.download_file: (String url, String destination) -> void
|
|
19
|
+
def self?.follow_redirects: (URI::Generic uri, String destination, ?Integer limit) -> void
|
|
20
|
+
def self?.write_response: (Net::HTTPResponse response, String destination) -> void
|
|
21
|
+
def self?.print_progress: (Integer downloaded, Integer total) -> void
|
|
22
|
+
def self?.default_download_dir: () -> String
|
|
23
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Type definitions for RubyRaider::Logger
|
|
2
|
+
module RubyRaider
|
|
3
|
+
module Logger
|
|
4
|
+
extend Forwardable
|
|
5
|
+
|
|
6
|
+
def self?.logger: () -> ::Logger
|
|
7
|
+
def self?.fatal: (*untyped args) -> void
|
|
8
|
+
def self?.error: (*untyped args) -> void
|
|
9
|
+
def self?.warn: (*untyped args) -> void
|
|
10
|
+
def self?.info: (*untyped args) -> void
|
|
11
|
+
def self?.debug: (*untyped args) -> void
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Type definitions for Logo
|
|
2
|
+
module RubyRaider
|
|
3
|
+
module Logo
|
|
4
|
+
PALETTE: Hash[Integer, String]
|
|
5
|
+
GEM: Array[Array[Integer]]
|
|
6
|
+
GLYPHS: Hash[String, Array[Array[Integer]]]
|
|
7
|
+
TEXT_COLOR: Integer
|
|
8
|
+
|
|
9
|
+
def self.display: () -> void
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def self.halfblock: (Integer top, Integer bot) -> String
|
|
14
|
+
def self.build_text: (String str) -> Array[Array[Integer]]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Type definitions for Utilities
|
|
2
|
+
module Utilities
|
|
3
|
+
@path: String
|
|
4
|
+
|
|
5
|
+
def self?.browser=: (String browser) -> void
|
|
6
|
+
def self?.page_path=: (String path) -> void
|
|
7
|
+
def self?.spec_path=: (String path) -> void
|
|
8
|
+
def self?.feature_path=: (String path) -> void
|
|
9
|
+
def self?.helper_path=: (String path) -> void
|
|
10
|
+
def self?.url=: (String url) -> void
|
|
11
|
+
def self?.timeout=: (String | Integer seconds) -> void
|
|
12
|
+
def self?.viewport=: (String dimensions) -> void
|
|
13
|
+
def self?.platform=: (String platform) -> void
|
|
14
|
+
def self?.browser_options=: (Array[String] opts) -> void
|
|
15
|
+
def self?.delete_browser_options: () -> void
|
|
16
|
+
def self?.llm_provider=: (String provider) -> void
|
|
17
|
+
def self?.llm_api_key=: (String key) -> void
|
|
18
|
+
def self?.llm_model=: (String model) -> void
|
|
19
|
+
def self?.llm_url=: (String url) -> void
|
|
20
|
+
def self?.debug=: (bool enabled) -> void
|
|
21
|
+
def self?.batch_update: (**untyped settings) -> void
|
|
22
|
+
def self?.run: (?String? opts) -> void
|
|
23
|
+
def self?.parallel_run: (?String? opts, ?untyped? _settings) -> void
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def self?.set: (String key, untyped value) -> void
|
|
28
|
+
def self?.overwrite_yaml: () -> void
|
|
29
|
+
def self?.config: () -> Hash[String, untyped]?
|
|
30
|
+
end
|
data/sig/vendor/thor.rbs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Minimal Thor stubs for type checking
|
|
2
|
+
class Thor
|
|
3
|
+
def self.desc: (String usage, String description, ?Hash[Symbol, untyped] options) -> void
|
|
4
|
+
def self.method_option: (Symbol name, **untyped options) -> void
|
|
5
|
+
def self.class_option: (Symbol name, **untyped options) -> void
|
|
6
|
+
def self.option: (Symbol name, **untyped options) -> void
|
|
7
|
+
def self.map: (Hash[String, Symbol] mappings) -> void
|
|
8
|
+
def self.subcommand: (String name, Class subcommand_class) -> void
|
|
9
|
+
def self.no_commands: () { () -> void } -> void
|
|
10
|
+
def self.start: (?Array[String] args, ?Hash[Symbol, untyped] config) -> void
|
|
11
|
+
def invoke: (Symbol command, ?Array[untyped]? args, ?Array[String]? flags) -> void
|
|
12
|
+
def options: () -> Hash[Symbol, untyped]
|
|
13
|
+
def say: (String message, ?Symbol? color) -> void
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class Thor::Group
|
|
17
|
+
include Thor::Actions
|
|
18
|
+
|
|
19
|
+
def self.argument: (Symbol name, **untyped options) -> void
|
|
20
|
+
def self.source_root: (?String path) -> String
|
|
21
|
+
def self.source_paths: () -> Array[String]
|
|
22
|
+
def invoke_all: () -> void
|
|
23
|
+
def args: () -> Array[String]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
module Thor::Actions
|
|
27
|
+
def template: (String source, ?String destination, **untyped options) -> void
|
|
28
|
+
def create_file: (String destination, ?String data) -> void
|
|
29
|
+
def empty_directory: (String destination) -> void
|
|
30
|
+
def copy_file: (String source, ?String destination) -> void
|
|
31
|
+
def remove_file: (String path) -> void
|
|
32
|
+
def destination_root: () -> String
|
|
33
|
+
def self.included: (Module base) -> void
|
|
34
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Minimal TTY::Prompt stubs
|
|
2
|
+
module TTY
|
|
3
|
+
class Prompt
|
|
4
|
+
def initialize: (**untyped options) -> void
|
|
5
|
+
def select: (String question, ?Array[String] choices, **untyped options) ?{ (untyped menu) -> void } -> String
|
|
6
|
+
def multi_select: (String question, ?Array[String] choices, **untyped options) ?{ (untyped menu) -> void } -> Array[String]
|
|
7
|
+
def ask: (String question, **untyped options) -> String?
|
|
8
|
+
def yes?: (String question, **untyped options) -> bool
|
|
9
|
+
def no?: (String question, **untyped options) -> bool
|
|
10
|
+
def say: (String message) -> void
|
|
11
|
+
def warn: (String message) -> void
|
|
12
|
+
def error: (String message) -> void
|
|
13
|
+
def ok: (String message) -> void
|
|
14
|
+
end
|
|
15
|
+
end
|