ruby_raider 3.0.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/e2e_tests.yml +0 -17
  3. data/.github/workflows/system_tests.yml +0 -22
  4. data/README.md +8 -63
  5. data/lib/commands/scaffolding_commands.rb +1 -192
  6. data/lib/commands/utility_commands.rb +0 -52
  7. data/lib/generators/automation/templates/login.tt +1 -9
  8. data/lib/generators/automation/templates/page.tt +1 -7
  9. data/lib/generators/automation/templates/partials/initialize_selector.tt +1 -3
  10. data/lib/generators/automation/templates/partials/visit_method.tt +2 -6
  11. data/lib/generators/common_generator.rb +0 -6
  12. data/lib/generators/cucumber/cucumber_generator.rb +0 -24
  13. data/lib/generators/cucumber/templates/accessibility_steps.tt +2 -6
  14. data/lib/generators/cucumber/templates/cucumber.tt +0 -7
  15. data/lib/generators/cucumber/templates/env.tt +1 -3
  16. data/lib/generators/cucumber/templates/partials/appium_env.tt +1 -6
  17. data/lib/generators/cucumber/templates/partials/selenium_env.tt +0 -13
  18. data/lib/generators/cucumber/templates/partials/watir_env.tt +0 -13
  19. data/lib/generators/cucumber/templates/partials/web_steps.tt +4 -4
  20. data/lib/generators/cucumber/templates/world.tt +1 -3
  21. data/lib/generators/generator.rb +2 -46
  22. data/lib/generators/helper_generator.rb +4 -49
  23. data/lib/generators/infrastructure/templates/github.tt +2 -2
  24. data/lib/generators/infrastructure/templates/github_appium.tt +2 -6
  25. data/lib/generators/invoke_generators.rb +4 -25
  26. data/lib/generators/menu_generator.rb +10 -100
  27. data/lib/generators/rspec/rspec_generator.rb +0 -11
  28. data/lib/generators/rspec/templates/accessibility_spec.tt +2 -6
  29. data/lib/generators/rspec/templates/spec.tt +6 -8
  30. data/lib/generators/templates/common/gemfile.tt +0 -26
  31. data/lib/generators/templates/common/git_ignore.tt +0 -2
  32. data/lib/generators/templates/common/partials/mobile_config.tt +0 -4
  33. data/lib/generators/templates/common/partials/web_config.tt +1 -12
  34. data/lib/generators/templates/common/rakefile.tt +0 -9
  35. data/lib/generators/templates/common/read_me.tt +4 -10
  36. data/lib/generators/templates/helpers/allure_helper.tt +0 -10
  37. data/lib/generators/templates/helpers/browser_helper.tt +0 -5
  38. data/lib/generators/templates/helpers/partials/quit_driver.tt +1 -3
  39. data/lib/generators/templates/helpers/partials/screenshot.tt +1 -3
  40. data/lib/generators/templates/helpers/partials/selenium_driver.tt +0 -5
  41. data/lib/generators/templates/helpers/spec_helper.tt +2 -44
  42. data/lib/generators/templates/helpers/test_helper.tt +0 -7
  43. data/lib/ruby_raider.rb +2 -50
  44. data/lib/scaffolding/project_detector.rb +2 -9
  45. data/lib/scaffolding/scaffolding.rb +0 -109
  46. data/lib/scaffolding/templates/component.tt +1 -4
  47. data/lib/scaffolding/templates/page_object.tt +0 -10
  48. data/lib/scaffolding/templates/spec.tt +2 -6
  49. data/lib/scaffolding/templates/steps.tt +0 -2
  50. data/lib/utilities/utilities.rb +20 -33
  51. data/lib/version +1 -1
  52. data/sig/commands/scaffolding_commands.rbs +0 -12
  53. data/sig/commands/utility_commands.rbs +0 -7
  54. data/sig/generators/cucumber/cucumber_generator.rbs +0 -4
  55. data/sig/generators/generator.rbs +0 -11
  56. data/sig/generators/helper_generator.rbs +1 -6
  57. data/sig/generators/invoke_generators.rbs +1 -2
  58. data/sig/generators/menu_generator.rbs +2 -6
  59. data/sig/generators/rspec/rspec_generator.rbs +0 -2
  60. data/sig/ruby_raider.rbs +1 -3
  61. data/sig/scaffolding/project_detector.rbs +0 -1
  62. data/sig/scaffolding/scaffolding.rbs +0 -23
  63. data/sig/utilities/utilities.rbs +0 -5
  64. data/spec/commands/raider_commands_spec.rb +0 -61
  65. data/spec/integration/commands/browser_update_after_creation_spec.rb +123 -0
  66. data/spec/integration/commands/scaffolding_commands_spec.rb +0 -20
  67. data/spec/integration/commands/utility_commands_spec.rb +5 -5
  68. data/spec/integration/content/ci_content_spec.rb +6 -61
  69. data/spec/integration/content/common_content_spec.rb +0 -64
  70. data/spec/integration/content/config_content_spec.rb +0 -86
  71. data/spec/integration/content/content_helper.rb +2 -2
  72. data/spec/integration/content/gemfile_content_spec.rb +0 -71
  73. data/spec/integration/content/helper_content_spec.rb +2 -284
  74. data/spec/integration/content/page_content_spec.rb +0 -89
  75. data/spec/integration/content/syntax_validation_spec.rb +2 -2
  76. data/spec/integration/content/test_content_spec.rb +0 -119
  77. data/spec/integration/end_to_end_features_spec.rb +13 -435
  78. data/spec/integration/end_to_end_spec.rb +0 -96
  79. data/spec/integration/generators/axe_addon_spec.rb +2 -52
  80. data/spec/integration/generators/common_generator_spec.rb +1 -13
  81. data/spec/integration/generators/config_features_spec.rb +3 -81
  82. data/spec/integration/generators/github_generator_spec.rb +5 -15
  83. data/spec/integration/generators/helpers_generator_spec.rb +0 -37
  84. data/spec/integration/scaffolding_e2e_spec.rb +2 -237
  85. data/spec/integration/settings_helper.rb +1 -3
  86. data/spec/integration/spec_helper.rb +6 -11
  87. data/spec/menus/menu_generator_spec.rb +4 -107
  88. data/spec/scaffolding/scaffold_project_detector_spec.rb +4 -26
  89. data/spec/scaffolding/scaffolding_features_spec.rb +0 -183
  90. data/spec/system/selenium_spec.rb +1 -4
  91. data/spec/system/support/system_test_helper.rb +0 -1
  92. data/spec/system/watir_spec.rb +1 -4
  93. data/spec/utilities/headless_config_spec.rb +0 -7
  94. metadata +3 -102
  95. data/lib/adopter/adopt_menu.rb +0 -146
  96. data/lib/adopter/converters/base_converter.rb +0 -84
  97. data/lib/adopter/converters/identity_converter.rb +0 -53
  98. data/lib/adopter/migration_plan.rb +0 -74
  99. data/lib/adopter/migrator.rb +0 -96
  100. data/lib/adopter/plan_builder.rb +0 -275
  101. data/lib/adopter/project_analyzer.rb +0 -252
  102. data/lib/adopter/project_detector.rb +0 -157
  103. data/lib/generators/cucumber/templates/partials/capybara_env.tt +0 -38
  104. data/lib/generators/cucumber/templates/partials/capybara_world.tt +0 -6
  105. data/lib/generators/cucumber/templates/performance_feature.tt +0 -5
  106. data/lib/generators/cucumber/templates/performance_steps.tt +0 -17
  107. data/lib/generators/cucumber/templates/visual_feature.tt +0 -5
  108. data/lib/generators/cucumber/templates/visual_steps.tt +0 -19
  109. data/lib/generators/infrastructure/gitlab_generator.rb +0 -11
  110. data/lib/generators/infrastructure/templates/gitlab.tt +0 -46
  111. data/lib/generators/minitest/minitest_generator.rb +0 -35
  112. data/lib/generators/minitest/templates/accessibility_test.tt +0 -26
  113. data/lib/generators/minitest/templates/performance_test.tt +0 -18
  114. data/lib/generators/minitest/templates/test.tt +0 -64
  115. data/lib/generators/minitest/templates/visual_test.tt +0 -23
  116. data/lib/generators/rspec/templates/performance_spec.tt +0 -18
  117. data/lib/generators/rspec/templates/visual_spec.tt +0 -20
  118. data/lib/generators/templates/common/ruby_version.tt +0 -1
  119. data/lib/generators/templates/helpers/capybara_helper.tt +0 -32
  120. data/lib/generators/templates/helpers/debug_helper.tt +0 -190
  121. data/lib/generators/templates/helpers/partials/debug_diagnostics.tt +0 -7
  122. data/lib/generators/templates/helpers/partials/debug_start.tt +0 -7
  123. data/lib/generators/templates/helpers/performance_helper.tt +0 -57
  124. data/lib/generators/templates/helpers/visual_helper.tt +0 -58
  125. data/lib/llm/client.rb +0 -79
  126. data/lib/llm/config.rb +0 -57
  127. data/lib/llm/prompts.rb +0 -84
  128. data/lib/llm/provider.rb +0 -27
  129. data/lib/llm/providers/anthropic_provider.rb +0 -43
  130. data/lib/llm/providers/ollama_provider.rb +0 -56
  131. data/lib/llm/providers/openai_provider.rb +0 -42
  132. data/lib/llm/response_parser.rb +0 -67
  133. data/lib/plugin/plugin.rb +0 -111
  134. data/lib/plugin/plugin_exposer.rb +0 -55
  135. data/lib/scaffolding/crud_generator.rb +0 -94
  136. data/lib/scaffolding/dry_run_presenter.rb +0 -16
  137. data/lib/scaffolding/page_introspector.rb +0 -45
  138. data/lib/scaffolding/scaffold_menu.rb +0 -103
  139. data/lib/scaffolding/templates/page_from_url.tt +0 -75
  140. data/lib/scaffolding/templates/spec_from_page.tt +0 -31
  141. data/lib/scaffolding/templates/spec_from_url.tt +0 -46
  142. data/lib/scaffolding/url_analyzer.rb +0 -179
  143. data/sig/adopter/adopt_menu.rbs +0 -25
  144. data/sig/adopter/converters/base_converter.rbs +0 -23
  145. data/sig/adopter/converters/identity_converter.rbs +0 -16
  146. data/sig/adopter/migration_plan.rbs +0 -34
  147. data/sig/adopter/migrator.rbs +0 -21
  148. data/sig/adopter/plan_builder.rbs +0 -38
  149. data/sig/adopter/project_analyzer.rbs +0 -39
  150. data/sig/adopter/project_detector.rbs +0 -26
  151. data/sig/generators/infrastructure/gitlab_generator.rbs +0 -4
  152. data/sig/generators/minitest/minitest_generator.rbs +0 -8
  153. data/sig/llm/client.rbs +0 -15
  154. data/sig/llm/config.rbs +0 -20
  155. data/sig/llm/prompts.rbs +0 -8
  156. data/sig/llm/provider.rbs +0 -12
  157. data/sig/llm/providers/anthropic_provider.rbs +0 -16
  158. data/sig/llm/providers/ollama_provider.rbs +0 -18
  159. data/sig/llm/providers/openai_provider.rbs +0 -16
  160. data/sig/llm/response_parser.rbs +0 -13
  161. data/sig/plugin/plugin.rbs +0 -24
  162. data/sig/plugin/plugin_exposer.rbs +0 -20
  163. data/sig/scaffolding/crud_generator.rbs +0 -16
  164. data/sig/scaffolding/dry_run_presenter.rbs +0 -4
  165. data/sig/scaffolding/page_introspector.rbs +0 -14
  166. data/sig/scaffolding/scaffold_menu.rbs +0 -18
  167. data/sig/scaffolding/url_analyzer.rbs +0 -28
  168. data/spec/adopter/adopt_menu_spec.rb +0 -176
  169. data/spec/adopter/converters/identity_converter_spec.rb +0 -145
  170. data/spec/adopter/migration_plan_spec.rb +0 -113
  171. data/spec/adopter/migrator_spec.rb +0 -277
  172. data/spec/adopter/plan_builder_spec.rb +0 -298
  173. data/spec/adopter/project_analyzer_spec.rb +0 -337
  174. data/spec/adopter/project_detector_spec.rb +0 -295
  175. data/spec/generators/generator_spec.rb +0 -23
  176. data/spec/integration/content/reporter_content_spec.rb +0 -236
  177. data/spec/integration/content/skip_flags_content_spec.rb +0 -206
  178. data/spec/integration/generators/debug_helper_spec.rb +0 -68
  179. data/spec/integration/generators/gitlab_generator_spec.rb +0 -38
  180. data/spec/integration/generators/lighthouse_addon_spec.rb +0 -132
  181. data/spec/integration/generators/minitest_generator_spec.rb +0 -64
  182. data/spec/integration/generators/reporter_spec.rb +0 -159
  183. data/spec/integration/generators/skip_flags_spec.rb +0 -134
  184. data/spec/integration/generators/visual_addon_spec.rb +0 -148
  185. data/spec/llm/client_spec.rb +0 -79
  186. data/spec/llm/config_spec.rb +0 -92
  187. data/spec/llm/prompts_spec.rb +0 -49
  188. data/spec/llm/response_parser_spec.rb +0 -92
  189. data/spec/menus/adopter_adopt_menu_spec.rb +0 -97
  190. data/spec/scaffolding/page_introspector_spec.rb +0 -82
  191. data/spec/scaffolding/url_analyzer_spec.rb +0 -110
  192. data/spec/system/adopt_matrix_spec.rb +0 -537
  193. data/spec/system/adopt_spec.rb +0 -225
  194. data/spec/system/capybara_spec.rb +0 -42
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_raider
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pequeno
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-03-13 00:00:00.000000000 Z
10
+ date: 2026-03-14 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake
@@ -169,14 +169,6 @@ files:
169
169
  - assets/ruby_raider_logo.svg
