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,83 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyRaider
|
|
4
|
+
# Displays the Ruby Raider logo as colored pixel art in the terminal.
|
|
5
|
+
# Renders a faceted gem icon alongside "RUBY RAIDER" in a pixel font,
|
|
6
|
+
# using Unicode half-block characters for compact, high-detail output.
|
|
7
|
+
module Logo
|
|
8
|
+
# Color palette: 0 = empty, 1 = dark, 2 = medium, 3 = bright
|
|
9
|
+
PALETTE = {
|
|
10
|
+
1 => '130;30;48',
|
|
11
|
+
2 => '180;45;65',
|
|
12
|
+
3 => '230;70;90'
|
|
13
|
+
}.freeze
|
|
14
|
+
|
|
15
|
+
# Gem diamond with faceted shading (6 pixel rows × 9 cols)
|
|
16
|
+
GEM = [
|
|
17
|
+
[0, 0, 0, 3, 3, 3, 0, 0, 0],
|
|
18
|
+
[0, 2, 3, 3, 3, 3, 3, 2, 0],
|
|
19
|
+
[2, 3, 2, 3, 3, 3, 2, 3, 2],
|
|
20
|
+
[2, 2, 1, 2, 2, 2, 1, 2, 2],
|
|
21
|
+
[0, 1, 2, 1, 1, 1, 2, 1, 0],
|
|
22
|
+
[0, 0, 0, 1, 1, 1, 0, 0, 0]
|
|
23
|
+
].freeze
|
|
24
|
+
|
|
25
|
+
# 5-row pixel font glyphs
|
|
26
|
+
GLYPHS = {
|
|
27
|
+
'R' => [[1, 1, 1, 0], [1, 0, 0, 1], [1, 1, 1, 0], [1, 0, 1, 0], [1, 0, 0, 1]],
|
|
28
|
+
'U' => [[1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1], [0, 1, 1, 0]],
|
|
29
|
+
'B' => [[1, 1, 1, 0], [1, 0, 0, 1], [1, 1, 1, 0], [1, 0, 0, 1], [1, 1, 1, 0]],
|
|
30
|
+
'Y' => [[1, 0, 0, 1], [1, 0, 0, 1], [0, 1, 1, 0], [0, 0, 1, 0], [0, 0, 1, 0]],
|
|
31
|
+
' ' => [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
32
|
+
'A' => [[0, 1, 1, 0], [1, 0, 0, 1], [1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 0, 1]],
|
|
33
|
+
'I' => [[1, 1, 1], [0, 1, 0], [0, 1, 0], [0, 1, 0], [1, 1, 1]],
|
|
34
|
+
'D' => [[1, 1, 1, 0], [1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 1, 1, 0]],
|
|
35
|
+
'E' => [[1, 1, 1, 1], [1, 0, 0, 0], [1, 1, 1, 0], [1, 0, 0, 0], [1, 1, 1, 1]]
|
|
36
|
+
}.freeze
|
|
37
|
+
|
|
38
|
+
TEXT_COLOR = 3
|
|
39
|
+
|
|
40
|
+
def self.display
|
|
41
|
+
text_rows = build_text('RUBY RAIDER')
|
|
42
|
+
text_width = text_rows.first.length
|
|
43
|
+
|
|
44
|
+
# Build 6-row text grid: blank top row centers text vertically with gem
|
|
45
|
+
text_grid = [Array.new(text_width, 0)]
|
|
46
|
+
text_rows.each { |row| text_grid << row.map { |px| px == 1 ? TEXT_COLOR : 0 } }
|
|
47
|
+
|
|
48
|
+
# Compose: gem(9) + gap(2) + text
|
|
49
|
+
grid = 6.times.map { |y| GEM[y] + [0, 0] + text_grid[y] }
|
|
50
|
+
|
|
51
|
+
# Render 3 terminal rows (each encodes 2 pixel rows via half-blocks)
|
|
52
|
+
3.times do |tr|
|
|
53
|
+
line = +''
|
|
54
|
+
top = grid[tr * 2]
|
|
55
|
+
bot = grid[tr * 2 + 1]
|
|
56
|
+
top.length.times { |x| line << halfblock(top[x], bot[x]) }
|
|
57
|
+
puts " #{line.rstrip}"
|
|
58
|
+
end
|
|
59
|
+
puts
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self.halfblock(top, bot)
|
|
63
|
+
return ' ' if top.zero? && bot.zero?
|
|
64
|
+
return "\e[38;2;#{PALETTE[top]}m█\e[0m" if top == bot
|
|
65
|
+
return "\e[38;2;#{PALETTE[bot]}m▄\e[0m" if top.zero?
|
|
66
|
+
return "\e[38;2;#{PALETTE[top]}m▀\e[0m" if bot.zero?
|
|
67
|
+
|
|
68
|
+
"\e[38;2;#{PALETTE[top]};48;2;#{PALETTE[bot]}m▀\e[0m"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def self.build_text(str)
|
|
72
|
+
rows = Array.new(5) { [] }
|
|
73
|
+
str.each_char.with_index do |ch, i|
|
|
74
|
+
glyph = GLYPHS.fetch(ch.upcase, GLYPHS[' '])
|
|
75
|
+
5.times { |r| rows[r].push(0, 0) } if i.positive?
|
|
76
|
+
5.times { |r| rows[r].concat(glyph[r]) }
|
|
77
|
+
end
|
|
78
|
+
rows
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
private_class_method :halfblock, :build_text
|
|
82
|
+
end
|
|
83
|
+
end
|
data/lib/utilities/utilities.rb
CHANGED
|
@@ -7,46 +7,44 @@ module Utilities
|
|
|
7
7
|
|
|
8
8
|
class << self
|
|
9
9
|
def browser=(browser)
|
|
10
|
-
|
|
11
|
-
overwrite_yaml
|
|
10
|
+
set('browser', browser)
|
|
12
11
|
end
|
|
13
12
|
|
|
14
13
|
def page_path=(path)
|
|
15
|
-
|
|
16
|
-
overwrite_yaml
|
|
14
|
+
set('page_path', path)
|
|
17
15
|
end
|
|
18
16
|
|
|
19
17
|
def spec_path=(path)
|
|
20
|
-
|
|
21
|
-
overwrite_yaml
|
|
18
|
+
set('spec_path', path)
|
|
22
19
|
end
|
|
23
20
|
|
|
24
21
|
def feature_path=(path)
|
|
25
|
-
|
|
26
|
-
overwrite_yaml
|
|
22
|
+
set('feature_path', path)
|
|
27
23
|
end
|
|
28
24
|
|
|
29
25
|
def helper_path=(path)
|
|
30
|
-
|
|
31
|
-
overwrite_yaml
|
|
26
|
+
set('helper_path', path)
|
|
32
27
|
end
|
|
33
28
|
|
|
34
29
|
def url=(url)
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
set('url', url)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def timeout=(seconds)
|
|
34
|
+
set('timeout', seconds.to_i)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def viewport=(dimensions)
|
|
38
|
+
width, height = dimensions.split('x').map(&:to_i)
|
|
39
|
+
set('viewport', { 'width' => width, 'height' => height })
|
|
37
40
|
end
|
|
38
41
|
|
|
39
42
|
def platform=(platform)
|
|
40
|
-
|
|
41
|
-
overwrite_yaml
|
|
43
|
+
set('platform', platform)
|
|
42
44
|
end
|
|
43
45
|
|
|
44
|
-
def browser_options=(
|
|
45
|
-
|
|
46
|
-
browser_args = config['browser_arguments']
|
|
47
|
-
browser = args.first&.to_sym
|
|
48
|
-
browser_args[browser] = browser_args[browser] + args[1..] if browser_args.key?(browser)
|
|
49
|
-
overwrite_yaml
|
|
46
|
+
def browser_options=(opts)
|
|
47
|
+
set('browser_options', Array(opts).flatten)
|
|
50
48
|
end
|
|
51
49
|
|
|
52
50
|
def delete_browser_options
|
|
@@ -54,6 +52,35 @@ module Utilities
|
|
|
54
52
|
overwrite_yaml
|
|
55
53
|
end
|
|
56
54
|
|
|
55
|
+
def llm_provider=(provider)
|
|
56
|
+
set('llm_provider', provider)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def llm_api_key=(key)
|
|
60
|
+
set('llm_api_key', key)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def llm_model=(model)
|
|
64
|
+
set('llm_model', model)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def llm_url=(url)
|
|
68
|
+
set('llm_url', url)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def debug=(enabled)
|
|
72
|
+
config['debug'] ||= {}
|
|
73
|
+
config['debug']['enabled'] = enabled
|
|
74
|
+
overwrite_yaml
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Set multiple config keys in a single YAML write.
|
|
78
|
+
# Usage: Utilities.batch_update(browser: 'chrome', timeout: 30)
|
|
79
|
+
def batch_update(**settings)
|
|
80
|
+
settings.each { |key, value| config[key.to_s] = value }
|
|
81
|
+
overwrite_yaml
|
|
82
|
+
end
|
|
83
|
+
|
|
57
84
|
def run(opts = nil)
|
|
58
85
|
command = File.directory?('spec') ? 'rspec spec/' : 'cucumber features'
|
|
59
86
|
system "#{command} #{opts}"
|
|
@@ -66,6 +93,12 @@ module Utilities
|
|
|
66
93
|
|
|
67
94
|
private
|
|
68
95
|
|
|
96
|
+
# Single-key setter: updates in-memory config and writes once
|
|
97
|
+
def set(key, value)
|
|
98
|
+
config[key] = value
|
|
99
|
+
overwrite_yaml
|
|
100
|
+
end
|
|
101
|
+
|
|
69
102
|
def overwrite_yaml
|
|
70
103
|
File.open(@path, 'w') { |file| YAML.dump(config, file) }
|
|
71
104
|
end
|
data/lib/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.0.0
|
data/ruby_raider.gemspec
CHANGED
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
s.add_development_dependency 'rubocop', '~> 1.27'
|
|
20
20
|
s.add_development_dependency 'rubocop-performance', '~> 1.15.0'
|
|
21
21
|
s.add_development_dependency 'rubocop-rspec', '~> 2.9.0'
|
|
22
|
+
s.add_development_dependency 'steep', '~> 1.9'
|
|
22
23
|
|
|
23
24
|
s.add_runtime_dependency 'thor', '~> 1.2.1'
|
|
24
25
|
s.add_runtime_dependency 'tty-prompt', '~> 0.23.1'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Type definitions for Adopter::AdoptMenu
|
|
2
|
+
module Adopter
|
|
3
|
+
class AdoptMenu
|
|
4
|
+
WEB_AUTOMATIONS: Array[String]
|
|
5
|
+
TEST_FRAMEWORKS: Array[String]
|
|
6
|
+
CI_PLATFORMS: Array[String]
|
|
7
|
+
|
|
8
|
+
def initialize: () -> void
|
|
9
|
+
def run: () -> void
|
|
10
|
+
|
|
11
|
+
def self.adopt: (Hash[Symbol, untyped] params) -> Hash[Symbol, untyped]
|
|
12
|
+
def self.validate_params!: (Hash[Symbol, untyped] params) -> void
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def ask_source_path: () -> String
|
|
17
|
+
def preview_detection: (String source_path) -> Hash[Symbol, untyped]
|
|
18
|
+
def ask_target_automation: (String? detected) -> String
|
|
19
|
+
def ask_target_framework: (String? detected) -> String
|
|
20
|
+
def ask_output_path: () -> String?
|
|
21
|
+
def ask_ci_platform: (String? detected) -> String?
|
|
22
|
+
def execute_adoption: (Hash[Symbol, untyped] params) -> void
|
|
23
|
+
def print_results: (MigrationPlan plan, Hash[Symbol, untyped] results) -> void
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Type definitions for Adopter::Converters::BaseConverter
|
|
2
|
+
module Adopter
|
|
3
|
+
module Converters
|
|
4
|
+
class BaseConverter
|
|
5
|
+
RAIDER_BASE_CLASSES: Array[String]
|
|
6
|
+
|
|
7
|
+
def convert_page: (String content, untyped _page_info) -> String
|
|
8
|
+
def convert_test: (String content, untyped _test_info) -> String
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def ensure_frozen_string_literal: (String content) -> String
|
|
13
|
+
def update_base_class: (String content, String target_base) -> String
|
|
14
|
+
def raider_compatible_base?: (String base_class) -> bool
|
|
15
|
+
def update_require_paths: (String content, String target_automation) -> String
|
|
16
|
+
def update_page_requires: (String content) -> String
|
|
17
|
+
def update_helper_requires: (String content, String target_automation) -> String
|
|
18
|
+
def remove_driver_arg: (String content) -> String
|
|
19
|
+
def swap_driver_arg: (String content, String target_arg) -> String
|
|
20
|
+
def driver_arg_for: (String target_automation) -> String?
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Type definitions for Adopter::Converters::IdentityConverter
|
|
2
|
+
module Adopter
|
|
3
|
+
module Converters
|
|
4
|
+
class IdentityConverter < BaseConverter
|
|
5
|
+
def initialize: (String target_automation) -> void
|
|
6
|
+
def convert_page: (String content, untyped _page_info) -> String
|
|
7
|
+
def convert_test: (String content, untyped _test_info) -> String
|
|
8
|
+
def convert_step: (String content) -> String
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def add_page_require: (String content) -> String
|
|
13
|
+
def update_page_instantiation: (String content) -> String
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Type definitions for Adopter::MigrationPlan and ConvertedFile
|
|
2
|
+
module Adopter
|
|
3
|
+
class MigrationPlan
|
|
4
|
+
attr_reader source_path: String
|
|
5
|
+
attr_reader output_path: String
|
|
6
|
+
attr_reader target_automation: String
|
|
7
|
+
attr_reader target_framework: String
|
|
8
|
+
attr_reader ci_platform: String?
|
|
9
|
+
attr_reader skeleton_structure: Hash[Symbol, untyped]
|
|
10
|
+
attr_reader converted_pages: Array[ConvertedFile]
|
|
11
|
+
attr_reader converted_tests: Array[ConvertedFile]
|
|
12
|
+
attr_reader converted_features: Array[ConvertedFile]
|
|
13
|
+
attr_reader converted_steps: Array[ConvertedFile]
|
|
14
|
+
attr_reader gemfile_additions: Array[String]
|
|
15
|
+
attr_reader config_overrides: Hash[String, untyped]
|
|
16
|
+
attr_reader warnings: Array[String]
|
|
17
|
+
attr_reader manual_actions: Array[String]
|
|
18
|
+
|
|
19
|
+
def initialize: (?Hash[Symbol, untyped]? attrs) -> void
|
|
20
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
21
|
+
def to_json: (*untyped args) -> String
|
|
22
|
+
def summary: () -> Hash[Symbol, untyped]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class ConvertedFile
|
|
26
|
+
attr_accessor output_path: String
|
|
27
|
+
attr_accessor content: String
|
|
28
|
+
attr_accessor source_file: String?
|
|
29
|
+
attr_accessor conversion_notes: String?
|
|
30
|
+
|
|
31
|
+
def initialize: (?output_path: String, ?content: String, ?source_file: String?, ?conversion_notes: String?) -> void
|
|
32
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Type definitions for Adopter::Migrator
|
|
2
|
+
module Adopter
|
|
3
|
+
class Migrator
|
|
4
|
+
attr_reader plan: MigrationPlan
|
|
5
|
+
attr_reader results: Hash[Symbol, untyped]
|
|
6
|
+
|
|
7
|
+
def initialize: (MigrationPlan plan) -> void
|
|
8
|
+
def execute: () -> Hash[Symbol, untyped]
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def generate_skeleton: () -> void
|
|
13
|
+
def write_converted_pages: () -> void
|
|
14
|
+
def write_converted_tests: () -> void
|
|
15
|
+
def write_converted_features: () -> void
|
|
16
|
+
def write_converted_steps: () -> void
|
|
17
|
+
def write_file: (ConvertedFile converted_file) -> void
|
|
18
|
+
def merge_gemfile: () -> void
|
|
19
|
+
def apply_config_overrides: () -> void
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Type definitions for Adopter::PlanBuilder
|
|
2
|
+
module Adopter
|
|
3
|
+
class PlanBuilder
|
|
4
|
+
def initialize: (Hash[Symbol, untyped] analysis, Hash[Symbol, untyped] params) -> void
|
|
5
|
+
def build: () -> MigrationPlan
|
|
6
|
+
|
|
7
|
+
private
|
|
8
|
+
|
|
9
|
+
def build_skeleton_structure: () -> Hash[Symbol, untyped]
|
|
10
|
+
def plan_page_conversions: () -> Array[ConvertedFile]
|
|
11
|
+
def plan_test_conversions: () -> Array[ConvertedFile]
|
|
12
|
+
def plan_feature_conversions: () -> Array[ConvertedFile]
|
|
13
|
+
def plan_step_conversions: () -> Array[ConvertedFile]
|
|
14
|
+
def convert_page: (String content, Hash[Symbol, untyped] page) -> String
|
|
15
|
+
def convert_page_dsl: (String content, Hash[Symbol, untyped] page, Symbol source_dsl, String target) -> String
|
|
16
|
+
def find_page_converter: (Symbol source_dsl, String target) -> (^(String, Hash[Symbol, untyped]) -> String)?
|
|
17
|
+
def page_converters: () -> Hash[Symbol, ^(String, Hash[Symbol, untyped]) -> String]
|
|
18
|
+
def convert_test: (String content, Hash[Symbol, untyped] test) -> String
|
|
19
|
+
def convert_test_framework: (String content, Hash[Symbol, untyped] test, Symbol source_framework, String target) -> String
|
|
20
|
+
def find_test_converter: (Symbol source_framework, String target) -> (^(String, Hash[Symbol, untyped]) -> String)?
|
|
21
|
+
def test_converters: () -> Hash[Symbol, ^(String, Hash[Symbol, untyped]) -> String]
|
|
22
|
+
def identity_converter: () -> Converters::IdentityConverter
|
|
23
|
+
def restructure_page: (String content) -> String
|
|
24
|
+
def restructure_test: (String content) -> String
|
|
25
|
+
def convert_step_page_references: (String content) -> String
|
|
26
|
+
def raider_page_path: (String class_name) -> String
|
|
27
|
+
def raider_test_path: (Hash[Symbol, untyped] test) -> String
|
|
28
|
+
def raider_feature_path: (String source_path) -> String
|
|
29
|
+
def raider_step_path: (String source_path) -> String
|
|
30
|
+
def extract_config_overrides: () -> Hash[String, untyped]
|
|
31
|
+
def same_automation_dsl?: (Symbol source_dsl, String target) -> bool
|
|
32
|
+
def normalize_dsl: (Symbol dsl) -> String
|
|
33
|
+
def target_cucumber?: () -> bool
|
|
34
|
+
def page_conversion_notes: () -> String
|
|
35
|
+
def test_conversion_notes: (Symbol source_type) -> String
|
|
36
|
+
def add_warning: (String message) -> void
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Type definitions for Adopter::ProjectAnalyzer
|
|
2
|
+
module Adopter
|
|
3
|
+
class MobileProjectError < StandardError
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
class ProjectAnalyzer
|
|
7
|
+
KNOWN_FRAMEWORK_GEMS: Array[String]
|
|
8
|
+
PAGE_DSL_PATTERNS: Hash[Symbol, Regexp]
|
|
9
|
+
PAGE_CLASS_PATTERNS: Array[Regexp]
|
|
10
|
+
TEST_FILE_PATTERNS: Hash[Symbol, Hash[Symbol, untyped]]
|
|
11
|
+
HELPER_ROLES: Hash[Symbol, Regexp]
|
|
12
|
+
|
|
13
|
+
def initialize: (String source_path, ?Hash[Symbol, untyped]? overrides) -> void
|
|
14
|
+
def analyze: () -> Hash[Symbol, untyped]
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def validate_web_only!: (Hash[Symbol, untyped] detection) -> void
|
|
19
|
+
def discover_pages: () -> Array[Hash[Symbol, untyped]]
|
|
20
|
+
def discover_tests: () -> Array[Hash[Symbol, untyped]]
|
|
21
|
+
def discover_helpers: () -> Array[Hash[Symbol, untyped]]
|
|
22
|
+
def discover_features: () -> Array[Hash[Symbol, untyped]]
|
|
23
|
+
def discover_step_definitions: () -> Array[Hash[Symbol, untyped]]
|
|
24
|
+
def discover_custom_gems: () -> Array[String]
|
|
25
|
+
def detect_page_dsl: () -> Symbol
|
|
26
|
+
def detect_page_dir: () -> String?
|
|
27
|
+
def ruby_files_in: (String dir) -> Array[String]
|
|
28
|
+
def relative_path: (String absolute) -> String
|
|
29
|
+
def page_like?: (String content) -> bool
|
|
30
|
+
def extract_class_name: (String content) -> String?
|
|
31
|
+
def extract_base_class: (String content) -> String?
|
|
32
|
+
def extract_public_methods: (String content) -> Array[String]
|
|
33
|
+
def extract_test_methods: (String content, Symbol type) -> Array[String]
|
|
34
|
+
def extract_modules: (String content) -> Array[String]
|
|
35
|
+
def detect_helper_role: (String content) -> Symbol
|
|
36
|
+
def count_scenarios: (String content) -> Integer
|
|
37
|
+
def count_steps: (String content) -> Integer
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Type definitions for Adopter::ProjectDetector
|
|
2
|
+
module Adopter
|
|
3
|
+
module ProjectDetector
|
|
4
|
+
GEM_AUTOMATION_MAP: Hash[String, String]
|
|
5
|
+
GEM_FRAMEWORK_MAP: Hash[String, String]
|
|
6
|
+
BROWSERS: Array[String]
|
|
7
|
+
|
|
8
|
+
def self?.detect: (String path) -> Hash[Symbol, String?]
|
|
9
|
+
def self?.detect_automation: (String path) -> String?
|
|
10
|
+
def self?.detect_framework: (String path) -> String?
|
|
11
|
+
def self?.detect_page_path: (String path) -> String?
|
|
12
|
+
def self?.detect_spec_path: (String path) -> String?
|
|
13
|
+
def self?.detect_feature_path: (String path) -> String?
|
|
14
|
+
def self?.detect_helper_path: (String path) -> String?
|
|
15
|
+
def self?.detect_browser: (String path) -> String?
|
|
16
|
+
def self?.detect_url: (String path) -> String?
|
|
17
|
+
def self?.detect_ci_platform: (String path) -> String?
|
|
18
|
+
def self?.parse_gemfile: (String path) -> Array[String]
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def self?.detect_automation_from_requires: (String path) -> String?
|
|
23
|
+
def self?.find_existing_dir: (String path, Array[String] candidates) -> String?
|
|
24
|
+
def self?.helper_and_config_files: (String path) -> Array[String]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Type definitions for ScaffoldingCommands
|
|
2
|
+
class ScaffoldingCommands < Thor
|
|
3
|
+
def page: (String name) -> void
|
|
4
|
+
def feature: (String name) -> void
|
|
5
|
+
def spec: (String name) -> void
|
|
6
|
+
def helper: (String name) -> void
|
|
7
|
+
def steps: (String name) -> void
|
|
8
|
+
def component: (String name) -> void
|
|
9
|
+
def scaffold: (*String names) -> void
|
|
10
|
+
def destroy: (*String names) -> void
|
|
11
|
+
def from_url: (String url) -> void
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def load_config_path: (String type) -> String?
|
|
16
|
+
def delete_scaffolding: (String name, String type) -> void
|
|
17
|
+
def generate_scaffolding: (String name, String type, String? path, ?uses: Array[String]?) -> void
|
|
18
|
+
def dry_run_preview: (String name, String type) -> void
|
|
19
|
+
def generate_default_scaffold: (String name) -> void
|
|
20
|
+
def generate_selected_components: (String name, Array[String] components) -> void
|
|
21
|
+
def generate_crud: (String name) -> void
|
|
22
|
+
def generate_spec_from_page: (String name, String source_file, ?ai: bool) -> void
|
|
23
|
+
def generate_model_data: (String name) -> void
|
|
24
|
+
def model_template: (String name) -> String
|
|
25
|
+
def destroy_scaffold: (String name, ?Array[String]? components) -> void
|
|
26
|
+
def detect_scaffold_types: () -> Array[String]
|
|
27
|
+
def interactive_scaffold: () -> void
|
|
28
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Type definitions for UtilityCommands
|
|
2
|
+
class UtilityCommands < Thor
|
|
3
|
+
def path: (String default_path) -> void
|
|
4
|
+
def url: (String default_url) -> void
|
|
5
|
+
def browser: (?String? default_browser) -> void
|
|
6
|
+
def browser_options: (*String opts) -> void
|
|
7
|
+
def raid: () -> void
|
|
8
|
+
def config: () -> void
|
|
9
|
+
def timeout: (String seconds) -> void
|
|
10
|
+
def viewport: (String dimensions) -> void
|
|
11
|
+
def platform: (String platform) -> void
|
|
12
|
+
def debug: (String toggle) -> void
|
|
13
|
+
def start_appium: () -> void
|
|
14
|
+
def desktop: () -> void
|
|
15
|
+
def llm: (?String? provider) -> void
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def configure_llm: (String provider) -> void
|
|
20
|
+
def show_llm_status: () -> void
|
|
21
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Type definitions for AutomationGenerator
|
|
2
|
+
class AutomationGenerator < Generator
|
|
3
|
+
def generate_automation_files: () -> void
|
|
4
|
+
|
|
5
|
+
private
|
|
6
|
+
|
|
7
|
+
def generate_pages: () -> void
|
|
8
|
+
def generate_components: () -> void
|
|
9
|
+
def generate_model_files: () -> void
|
|
10
|
+
def generate_abstract_page: () -> void
|
|
11
|
+
def generate_abstract_component: () -> void
|
|
12
|
+
def generate_appium_settings: () -> void
|
|
13
|
+
def generate_login_page: () -> void
|
|
14
|
+
def generate_account_page: () -> void
|
|
15
|
+
def generate_home_page: () -> void
|
|
16
|
+
def generate_pdp_page: () -> void
|
|
17
|
+
def generate_header_component: () -> void
|
|
18
|
+
def generate_model_factory: () -> void
|
|
19
|
+
def generate_model_data: () -> void
|
|
20
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Type definitions for CommonGenerator
|
|
2
|
+
class CommonGenerator < Generator
|
|
3
|
+
def generate_readme_file: () -> void
|
|
4
|
+
def generate_config_file: () -> void
|
|
5
|
+
def generate_rake_file: () -> void
|
|
6
|
+
def generate_gemfile: () -> void
|
|
7
|
+
def generate_reek_file: () -> void
|
|
8
|
+
def generate_rubocop_file: () -> void
|
|
9
|
+
def generate_gitignore_file: () -> void
|
|
10
|
+
def generate_rspec_file: () -> void
|
|
11
|
+
def create_allure_folder: () -> void
|
|
12
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Type definitions for CucumberGenerator
|
|
2
|
+
class CucumberGenerator < Generator
|
|
3
|
+
def generate_feature: () -> void
|
|
4
|
+
def generate_steps: () -> void
|
|
5
|
+
def generate_user_factory: () -> void
|
|
6
|
+
def generate_env_file: () -> void
|
|
7
|
+
def generate_world: () -> void
|
|
8
|
+
def generate_cucumber_file: () -> void
|
|
9
|
+
def generate_visual_feature: () -> void
|
|
10
|
+
def generate_visual_steps: () -> void
|
|
11
|
+
def generate_accessibility_feature: () -> void
|
|
12
|
+
def generate_accessibility_steps: () -> void
|
|
13
|
+
def generate_performance_feature: () -> void
|
|
14
|
+
def generate_performance_steps: () -> void
|
|
15
|
+
def template_name: () -> String
|
|
16
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Type definitions for the base Generator class
|
|
2
|
+
class Generator < Thor::Group
|
|
3
|
+
include Thor::Actions
|
|
4
|
+
include TemplateRenderer
|
|
5
|
+
|
|
6
|
+
def self.source_paths: () -> Array[String]
|
|
7
|
+
def self.clear_template_cache: () -> void
|
|
8
|
+
def self.template_cache_stats: () -> Hash[Symbol, untyped]
|
|
9
|
+
|
|
10
|
+
# Predicate methods for framework/automation detection
|
|
11
|
+
def cucumber?: () -> bool
|
|
12
|
+
def cross_platform?: () -> bool
|
|
13
|
+
def mobile?: () -> bool
|
|
14
|
+
def single_platform?: () -> bool
|
|
15
|
+
def ios?: () -> bool
|
|
16
|
+
def android?: () -> bool
|
|
17
|
+
def rspec?: () -> bool
|
|
18
|
+
def minitest?: () -> bool
|
|
19
|
+
def selenium?: () -> bool
|
|
20
|
+
def capybara?: () -> bool
|
|
21
|
+
def watir?: () -> bool
|
|
22
|
+
def web?: () -> bool
|
|
23
|
+
def selenium_based?: () -> bool
|
|
24
|
+
|
|
25
|
+
# Add-on predicates
|
|
26
|
+
def axe_addon?: () -> bool
|
|
27
|
+
def visual_addon?: () -> bool
|
|
28
|
+
def lighthouse_addon?: () -> bool
|
|
29
|
+
|
|
30
|
+
# Skip/reporter predicates
|
|
31
|
+
def skip_allure?: () -> bool
|
|
32
|
+
def skip_video?: () -> bool
|
|
33
|
+
def allure_reporter?: () -> bool
|
|
34
|
+
def junit_reporter?: () -> bool
|
|
35
|
+
def json_reporter?: () -> bool
|
|
36
|
+
|
|
37
|
+
private
|
|
38
|
+
|
|
39
|
+
def _initializer: () -> Array[untyped]
|
|
40
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Type definitions for HelpersGenerator
|
|
2
|
+
class HelpersGenerator < Generator
|
|
3
|
+
def generate_helpers: () -> void
|
|
4
|
+
|
|
5
|
+
private
|
|
6
|
+
|
|
7
|
+
def generate_allure_helper: () -> void
|
|
8
|
+
def generate_video_helper: () -> void
|
|
9
|
+
def generate_browser_helper: () -> void
|
|
10
|
+
def generate_spec_helper: () -> void
|
|
11
|
+
def generate_driver_helper: () -> void
|
|
12
|
+
def generate_capybara_helper: () -> void
|
|
13
|
+
def generate_appium_helper: () -> void
|
|
14
|
+
def generate_test_helper: () -> void
|
|
15
|
+
def generate_debug_helper: () -> void
|
|
16
|
+
def generate_visual_helper: () -> void
|
|
17
|
+
def generate_performance_helper: () -> void
|
|
18
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Type definitions for InvokeGenerators module
|
|
2
|
+
module InvokeGenerators
|
|
3
|
+
def self?.generate_framework: (?Hash[Symbol, untyped] structure) -> void
|
|
4
|
+
def self?.add_generator: (Array[String] generators, *String gens) -> void
|
|
5
|
+
def self?.invoke_generator: (?Hash[Symbol, untyped] structure) -> void
|
|
6
|
+
def self?.collect_skip_flags: (Hash[Symbol, untyped] structure) -> Array[String]
|
|
7
|
+
def self?.reporter_flags: (String? reporter) -> Array[String]
|
|
8
|
+
def self?.mobile_automation?: (String automation) -> bool
|
|
9
|
+
def self?.to_bool: (String? string) -> bool?
|
|
10
|
+
end
|