170
170
  - bin/raider
171
171
  - bin/release
172
- - lib/adopter/adopt_menu.rb
173
- - lib/adopter/converters/base_converter.rb
174
- - lib/adopter/converters/identity_converter.rb
175
- - lib/adopter/migration_plan.rb
176
- - lib/adopter/migrator.rb
177
- - lib/adopter/plan_builder.rb
178
- - lib/adopter/project_analyzer.rb
179
- - lib/adopter/project_detector.rb
180
172
  - lib/commands/adopt_commands.rb
181
173
  - lib/commands/loaded_commands.rb
182
174
  - lib/commands/plugin_commands.rb
@@ -205,42 +197,27 @@ files:
205
197
  - lib/generators/cucumber/templates/env.tt
206
198
  - lib/generators/cucumber/templates/feature.tt
207
199
  - lib/generators/cucumber/templates/partials/appium_env.tt
208
- - lib/generators/cucumber/templates/partials/capybara_env.tt
209
- - lib/generators/cucumber/templates/partials/capybara_world.tt
210
200
  - lib/generators/cucumber/templates/partials/driver_world.tt
211
201
  - lib/generators/cucumber/templates/partials/mobile_steps.tt
212
202
  - lib/generators/cucumber/templates/partials/selenium_env.tt
213
203
  - lib/generators/cucumber/templates/partials/watir_env.tt
214
204
  - lib/generators/cucumber/templates/partials/watir_world.tt
215
205
  - lib/generators/cucumber/templates/partials/web_steps.tt
216
- - lib/generators/cucumber/templates/performance_feature.tt
217
- - lib/generators/cucumber/templates/performance_steps.tt
218
206
  - lib/generators/cucumber/templates/steps.tt
219
207
  - lib/generators/cucumber/templates/user_factory.tt
220
- - lib/generators/cucumber/templates/visual_feature.tt
221
- - lib/generators/cucumber/templates/visual_steps.tt
222
208
  - lib/generators/cucumber/templates/world.tt
223
209
  - lib/generators/generator.rb
224
210
  - lib/generators/helper_generator.rb
225
211
  - lib/generators/infrastructure/github_generator.rb
226
- - lib/generators/infrastructure/gitlab_generator.rb
227
212
  - lib/generators/infrastructure/templates/github.tt
228
213
  - lib/generators/infrastructure/templates/github_appium.tt
229
- - lib/generators/infrastructure/templates/gitlab.tt
230
214
  - lib/generators/invoke_generators.rb
231
215
  - lib/generators/menu_generator.rb
232
- - lib/generators/minitest/minitest_generator.rb
233
- - lib/generators/minitest/templates/accessibility_test.tt
234
- - lib/generators/minitest/templates/performance_test.tt
235
- - lib/generators/minitest/templates/test.tt
236
- - lib/generators/minitest/templates/visual_test.tt
237
216
  - lib/generators/rspec/rspec_generator.rb
238
217
  - lib/generators/rspec/templates/accessibility_spec.tt
239
218
  - lib/generators/rspec/templates/data.tt
240
219
  - lib/generators/rspec/templates/factory.tt
241
- - lib/generators/rspec/templates/performance_spec.tt
242
220
  - lib/generators/rspec/templates/spec.tt
243
- - lib/generators/rspec/templates/visual_spec.tt
244
221
  - lib/generators/template_renderer.rb
245
222
  - lib/generators/template_renderer/partial_cache.rb
246
223
  - lib/generators/template_renderer/partial_resolver.rb
@@ -255,58 +232,33 @@ files:
255
232
  - lib/generators/templates/common/reek.tt
256
233
  - lib/generators/templates/common/rspec.tt
257
234
  - lib/generators/templates/common/rubocop.tt
258
- - lib/generators/templates/common/ruby_version.tt
259
235
  - lib/generators/templates/helpers/allure_helper.tt
260
236
  - lib/generators/templates/helpers/appium_helper.tt
261
237
  - lib/generators/templates/helpers/browser_helper.tt
262
- - lib/generators/templates/helpers/capybara_helper.tt
263
- - lib/generators/templates/helpers/debug_helper.tt
264
238
  - lib/generators/templates/helpers/driver_helper.tt
265
239
  - lib/generators/templates/helpers/partials/allure_imports.tt
266
240
  - lib/generators/templates/helpers/partials/allure_requirements.tt
267
241
  - lib/generators/templates/helpers/partials/appium_driver.tt
268
242
  - lib/generators/templates/helpers/partials/browserstack_config.tt
269
- - lib/generators/templates/helpers/partials/debug_diagnostics.tt
270
- - lib/generators/templates/helpers/partials/debug_start.tt
271
243
  - lib/generators/templates/helpers/partials/driver_and_options.tt
272
244
  - lib/generators/templates/helpers/partials/quit_driver.tt
273
245
  - lib/generators/templates/helpers/partials/screenshot.tt
274
246
  - lib/generators/templates/helpers/partials/selenium_driver.tt
275
247
  - lib/generators/templates/helpers/partials/video_start.tt
276
248
  - lib/generators/templates/helpers/partials/video_stop.tt
277
- - lib/generators/templates/helpers/performance_helper.tt
278
249
  - lib/generators/templates/helpers/spec_helper.tt
279
250
  - lib/generators/templates/helpers/test_helper.tt
280
251
  - lib/generators/templates/helpers/video_helper.tt
281
- - lib/generators/templates/helpers/visual_helper.tt
282
- - lib/llm/client.rb
283
- - lib/llm/config.rb
284
- - lib/llm/prompts.rb
285
- - lib/llm/provider.rb
286
- - lib/llm/providers/anthropic_provider.rb
287
- - lib/llm/providers/ollama_provider.rb
288
- - lib/llm/providers/openai_provider.rb
289
- - lib/llm/response_parser.rb
290
- - lib/plugin/plugin.rb
291
- - lib/plugin/plugin_exposer.rb
292
252
  - lib/ruby_raider.rb
293
- - lib/scaffolding/crud_generator.rb
294
- - lib/scaffolding/dry_run_presenter.rb
295
253
  - lib/scaffolding/name_normalizer.rb
296
- - lib/scaffolding/page_introspector.rb
297
254
  - lib/scaffolding/project_detector.rb
298
- - lib/scaffolding/scaffold_menu.rb
299
255
  - lib/scaffolding/scaffolding.rb
300
256
  - lib/scaffolding/templates/component.tt
301
257
  - lib/scaffolding/templates/feature.tt
302
258
  - lib/scaffolding/templates/helper.tt
303
- - lib/scaffolding/templates/page_from_url.tt
304
259
  - lib/scaffolding/templates/page_object.tt
305
260
  - lib/scaffolding/templates/spec.tt
306
- - lib/scaffolding/templates/spec_from_page.tt
307
- - lib/scaffolding/templates/spec_from_url.tt
308
261
  - lib/scaffolding/templates/steps.tt
309
- - lib/scaffolding/url_analyzer.rb
310
262
  - lib/utilities/desktop_downloader.rb
311
263
  - lib/utilities/logger.rb
312
264
  - lib/utilities/logo.rb
@@ -314,14 +266,6 @@ files:
314
266
  - lib/version
315
267
  - plugins.yml
316
268
  - ruby_raider.gemspec
317
- - sig/adopter/adopt_menu.rbs
318
- - sig/adopter/converters/base_converter.rbs
319
- - sig/adopter/converters/identity_converter.rbs
320
- - sig/adopter/migration_plan.rbs
321
- - sig/adopter/migrator.rbs
322
- - sig/adopter/plan_builder.rbs
323
- - sig/adopter/project_analyzer.rbs
324
- - sig/adopter/project_detector.rbs
325
269
  - sig/commands/adopt_commands.rbs
326
270
  - sig/commands/loaded_commands.rbs
327
271
  - sig/commands/plugin_commands.rbs
@@ -333,53 +277,29 @@ files:
333
277
  - sig/generators/generator.rbs
334
278
  - sig/generators/helper_generator.rbs
335
279
  - sig/generators/infrastructure/github_generator.rbs
336
- - sig/generators/infrastructure/gitlab_generator.rbs
337
280
  - sig/generators/invoke_generators.rbs
338
281
  - sig/generators/menu_generator.rbs
339
- - sig/generators/minitest/minitest_generator.rbs
340
282
  - sig/generators/rspec/rspec_generator.rbs
341
283
  - sig/generators/template_renderer.rbs
342
284
  - sig/generators/template_renderer/partial_cache.rbs
343
285
  - sig/generators/template_renderer/partial_resolver.rbs
344
286
  - sig/generators/template_renderer/template_error.rbs
345
- - sig/llm/client.rbs
346
- - sig/llm/config.rbs
347
- - sig/llm/prompts.rbs
348
- - sig/llm/provider.rbs
349
- - sig/llm/providers/anthropic_provider.rbs
350
- - sig/llm/providers/ollama_provider.rbs
351
- - sig/llm/providers/openai_provider.rbs
352
- - sig/llm/response_parser.rbs
353
- - sig/plugin/plugin.rbs
354
- - sig/plugin/plugin_exposer.rbs
355
287
  - sig/ruby_raider.rbs
356
- - sig/scaffolding/crud_generator.rbs
357
- - sig/scaffolding/dry_run_presenter.rbs
358
288
  - sig/scaffolding/name_normalizer.rbs
359
- - sig/scaffolding/page_introspector.rbs
360
289
  - sig/scaffolding/project_detector.rbs
361
- - sig/scaffolding/scaffold_menu.rbs
362
290
  - sig/scaffolding/scaffolding.rbs
363
- - sig/scaffolding/url_analyzer.rbs
364
291
  - sig/utilities/desktop_downloader.rbs
365
292
  - sig/utilities/logger.rbs
366
293
  - sig/utilities/logo.rbs
367
294
  - sig/utilities/utilities.rbs
368
295
  - sig/vendor/thor.rbs
369
296
  - sig/vendor/tty_prompt.rbs
370
- - spec/adopter/adopt_menu_spec.rb
371
- - spec/adopter/converters/identity_converter_spec.rb
372
- - spec/adopter/migration_plan_spec.rb
373
- - spec/adopter/migrator_spec.rb
374
- - spec/adopter/plan_builder_spec.rb
375
- - spec/adopter/project_analyzer_spec.rb
376
- - spec/adopter/project_detector_spec.rb
377
297
  - spec/commands/raider_commands_spec.rb
378
298
  - spec/commands/scaffolding_commands_spec.rb
379
299
  - spec/generators/fixtures/templates/test.tt
380
300
  - spec/generators/fixtures/templates/test_partial.tt
381
- - spec/generators/generator_spec.rb
382
301
  - spec/generators/template_renderer_spec.rb
302
+ - spec/integration/commands/browser_update_after_creation_spec.rb
383
303
  - spec/integration/commands/scaffolding_commands_spec.rb
384
304
  - spec/integration/commands/utility_commands_spec.rb
385
305
  - spec/integration/content/ci_content_spec.rb
@@ -389,8 +309,6 @@ files:
389
309
  - spec/integration/content/gemfile_content_spec.rb
390
310
  - spec/integration/content/helper_content_spec.rb
391
311
  - spec/integration/content/page_content_spec.rb
392
- - spec/integration/content/reporter_content_spec.rb
393
- - spec/integration/content/skip_flags_content_spec.rb
394
312
  - spec/integration/content/syntax_validation_spec.rb
395
313
  - spec/integration/content/test_content_spec.rb
396
314
  - spec/integration/end_to_end_features_spec.rb
@@ -400,33 +318,16 @@ files:
400
318
  - spec/integration/generators/common_generator_spec.rb
401
319
  - spec/integration/generators/config_features_spec.rb
402
320
  - spec/integration/generators/cucumber_generator_spec.rb
403
- - spec/integration/generators/debug_helper_spec.rb
404
321
  - spec/integration/generators/github_generator_spec.rb
405
- - spec/integration/generators/gitlab_generator_spec.rb
406
322
  - spec/integration/generators/helpers_generator_spec.rb
407
- - spec/integration/generators/lighthouse_addon_spec.rb
408
- - spec/integration/generators/minitest_generator_spec.rb
409
- - spec/integration/generators/reporter_spec.rb
410
323
  - spec/integration/generators/rspec_generator_spec.rb
411
- - spec/integration/generators/skip_flags_spec.rb
412
- - spec/integration/generators/visual_addon_spec.rb
413
324
  - spec/integration/scaffolding_e2e_spec.rb
414
325
  - spec/integration/settings_helper.rb
415
326
  - spec/integration/spec_helper.rb
416
- - spec/llm/client_spec.rb
417
- - spec/llm/config_spec.rb
418
- - spec/llm/prompts_spec.rb
419
- - spec/llm/response_parser_spec.rb
420
- - spec/menus/adopter_adopt_menu_spec.rb
421
327
  - spec/menus/menu_generator_spec.rb
422
328
  - spec/scaffolding/name_normalizer_spec.rb
423
- - spec/scaffolding/page_introspector_spec.rb
424
329
  - spec/scaffolding/scaffold_project_detector_spec.rb
425
330
  - spec/scaffolding/scaffolding_features_spec.rb
426
- - spec/scaffolding/url_analyzer_spec.rb
427
- - spec/system/adopt_matrix_spec.rb
428
- - spec/system/adopt_spec.rb
429
- - spec/system/capybara_spec.rb
430
331
  - spec/system/selenium_spec.rb
431
332
  - spec/system/support/system_test_helper.rb
432
333
  - spec/system/watir_spec.rb
@@ -1,146 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'tty-prompt'
4
- require_relative 'project_analyzer'
5
- require_relative 'plan_builder'
6
- require_relative 'migrator'
7
-
8
- module Adopter
9
- class AdoptMenu
10
- WEB_AUTOMATIONS = %w[selenium capybara watir].freeze
11
- TEST_FRAMEWORKS = %w[rspec cucumber minitest].freeze
12
- CI_PLATFORMS = %w[github gitlab].freeze
13
-
14
- def initialize
15
- @prompt = TTY::Prompt.new
16
- end
17
-
18
- def run
19
- source_path = ask_source_path
20
- detection = preview_detection(source_path)
21
- target_automation = ask_target_automation(detection[:automation])
22
- target_framework = ask_target_framework(detection[:framework])
23
- output_path = ask_output_path
24
- ci_platform = ask_ci_platform(detection[:ci_platform])
25
-
26
- execute_adoption(
27
- source_path:,
28
- output_path:,
29
- target_automation:,
30
- target_framework:,
31
- ci_platform:
32
- )
33
- end
34
-
35
- # Programmatic entry point for raider_desktop and CLI --parameters
36
- def self.adopt(params)
37
- validate_params!(params)
38
-
39
- analysis = ProjectAnalyzer.new(params[:source_path]).analyze
40
- plan = PlanBuilder.new(analysis, params).build
41
- results = Migrator.new(plan).execute
42
-
43
- { plan:, results: }
44
- end
45
-
46
- def self.validate_params!(params)
47
- raise ArgumentError, 'source_path is required' unless params[:source_path]
48
- raise ArgumentError, 'output_path is required' unless params[:output_path]
49
- raise ArgumentError, 'target_automation is required' unless params[:target_automation]
50
- raise ArgumentError, 'target_framework is required' unless params[:target_framework]
51
-
52
- raise ArgumentError, "target_automation must be one of: #{WEB_AUTOMATIONS.join(', ')}" unless WEB_AUTOMATIONS.include?(params[:target_automation])
53
-
54
- return if TEST_FRAMEWORKS.include?(params[:target_framework])
55
-
56
- raise ArgumentError, "target_framework must be one of: #{TEST_FRAMEWORKS.join(', ')}"
57
- end
58
-
59
- private
60
-
61
- def ask_source_path
62
- path = @prompt.ask('Enter the path to your existing test project:') do |q|
63
- q.required true
64
- q.validate ->(input) { Dir.exist?(input) }
65
- q.messages[:valid?] = 'Directory does not exist: %<value>s'
66
- end
67
- File.expand_path(path)
68
- end
69
-
70
- def preview_detection(source_path)
71
- detection = ProjectDetector.detect(source_path)
72
- @prompt.say("\nDetected project settings:")
73
- @prompt.say(" Automation: #{detection[:automation] || 'unknown'}")
74
- @prompt.say(" Framework: #{detection[:framework] || 'unknown'}")
75
- @prompt.say(" Browser: #{detection[:browser] || 'not detected'}")
76
- @prompt.say(" URL: #{detection[:url] || 'not detected'}")
77
- @prompt.say(" CI: #{detection[:ci_platform] || 'none'}")
78
- @prompt.say('')
79
- detection
80
- end
81
-
82
- def ask_target_automation(detected)
83
- default = WEB_AUTOMATIONS.include?(detected) ? detected : nil
84
- @prompt.select('Select target automation framework:', WEB_AUTOMATIONS.map(&:capitalize),
85
- default: default&.capitalize) do |menu|
86
- menu.choice :Quit, -> { exit }
87
- end.downcase
88
- end
89
-
90
- def ask_target_framework(detected)
91
- default = TEST_FRAMEWORKS.include?(detected) ? detected : nil
92
- @prompt.select('Select target test framework:', TEST_FRAMEWORKS.map(&:capitalize),
93
- default: default&.capitalize) do |menu|
94
- menu.choice :Quit, -> { exit }
95
- end.downcase
96
- end
97
-
98
- def ask_output_path
99
- @prompt.ask('Enter the output path for the new Raider project:') do |q|
100
- q.required true
101
- end
102
- end
103
-
104
- def ask_ci_platform(detected)
105
- choices = [{ name: 'Github Actions', value: 'github' },
106
- { name: 'Gitlab CI/CD', value: 'gitlab' },
107
- { name: 'No CI', value: nil }]
108
- default = case detected
109
- when 'github' then 'Github Actions'
110
- when 'gitlab' then 'Gitlab CI/CD'
111
- end
112
- @prompt.select('Configure CI/CD?', choices, default:)
113
- end
114
-
115
- def execute_adoption(params)
116
- @prompt.say("\nAdopting project...")
117
- result = self.class.adopt(params)
118
- print_results(result[:plan], result[:results])
119
- rescue MobileProjectError => e
120
- @prompt.error(e.message)
121
- rescue StandardError => e
122
- @prompt.error("Adoption failed: #{e.message}")
123
- end
124
-
125
- def print_results(plan, results)
126
- @prompt.say("\nAdoption complete!")
127
- @prompt.say(" Pages converted: #{results[:pages]}")
128
- @prompt.say(" Tests converted: #{results[:tests]}")
129
- @prompt.say(" Features copied: #{results[:features]}")
130
- @prompt.say(" Steps converted: #{results[:steps]}")
131
-
132
- unless results[:errors].empty?
133
- @prompt.warn("\nErrors:")
134
- results[:errors].each { |e| @prompt.warn(" - #{e}") }
135
- end
136
-
137
- unless plan.warnings.empty?
138
- @prompt.warn("\nWarnings:")
139
- plan.warnings.each { |w| @prompt.warn(" - #{w}") }
140
- end
141
-
142
- @prompt.say("\nOutput: #{plan.output_path}")
143
- @prompt.say("Run: cd #{plan.output_path} && bundle install")
144
- end
145
- end
146
- end
@@ -1,84 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Adopter
4
- module Converters
5
- class BaseConverter
6
- RAIDER_BASE_CLASSES = %w[Page BasePage AbstractPage].freeze
7
-
8
- def convert_page(content, _page_info)
9
- content
10
- end
11
-
12
- def convert_test(content, _test_info)
13
- content
14
- end
15
-
16
- private
17
-
18
- def ensure_frozen_string_literal(content)
19
- return content if content.include?('frozen_string_literal')
20
-
21
- "# frozen_string_literal: true\n\n#{content}"
22
- end
23
-
24
- def update_base_class(content, target_base = 'Page')
25
- content.gsub(/class\s+(\w+)\s*<\s*([\w:]+)/) do
26
- class_name = ::Regexp.last_match(1)
27
- current_base = ::Regexp.last_match(2)
28
- if raider_compatible_base?(current_base)
29
- "class #{class_name} < #{target_base}"
30
- else
31
- "class #{class_name} < #{current_base}"
32
- end
33
- end
34
- end
35
-
36
- def raider_compatible_base?(base_class)
37
- RAIDER_BASE_CLASSES.include?(base_class) || base_class.include?('Page')
38
- end
39
-
40
- def update_require_paths(content, target_automation)
41
- result = content.dup
42
- result = update_page_requires(result)
43
- update_helper_requires(result, target_automation)
44
- end
45
-
46
- def update_page_requires(content)
47
- content.gsub(%r{require_relative\s+['"]\.*/(?:pages?|page_objects)/(\w+)['"]}) do
48
- page_name = ::Regexp.last_match(1)
49
- "require_relative '../page_objects/pages/#{page_name}'"
50
- end
51
- end
52
-
53
- def update_helper_requires(content, target_automation)
54
- case target_automation
55
- when 'capybara'
56
- content.gsub(%r{require_relative\s+['"]\.*/(?:helpers?|support)/(?:driver|browser)_?\w*['"]},
57
- "require_relative '../helpers/capybara_helper'")
58
- when 'watir'
59
- content.gsub(%r{require_relative\s+['"]\.*/(?:helpers?|support)/(?:driver|capybara)_?\w*['"]},
60
- "require_relative '../helpers/browser_helper'")
61
- else
62
- content.gsub(%r{require_relative\s+['"]\.*/(?:helpers?|support)/(?:browser|capybara)_?\w*['"]},
63
- "require_relative '../helpers/driver_helper'")
64
- end
65
- end
66
-
67
- def remove_driver_arg(content)
68
- content.gsub(/(\w+)\.new\(\s*(?:driver|browser|page)\s*\)/, '\1.new')
69
- end
70
-
71
- def swap_driver_arg(content, target_arg)
72
- content.gsub(/(\w+)\.new\(\s*(?:driver|browser|page)\s*\)/, "\\1.new(#{target_arg})")
73
- end
74
-
75
- def driver_arg_for(target_automation)
76
- case target_automation
77
- when 'watir' then 'browser'
78
- when 'capybara' then nil
79
- else 'driver'
80
- end
81
- end
82
- end
83
- end
84
- end
@@ -1,53 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base_converter'
4
-
5
- module Adopter
6
- module Converters
7
- class IdentityConverter < BaseConverter
8
- def initialize(target_automation)
9
- super()
10
- @target_automation = target_automation
11
- end
12
-
13
- def convert_page(content, _page_info)
14
- result = content.dup
15
- result = ensure_frozen_string_literal(result)
16
- result = update_base_class(result)
17
- result = add_page_require(result)
18
- update_page_instantiation(result)
19
- end
20
-
21
- def convert_test(content, _test_info)
22
- result = content.dup
23
- result = ensure_frozen_string_literal(result)
24
- result = update_require_paths(result, @target_automation)
25
- update_page_instantiation(result)
26
- end
27
-
28
- def convert_step(content)
29
- result = content.dup
30
- result = ensure_frozen_string_literal(result)
31
- result = update_require_paths(result, @target_automation)
32
- update_page_instantiation(result)
33
- end
34
-
35
- private
36
-
37
- def add_page_require(content)
38
- return content if content.include?("require_relative '../abstract/page'")
39
-
40
- content.sub(/^(class\s)/, "require_relative '../abstract/page'\n\n\\1")
41
- end
42
-
43
- def update_page_instantiation(content)
44
- arg = driver_arg_for(@target_automation)
45
- if arg
46
- swap_driver_arg(content, arg)
47
- else
48
- remove_driver_arg(content)
49
- end
50
- end
51
- end
52
- end
53
- end
@@ -1,74 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Adopter
4
- class MigrationPlan
5
- attr_reader :source_path, :output_path, :target_automation, :target_framework,
6
- :ci_platform, :skeleton_structure, :converted_pages, :converted_tests,
7
- :converted_features, :converted_steps, :gemfile_additions,
8
- :config_overrides, :warnings, :manual_actions
9
-
10
- def initialize(attrs = {})
11
- @source_path = attrs[:source_path]
12
- @output_path = attrs[:output_path]
13
- @target_automation = attrs[:target_automation]
14
- @target_framework = attrs[:target_framework]
15
- @ci_platform = attrs[:ci_platform]
16
- @skeleton_structure = attrs[:skeleton_structure] || {}
17
- @converted_pages = attrs[:converted_pages] || []
18
- @converted_tests = attrs[:converted_tests] || []
19
- @converted_features = attrs[:converted_features] || []
20
- @converted_steps = attrs[:converted_steps] || []
21
- @gemfile_additions = attrs[:gemfile_additions] || []
22
- @config_overrides = attrs[:config_overrides] || {}
23
- @warnings = attrs[:warnings] || []
24
- @manual_actions = attrs[:manual_actions] || []
25
- end
26
-
27
- def to_h
28
- {
29
- source_path:,
30
- output_path:,
31
- target_automation:,
32
- target_framework:,
33
- ci_platform:,
34
- skeleton_structure:,
35
- converted_pages: converted_pages.map(&:to_h),
36
- converted_tests: converted_tests.map(&:to_h),
37
- converted_features: converted_features.map(&:to_h),
38
- converted_steps: converted_steps.map(&:to_h),
39
- gemfile_additions:,
40
- config_overrides:,
41
- warnings:,
42
- manual_actions:
43
- }
44
- end
45
-
46
- def to_json(*args)
47
- require 'json'
48
- to_h.to_json(*args)
49
- end
50
-
51
- def summary
52
- {
53
- pages: converted_pages.length,
54
- tests: converted_tests.length,
55
- features: converted_features.length,
56
- steps: converted_steps.length,
57
- custom_gems: gemfile_additions.length,
58
- warnings: warnings.length,
59
- manual_actions: manual_actions.length
60
- }
61
- end
62
- end
63
-
64
- ConvertedFile = Struct.new(:output_path, :content, :source_file, :conversion_notes, keyword_init: true) do
65
- def to_h
66
- {
67
- output_path:,
68
- content:,
69
- source_file:,
70
- conversion_notes:
71
- }
72
- end
73
- end
74
- end