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.
Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/e2e_tests.yml +58 -0
  3. data/.github/workflows/integration.yml +4 -6
  4. data/.github/workflows/reek.yml +6 -5
  5. data/.github/workflows/release.yml +175 -0
  6. data/.github/workflows/rubocop.yml +7 -6
  7. data/.github/workflows/steep.yml +21 -0
  8. data/.github/workflows/system_tests.yml +83 -0
  9. data/.gitignore +1 -1
  10. data/.reek.yml +46 -4
  11. data/.rubocop.yml +24 -0
  12. data/.ruby-version +1 -1
  13. data/README.md +140 -77
  14. data/RELEASE.md +412 -0
  15. data/RELEASE_QUICK_GUIDE.md +77 -0
  16. data/Steepfile +22 -0
  17. data/assets/ruby_raider_logo.svg +51 -0
  18. data/bin/release +186 -0
  19. data/lib/adopter/adopt_menu.rb +146 -0
  20. data/lib/adopter/converters/base_converter.rb +84 -0
  21. data/lib/adopter/converters/identity_converter.rb +53 -0
  22. data/lib/adopter/migration_plan.rb +74 -0
  23. data/lib/adopter/migrator.rb +96 -0
  24. data/lib/adopter/plan_builder.rb +275 -0
  25. data/lib/adopter/project_analyzer.rb +252 -0
  26. data/lib/adopter/project_detector.rb +157 -0
  27. data/lib/commands/adopt_commands.rb +42 -0
  28. data/lib/commands/plugin_commands.rb +0 -2
  29. data/lib/commands/scaffolding_commands.rb +220 -37
  30. data/lib/commands/utility_commands.rb +82 -2
  31. data/lib/generators/automation/automation_generator.rb +0 -7
  32. data/lib/generators/automation/templates/account.tt +9 -5
  33. data/lib/generators/automation/templates/appium_caps.tt +60 -6
  34. data/lib/generators/automation/templates/home.tt +4 -4
  35. data/lib/generators/automation/templates/login.tt +61 -4
  36. data/lib/generators/automation/templates/page.tt +13 -7
  37. data/lib/generators/automation/templates/partials/element.tt +1 -1
  38. data/lib/generators/automation/templates/partials/home_page_selector.tt +4 -4
  39. data/lib/generators/automation/templates/partials/initialize_selector.tt +3 -8
  40. data/lib/generators/automation/templates/partials/pdp_page_selector.tt +4 -4
  41. data/lib/generators/automation/templates/partials/url_methods.tt +0 -1
  42. data/lib/generators/automation/templates/partials/visit_method.tt +11 -1
  43. data/lib/generators/automation/templates/pdp.tt +1 -1
  44. data/lib/generators/common_generator.rb +12 -0
  45. data/lib/generators/cucumber/cucumber_generator.rb +36 -0
  46. data/lib/generators/cucumber/templates/accessibility_feature.tt +5 -0
  47. data/lib/generators/cucumber/templates/accessibility_steps.tt +21 -0
  48. data/lib/generators/cucumber/templates/cucumber.tt +8 -1
  49. data/lib/generators/cucumber/templates/env.tt +6 -4
  50. data/lib/generators/cucumber/templates/feature.tt +0 -4
  51. data/lib/generators/cucumber/templates/partials/appium_env.tt +5 -0
  52. data/lib/generators/cucumber/templates/partials/capybara_env.tt +38 -0
  53. data/lib/generators/cucumber/templates/partials/capybara_world.tt +6 -0
  54. data/lib/generators/cucumber/templates/partials/driver_world.tt +1 -4
  55. data/lib/generators/cucumber/templates/partials/mobile_steps.tt +2 -2
  56. data/lib/generators/cucumber/templates/partials/selenium_env.tt +22 -35
  57. data/lib/generators/cucumber/templates/partials/watir_env.tt +20 -1
  58. data/lib/generators/cucumber/templates/partials/web_steps.tt +10 -15
  59. data/lib/generators/cucumber/templates/performance_feature.tt +5 -0
  60. data/lib/generators/cucumber/templates/performance_steps.tt +17 -0
  61. data/lib/generators/cucumber/templates/steps.tt +2 -2
  62. data/lib/generators/cucumber/templates/visual_feature.tt +5 -0
  63. data/lib/generators/cucumber/templates/visual_steps.tt +19 -0
  64. data/lib/generators/cucumber/templates/world.tt +5 -3
  65. data/lib/generators/generator.rb +50 -7
  66. data/lib/generators/helper_generator.rb +39 -9
  67. data/lib/generators/infrastructure/github_generator.rb +6 -0
  68. data/lib/generators/infrastructure/templates/github.tt +12 -8
  69. data/lib/generators/infrastructure/templates/github_appium.tt +108 -0
  70. data/lib/generators/infrastructure/templates/gitlab.tt +6 -3
  71. data/lib/generators/invoke_generators.rb +43 -9
  72. data/lib/generators/menu_generator.rb +122 -11
  73. data/lib/generators/minitest/minitest_generator.rb +35 -0
  74. data/lib/generators/minitest/templates/accessibility_test.tt +26 -0
  75. data/lib/generators/minitest/templates/performance_test.tt +18 -0
  76. data/lib/generators/minitest/templates/test.tt +64 -0
  77. data/lib/generators/minitest/templates/visual_test.tt +23 -0
  78. data/lib/generators/rspec/rspec_generator.rb +16 -4
  79. data/lib/generators/rspec/templates/accessibility_spec.tt +25 -0
  80. data/lib/generators/rspec/templates/performance_spec.tt +18 -0
  81. data/lib/generators/rspec/templates/spec.tt +13 -41
  82. data/lib/generators/rspec/templates/visual_spec.tt +20 -0
  83. data/lib/generators/template_renderer/partial_cache.rb +126 -0
  84. data/lib/generators/template_renderer/partial_resolver.rb +110 -0
  85. data/lib/generators/template_renderer/template_error.rb +50 -0
  86. data/lib/generators/template_renderer.rb +106 -0
  87. data/lib/generators/templates/common/config.tt +2 -2
  88. data/lib/generators/templates/common/gemfile.tt +36 -9
  89. data/lib/generators/templates/common/git_ignore.tt +6 -1
  90. data/lib/generators/templates/common/partials/mobile_config.tt +5 -1
  91. data/lib/generators/templates/common/partials/web_config.tt +17 -8
  92. data/lib/generators/templates/common/rakefile.tt +36 -0
  93. data/lib/generators/templates/common/read_me.tt +43 -91
  94. data/lib/generators/templates/common/rspec.tt +3 -0
  95. data/lib/generators/templates/common/ruby_version.tt +1 -0
  96. data/lib/generators/templates/helpers/allure_helper.tt +13 -2
  97. data/lib/generators/templates/helpers/browser_helper.tt +13 -2
  98. data/lib/generators/templates/helpers/capybara_helper.tt +32 -0
  99. data/lib/generators/templates/helpers/debug_helper.tt +190 -0
  100. data/lib/generators/templates/helpers/driver_helper.tt +3 -11
  101. data/lib/generators/templates/helpers/partials/allure_imports.tt +3 -1
  102. data/lib/generators/templates/helpers/partials/allure_requirements.tt +3 -1
  103. data/lib/generators/templates/helpers/partials/appium_driver.tt +44 -0
  104. data/lib/generators/templates/helpers/partials/browserstack_config.tt +13 -0
  105. data/lib/generators/templates/helpers/partials/debug_diagnostics.tt +7 -0
  106. data/lib/generators/templates/helpers/partials/debug_start.tt +7 -0
  107. data/lib/generators/templates/helpers/partials/driver_and_options.tt +5 -115
  108. data/lib/generators/templates/helpers/partials/quit_driver.tt +3 -1
  109. data/lib/generators/templates/helpers/partials/screenshot.tt +3 -1
  110. data/lib/generators/templates/helpers/partials/selenium_driver.tt +26 -0
  111. data/lib/generators/templates/helpers/partials/video_start.tt +9 -0
  112. data/lib/generators/templates/helpers/partials/video_stop.tt +4 -0
  113. data/lib/generators/templates/helpers/performance_helper.tt +57 -0
  114. data/lib/generators/templates/helpers/spec_helper.tt +72 -10
  115. data/lib/generators/templates/helpers/test_helper.tt +94 -0
  116. data/lib/generators/templates/helpers/video_helper.tt +270 -0
  117. data/lib/generators/templates/helpers/visual_helper.tt +39 -46
  118. data/lib/llm/client.rb +79 -0
  119. data/lib/llm/config.rb +57 -0
  120. data/lib/llm/prompts.rb +84 -0
  121. data/lib/llm/provider.rb +27 -0
  122. data/lib/llm/providers/anthropic_provider.rb +43 -0
  123. data/lib/llm/providers/ollama_provider.rb +56 -0
  124. data/lib/llm/providers/openai_provider.rb +42 -0
  125. data/lib/llm/response_parser.rb +67 -0
  126. data/lib/plugin/plugin.rb +22 -20
  127. data/lib/plugin/plugin_exposer.rb +16 -38
  128. data/lib/ruby_raider.rb +51 -11
  129. data/lib/scaffolding/crud_generator.rb +94 -0
  130. data/lib/scaffolding/dry_run_presenter.rb +16 -0
  131. data/lib/scaffolding/name_normalizer.rb +63 -0
  132. data/lib/scaffolding/page_introspector.rb +45 -0
  133. data/lib/scaffolding/project_detector.rb +72 -0
  134. data/lib/scaffolding/scaffold_menu.rb +103 -0
  135. data/lib/scaffolding/scaffolding.rb +158 -11
  136. data/lib/scaffolding/templates/component.tt +30 -0
  137. data/lib/scaffolding/templates/feature.tt +4 -4
  138. data/lib/scaffolding/templates/helper.tt +15 -1
  139. data/lib/scaffolding/templates/page_from_url.tt +75 -0
  140. data/lib/scaffolding/templates/page_object.tt +50 -1
  141. data/lib/scaffolding/templates/spec.tt +33 -2
  142. data/lib/scaffolding/templates/spec_from_page.tt +31 -0
  143. data/lib/scaffolding/templates/spec_from_url.tt +46 -0
  144. data/lib/scaffolding/templates/steps.tt +17 -5
  145. data/lib/scaffolding/url_analyzer.rb +179 -0
  146. data/lib/utilities/desktop_downloader.rb +177 -0
  147. data/lib/utilities/logo.rb +83 -0
  148. data/lib/utilities/utilities.rb +53 -20
  149. data/lib/version +1 -1
  150. data/ruby_raider.gemspec +1 -0
  151. data/sig/adopter/adopt_menu.rbs +25 -0
  152. data/sig/adopter/converters/base_converter.rbs +23 -0
  153. data/sig/adopter/converters/identity_converter.rbs +16 -0
  154. data/sig/adopter/migration_plan.rbs +34 -0
  155. data/sig/adopter/migrator.rbs +21 -0
  156. data/sig/adopter/plan_builder.rbs +38 -0
  157. data/sig/adopter/project_analyzer.rbs +39 -0
  158. data/sig/adopter/project_detector.rbs +26 -0
  159. data/sig/commands/adopt_commands.rbs +8 -0
  160. data/sig/commands/loaded_commands.rbs +5 -0
  161. data/sig/commands/plugin_commands.rbs +9 -0
  162. data/sig/commands/scaffolding_commands.rbs +28 -0
  163. data/sig/commands/utility_commands.rbs +21 -0
  164. data/sig/generators/automation/automation_generator.rbs +20 -0
  165. data/sig/generators/common_generator.rbs +12 -0
  166. data/sig/generators/cucumber/cucumber_generator.rbs +16 -0
  167. data/sig/generators/generator.rbs +40 -0
  168. data/sig/generators/helper_generator.rbs +18 -0
  169. data/sig/generators/infrastructure/github_generator.rbs +5 -0
  170. data/sig/generators/infrastructure/gitlab_generator.rbs +4 -0
  171. data/sig/generators/invoke_generators.rbs +10 -0
  172. data/sig/generators/menu_generator.rbs +29 -0
  173. data/sig/generators/minitest/minitest_generator.rbs +8 -0
  174. data/sig/generators/rspec/rspec_generator.rbs +8 -0
  175. data/sig/generators/template_renderer/partial_cache.rbs +20 -0
  176. data/sig/generators/template_renderer/partial_resolver.rbs +20 -0
  177. data/sig/generators/template_renderer/template_error.rbs +19 -0
  178. data/sig/generators/template_renderer.rbs +10 -0
  179. data/sig/llm/client.rbs +15 -0
  180. data/sig/llm/config.rbs +20 -0
  181. data/sig/llm/prompts.rbs +8 -0
  182. data/sig/llm/provider.rbs +12 -0
  183. data/sig/llm/providers/anthropic_provider.rbs +16 -0
  184. data/sig/llm/providers/ollama_provider.rbs +18 -0
  185. data/sig/llm/providers/openai_provider.rbs +16 -0
  186. data/sig/llm/response_parser.rbs +13 -0
  187. data/sig/plugin/plugin.rbs +24 -0
  188. data/sig/plugin/plugin_exposer.rbs +20 -0
  189. data/sig/ruby_raider.rbs +15 -0
  190. data/sig/scaffolding/crud_generator.rbs +16 -0
  191. data/sig/scaffolding/dry_run_presenter.rbs +4 -0
  192. data/sig/scaffolding/name_normalizer.rbs +17 -0
  193. data/sig/scaffolding/page_introspector.rbs +14 -0
  194. data/sig/scaffolding/project_detector.rbs +14 -0
  195. data/sig/scaffolding/scaffold_menu.rbs +18 -0
  196. data/sig/scaffolding/scaffolding.rbs +55 -0
  197. data/sig/scaffolding/url_analyzer.rbs +28 -0
  198. data/sig/utilities/desktop_downloader.rbs +23 -0
  199. data/sig/utilities/logger.rbs +13 -0
  200. data/sig/utilities/logo.rbs +16 -0
  201. data/sig/utilities/utilities.rbs +30 -0
  202. data/sig/vendor/thor.rbs +34 -0
  203. data/sig/vendor/tty_prompt.rbs +15 -0
  204. data/spec/adopter/adopt_menu_spec.rb +176 -0
  205. data/spec/adopter/converters/identity_converter_spec.rb +145 -0
  206. data/spec/adopter/migration_plan_spec.rb +113 -0
  207. data/spec/adopter/migrator_spec.rb +277 -0
  208. data/spec/adopter/plan_builder_spec.rb +298 -0
  209. data/spec/adopter/project_analyzer_spec.rb +337 -0
  210. data/spec/adopter/project_detector_spec.rb +295 -0
  211. data/spec/commands/raider_commands_spec.rb +129 -0
  212. data/spec/generators/fixtures/templates/test.tt +1 -0
  213. data/spec/generators/fixtures/templates/test_partial.tt +1 -0
  214. data/spec/generators/generator_spec.rb +23 -0
  215. data/spec/generators/template_renderer_spec.rb +298 -0
  216. data/spec/integration/commands/scaffolding_commands_spec.rb +2 -2
  217. data/spec/integration/commands/utility_commands_spec.rb +24 -4
  218. data/spec/integration/content/ci_content_spec.rb +119 -0
  219. data/spec/integration/content/common_content_spec.rb +288 -0
  220. data/spec/integration/content/config_content_spec.rb +175 -0
  221. data/spec/integration/content/content_helper.rb +32 -0
  222. data/spec/integration/content/gemfile_content_spec.rb +209 -0
  223. data/spec/integration/content/helper_content_spec.rb +485 -0
  224. data/spec/integration/content/page_content_spec.rb +259 -0
  225. data/spec/integration/content/reporter_content_spec.rb +236 -0
  226. data/spec/integration/content/skip_flags_content_spec.rb +206 -0
  227. data/spec/integration/content/syntax_validation_spec.rb +30 -0
  228. data/spec/integration/content/test_content_spec.rb +266 -0
  229. data/spec/integration/end_to_end_features_spec.rb +690 -0
  230. data/spec/integration/end_to_end_spec.rb +361 -0
  231. data/spec/integration/generators/automation_generator_spec.rb +9 -21
  232. data/spec/integration/generators/axe_addon_spec.rb +150 -0
  233. data/spec/integration/generators/common_generator_spec.rb +48 -49
  234. data/spec/integration/generators/config_features_spec.rb +155 -0
  235. data/spec/integration/generators/cucumber_generator_spec.rb +7 -7
  236. data/spec/integration/generators/debug_helper_spec.rb +68 -0
  237. data/spec/integration/generators/github_generator_spec.rb +8 -8
  238. data/spec/integration/generators/gitlab_generator_spec.rb +8 -8
  239. data/spec/integration/generators/helpers_generator_spec.rb +70 -44
  240. data/spec/integration/generators/lighthouse_addon_spec.rb +132 -0
  241. data/spec/integration/generators/minitest_generator_spec.rb +64 -0
  242. data/spec/integration/generators/reporter_spec.rb +159 -0
  243. data/spec/integration/generators/rspec_generator_spec.rb +7 -7
  244. data/spec/integration/generators/skip_flags_spec.rb +134 -0
  245. data/spec/integration/generators/visual_addon_spec.rb +148 -0
  246. data/spec/integration/settings_helper.rb +1 -4
  247. data/spec/integration/spec_helper.rb +46 -11
  248. data/spec/llm/client_spec.rb +79 -0
  249. data/spec/llm/config_spec.rb +92 -0
  250. data/spec/llm/prompts_spec.rb +49 -0
  251. data/spec/llm/response_parser_spec.rb +92 -0
  252. data/spec/menus/adopter_adopt_menu_spec.rb +97 -0
  253. data/spec/menus/menu_generator_spec.rb +263 -0
  254. data/spec/scaffolding/name_normalizer_spec.rb +113 -0
  255. data/spec/scaffolding/page_introspector_spec.rb +82 -0
  256. data/spec/scaffolding/scaffold_project_detector_spec.rb +104 -0
  257. data/spec/scaffolding/scaffolding_features_spec.rb +311 -0
  258. data/spec/scaffolding/url_analyzer_spec.rb +110 -0
  259. data/spec/system/adopt_matrix_spec.rb +537 -0
  260. data/spec/system/adopt_spec.rb +225 -0
  261. data/spec/system/capybara_spec.rb +42 -0
  262. data/spec/system/selenium_spec.rb +19 -17
  263. data/spec/system/support/system_test_helper.rb +33 -0
  264. data/spec/system/watir_spec.rb +19 -17
  265. data/spec/utilities/desktop_downloader_spec.rb +92 -0
  266. metadata +193 -18
  267. data/.github/workflows/push_gem.yml +0 -37
  268. data/.github/workflows/selenium.yml +0 -22
  269. data/.github/workflows/watir.yml +0 -22
  270. data/lib/generators/automation/templates/partials/android_caps.tt +0 -17
  271. data/lib/generators/automation/templates/partials/cross_platform_caps.tt +0 -25
  272. data/lib/generators/automation/templates/partials/ios_caps.tt +0 -18
  273. data/lib/generators/automation/templates/partials/selenium_account.tt +0 -9
  274. data/lib/generators/automation/templates/partials/selenium_login.tt +0 -34
  275. data/lib/generators/automation/templates/partials/watir_account.tt +0 -7
  276. data/lib/generators/automation/templates/partials/watir_login.tt +0 -32
  277. data/lib/generators/automation/templates/visual_options.tt +0 -16
  278. data/lib/generators/templates/helpers/visual_spec_helper.tt +0 -35
data/README.md CHANGED
@@ -10,10 +10,10 @@
10
10
  <br />
11
11
  <div align="center">
12
12
  <a href="https://github.com/RubyRaider/ruby_raider">
13
- <img src="https://www.ruby-raider.com/assets/icon-DYY74ofR.png" alt="Logo" style="width:200px;">
13
+ <img src="assets/ruby_raider_logo.svg" alt="Logo" style="width:200px;">
14
14
  </a>
15
15
  <p align="center">
16
- <a href="https://github.com/RubyRaider/ruby_raider#getting-started"><strong>Explore the docs »</strong></a>
16
+ <a href="https://github.com/RubyRaider/ruby_raider#getting-started"><strong>Explore the docs</strong></a>
17
17
  <br />
18
18
  <br />
19
19
  <a href="https://rubygems.org/gems/ruby_raider">Rubygems</a>
@@ -22,126 +22,189 @@
22
22
  ·
23
23
  <a href="https://github.com/RubyRaider/ruby_raider/issues">Request Feature</a>
24
24
  </p>
25
- <p align="center"> For more information and updates on releases, see <a href="https://ruby-raider.com">https://ruby-raider.com</a></p>
25
+ <p align="center"> For more information and updates on releases, see https://ruby-raider.onrender.com/</p>
26
26
  </div>
27
27
 
28
28
  ## What is Ruby Raider?
29
29
 
30
- Ruby Raider is a generator and scaffolding gem to make UI test automation easier
30
+ Ruby Raider is a CLI gem and API backend for scaffolding and generating UI test automation frameworks. It supports both interactive command-line usage and programmatic invocation via [Raider Desktop](https://ruby-raider.com).
31
31
 
32
- ### At the moment Ruby Raider supports generating the following frameworks:
32
+ ## Supported Frameworks
33
33
 
34
- | Web Testing Framework | Visual Testing Framework | Mobile Testing Framework | Accessibility Testing Framework |
35
- |-----------------------|-----------------------------------|------------------------------------|---------------------------------|
36
- | Cucumber and Selenium | Cucumber, Applitools and Selenium | Cucumber and Appium for IOS | Cucumber and Axe for web |
37
- | Rspec and Selenium | Rspec, Applitools and Selenium | Rspec and Appium for IOS | Rspec and Axe for web |
38
- | Cucumber and Watir | | Cucumber and Appium for Android | |
39
- | Rspec and Watir | | Rspec and Appium for Android | |
40
- | | | Cucumber and Appium Cross-platform | |
41
- | | | Rspec and Appium Cross-platform | |
34
+ ### Web Testing
42
35
 
43
- ***In order to run the Appium tests, download the example [app](https://github.com/saucelabs/my-demo-app-rn).***
44
- ***Remember to use the full path of the app that you download in the capabilities file and start the server using one of
45
- the commands below:***
36
+ | Test Framework | Selenium | Watir | Capybara |
37
+ |----------------|----------|-------|----------|
38
+ | RSpec | ✅ | ✅ | ✅ |
39
+ | Cucumber | ✅ | ✅ | ✅ |
40
+ | Minitest | ✅ | ✅ | ✅ |
46
41
 
47
- ```ruby
48
- raider u start_appium
49
- appium --base /wd/hub
50
- ```
42
+ ### Mobile Testing (Appium)
43
+
44
+ | Test Framework | iOS | Android | Cross-Platform |
45
+ |----------------|-----|---------|----------------|
46
+ | RSpec | ✅ | ✅ | ✅ |
47
+ | Cucumber | ✅ | ✅ | ✅ |
48
+ | Minitest | ✅ | ✅ | ✅ |
49
+
50
+ ### Optional Add-ons (Web Only)
51
51
 
52
- ***In order to run the visual tests with applitools, you need to create an account and get your api key, you can read
53
- more [here](https://applitools.com/docs/topics/overview/obtain-api-key.html#:~:text=If%20you%20already%20have%20an,Your%20key%20will%20be%20displayed.)
54
- .***
52
+ | Add-on | Flag | Description |
53
+ |--------|------|-------------|
54
+ | Accessibility | `--accessibility` | Adds axe gem + example accessibility tests |
55
+ | Visual Regression | `--visual` | Adds chunky_png + visual comparison helpers |
56
+ | Performance | `--performance` | Adds Lighthouse auditing (requires `npm install -g lighthouse`) |
55
57
 
56
- ***To use the open ai integration you need to set up the OPENAI_ACCESS_TOKEN environment variable and
57
- you can also set the optional OPENAI_ORGANIZATION_ID if you have an organization***
58
+ ### CI/CD Platforms
58
59
 
59
- This works in all the platforms (Tested on Mac OS, Linux and Windows).
60
+ Projects can be generated with built-in CI/CD pipelines for **GitHub Actions** or **GitLab CI/CD**.
60
61
 
61
- ## Getting started
62
+ ### Test Reporters
62
63
 
63
- To get the project up and running.
64
+ Choose a reporter with `--reporter`: `allure`, `junit`, `json`, `both`, `all`, or `none`.
64
65
 
65
- **Just do:**
66
+ ***The web tests run against the [Raider Test Store](https://raider-test-site.onrender.com/).***
67
+
68
+ ***To run Appium tests, download the example [app](https://github.com/RaiderHQ/raider_test_app) and start the server:***
69
+
70
+ ```bash
71
+ raider u start_appium
72
+ ```
66
73
 
67
- ```ruby
74
+ This works on all platforms (Mac OS, Linux and Windows).
75
+
76
+ ## Getting Started
77
+
78
+ Install the gem:
79
+
80
+ ```bash
68
81
  gem install ruby_raider
69
82
  ```
70
83
 
71
- **Then do:**
84
+ Create a new project interactively:
72
85
 
73
- ```ruby
74
- raider new [name_of_project]
86
+ ```bash
87
+ raider new [project_name]
75
88
  ```
76
89
 
77
- Then a TUI/CLI will appear where the configuration of which frameworks you want to be generated/scaffolded can be
78
- selected.
90
+ Or skip the menu with parameters:
79
91
 
80
- Select the ones you will like to work with.
92
+ ```bash
93
+ raider new [project_name] -p framework:rspec automation:selenium
94
+ ```
81
95
 
82
- If you already know which frameworks you want to use, you can do:
96
+ Add optional features:
83
97
 
84
- ```ruby
85
- raider new [name_of_project] -p framework:[framework] automation:[automation_type]
98
+ ```bash
99
+ raider new my_project -p framework:rspec automation:selenium --accessibility --visual --performance
86
100
  ```
87
101
 
88
- An example of the command above would be:
102
+ Skip flags for leaner projects:
89
103
 
90
- ```ruby
91
- raider new test_project -p framework:rspec automation:selenium
104
+ ```bash
105
+ raider new my_project -p framework:cucumber automation:watir --skip_ci --skip_video --reporter none
92
106
  ```
93
107
 
94
- ### Ruby raider provides the following list of basic commands
108
+ ## Commands
95
109
 
96
- ###### Anything between square brackets([...]) is where your imput goes
110
+ ###### Anything between square brackets ([...]) is where your input goes
97
111
 
98
- ```ruby
99
- Commands :
100
- raider generate # Provides access to all the scaffolding commands
101
- raider help [COMMAND] # Describe available commands or one specific command
102
- raider new [PROJECT_NAME] # Creates a new framework based on settings picked
103
- raider utility # Provides access to all the utility commands
104
- raider version # It shows the version of Ruby Raider you are currently using
105
- ```
112
+ ### Main Commands
106
113
 
107
- All the basic commands have their corresponding shortcut:
114
+ ```
115
+ raider new [PROJECT_NAME] # Create a new framework project
116
+ raider adopt # Import an existing test project
117
+ raider generate # Access scaffolding commands
118
+ raider utility # Access utility commands
119
+ raider plugin_manager # Manage plugins
120
+ raider version # Show current version
121
+ raider help [COMMAND] # Describe available commands
122
+ ```
108
123
 
109
- * g for generate
110
- * n for new
111
- * u for utility
112
- * v for version
124
+ Shortcuts: `n` (new), `a` (adopt), `g` (generate), `u` (utility), `pm` (plugin_manager), `v` (version)
113
125
 
114
126
  ### Scaffolding Commands
115
127
 
116
- Ruby Raider also supports scaffolding:
128
+ ```
129
+ raider g page [NAME] # Create a page object
130
+ raider g spec [NAME] # Create an RSpec test
131
+ raider g feature [NAME] # Create a Cucumber feature
132
+ raider g steps [NAME] # Create step definitions
133
+ raider g helper [NAME] # Create a helper class
134
+ raider g component [NAME] # Create a component class
135
+ raider g scaffold [NAME(S)] # Create page + test + steps
136
+ raider g destroy [NAME(S)] # Delete scaffolded files
137
+ raider g from_url [URL] # Generate page & spec from a live URL
138
+ ```
117
139
 
118
- * To create a new page object you do: ```raider g page [PAGE_NAME]```
119
- * To create a new spec you do: ```raider g spec [SPEC_NAME]```
120
- * To create a new feature you do: ```raider g feature [FEATURE_NAME]```
121
- * To create a new steps definition you do: ```raider g steps [STEPS_NAME]```
122
- * To create both a page/spec or a page/feature/steps you do: ```raider g scaffold [SCAFFOLD_NAME]```
140
+ Options:
123
141
 
124
- It's possible to add the option --path or p if you want to specify where to create your features, pages, helpers and
125
- specs.
142
+ * `--from [FILE]` Generate spec from an existing page object
143
+ * `--ai` — Use LLM for intelligent test scenario generation
144
+ * `--dry_run` — Preview files without creating them
145
+ * `--uses [PAGES]` — Specify page dependencies
146
+ * `--path [PATH]` — Custom output path
147
+ * `--crud` — Generate full CRUD scaffold (list, create, detail, edit + tests)
126
148
 
127
- If you want to set the default path for the creation of your features, helpers and specs:
149
+ ### Utility Commands
128
150
 
129
- ```ruby
130
- raider u path [PATH_NAME] - -feature or f
131
- raider u path [PATH_NAME] - -spec or s
132
- raider u path [PATH_NAME] - -helper or h
133
151
  ```
152
+ raider u path [PATH] # Set default paths for scaffolding
153
+ raider u url [URL] # Set default project URL
154
+ raider u browser [BROWSER] # Set default browser
155
+ raider u browser_options [OPTS] # Set browser options
156
+ raider u raid # Run all tests
157
+ raider u timeout [SECONDS] # Set test timeout
158
+ raider u viewport [DIMENSIONS] # Set viewport size (e.g., 1920x1080)
159
+ raider u platform [PLATFORM] # Set platform for cross-platform tests
160
+ raider u debug [on/off] # Toggle debug mode
161
+ raider u start_appium # Start Appium server
162
+ raider u desktop # Download Raider Desktop
163
+ raider u llm [PROVIDER] # Configure LLM provider (openai, anthropic, ollama)
164
+ ```
165
+
166
+ ### Plugin Commands
134
167
 
135
- If you don't specify an option, path will assume you want to change the default path for pages.
168
+ ```
169
+ raider pm add [NAME] # Add a plugin to your project
170
+ raider pm delete [NAME] # Remove a plugin
171
+ raider pm list # List available plugins
172
+ raider pm local # List installed plugins
173
+ ```
136
174
 
137
- ### Appium Server Command
175
+ ### Adopt Command
138
176
 
139
- To initialise Appium server run this command:
177
+ Import an existing test project into Ruby Raider conventions:
140
178
 
141
- ```ruby
142
- raider u start_appium
179
+ ```bash
180
+ raider adopt project [SOURCE_PATH]
181
+ ```
182
+
183
+ ## LLM Integration
184
+
185
+ Ruby Raider supports optional LLM-powered features for intelligent test generation. Configure a provider:
186
+
187
+ ```bash
188
+ raider u llm openai # Configure OpenAI
189
+ raider u llm anthropic # Configure Anthropic
190
+ raider u llm ollama # Configure Ollama (local, no API key needed)
191
+ ```
192
+
193
+ Then use the `--ai` flag with scaffolding commands for smarter code generation.
194
+
195
+ ## Development
196
+
197
+ ```bash
198
+ bundle install # Install dependencies
199
+ bundle exec rspec # Run all tests
200
+ bundle exec rspec --tag ~slow # Run fast tests only (skip E2E)
201
+ bundle exec rubocop # Run linter
202
+ bundle exec reek # Run code smell detection
143
203
  ```
144
204
 
145
- ### Sponsors
205
+ ## Links
146
206
 
147
- This project is tested with BrowserStack.
207
+ * [RubyGems](https://rubygems.org/gems/ruby_raider)
208
+ * [GitHub](https://github.com/RubyRaider/ruby_raider)
209
+ * [Website](https://ruby-raider.onrender.com/)
210
+ * [Community](https://gitter.im/RubyRaider/community)
data/RELEASE.md ADDED
@@ -0,0 +1,412 @@
1
+ # Release Process Documentation
2
+
3
+ ## Overview
4
+
5
+ Ruby Raider uses a **fully automated release process**. You only need to run a single command, and everything else happens automatically via GitHub Actions.
6
+
7
+ ## Prerequisites
8
+
9
+ Before releasing, ensure you have:
10
+
11
+ 1. ✅ Merged all changes to `master` branch
12
+ 2. ✅ All tests passing locally
13
+ 3. ✅ RuboCop and Reek checks passing
14
+ 4. ✅ GitHub repository configured with secrets:
15
+ - `RUBYGEMS_API_KEY` - RubyGems API key for publishing
16
+
17
+ ## One-Command Release
18
+
19
+ ```bash
20
+ # For bug fixes (1.1.4 -> 1.1.5)
21
+ bin/release patch
22
+
23
+ # For new features (1.1.4 -> 1.2.0)
24
+ bin/release minor
25
+
26
+ # For breaking changes (1.1.4 -> 2.0.0)
27
+ bin/release major
28
+ ```
29
+
30
+ That's it! Everything else is automated.
31
+
32
+ ---
33
+
34
+ ## What Happens Automatically
35
+
36
+ ### 1. Local Checks (bin/release script)
37
+
38
+ The release script will:
39
+ - ✅ Verify working directory is clean
40
+ - ✅ Confirm you're on master/main branch
41
+ - ✅ Run all unit tests
42
+ - ✅ Run integration tests
43
+ - ✅ Run RuboCop linter
44
+ - ✅ Run Reek code smell detector
45
+ - ✅ Calculate new version number
46
+ - ✅ Ask for confirmation
47
+ - ✅ Update `lib/version` file
48
+ - ✅ Create git commit with version bump
49
+ - ✅ Create git tag (e.g., `v1.2.0`)
50
+ - ✅ Push commit and tag to GitHub
51
+
52
+ **If any step fails, the release is aborted.**
53
+
54
+ ### 2. GitHub Actions Workflow (Triggered by Tag)
55
+
56
+ When the tag is pushed, the `.github/workflows/release.yml` workflow:
57
+
58
+ **Validation Phase:**
59
+ - ✅ Verifies version in `lib/version` matches tag
60
+ - ✅ Runs all tests again (unit + integration)
61
+ - ✅ Runs RuboCop
62
+ - ✅ Runs Reek
63
+
64
+ **Build Phase:**
65
+ - ✅ Builds the gem (`ruby_raider-X.Y.Z.gem`)
66
+
67
+ **Release Phase:**
68
+ - ✅ Generates changelog from git commits
69
+ - ✅ Creates GitHub Release with:
70
+ - Release notes
71
+ - Changelog
72
+ - Gem file attachment
73
+ - ✅ Publishes gem to RubyGems.org
74
+
75
+ **All of this happens automatically within 2-3 minutes.**
76
+
77
+ ---
78
+
79
+ ## Example Release Flow
80
+
81
+ ```bash
82
+ $ bin/release minor
83
+
84
+ 🧪 Running tests...
85
+ ......................................
86
+
87
+ ✓ All tests and linters passed
88
+
89
+ 📦 Release Summary
90
+ Current version: 1.1.4
91
+ New version: 1.2.0
92
+ Bump type: minor
93
+
94
+ This will:
95
+ 1. Update lib/version to 1.2.0
96
+ 2. Commit changes
97
+ 3. Create git tag v1.2.0
98
+ 4. Push to GitHub (triggers automated release)
99
+ 5. Publish gem to RubyGems (via GitHub Actions)
100
+ 6. Create GitHub release with changelog
101
+
102
+ Proceed with release? [y/N] y
103
+
104
+ 📝 Updating version to 1.2.0...
105
+ ✓ Updated lib/version
106
+
107
+ 📌 Creating commit and tag...
108
+ ✓ Created commit and tag v1.2.0
109
+
110
+ 🚀 Pushing to GitHub...
111
+ ✓ Pushed to GitHub
112
+
113
+ ============================================================
114
+ 🎉 Release 1.2.0 initiated successfully!
115
+ ============================================================
116
+
117
+ The GitHub Actions workflow is now:
118
+ 1. Running tests
119
+ 2. Building the gem
120
+ 3. Publishing to RubyGems
121
+ 4. Creating GitHub release
122
+
123
+ Monitor progress at:
124
+ https://github.com/RubyRaider/ruby_raider/actions
125
+
126
+ Release will be available at:
127
+ https://github.com/RubyRaider/ruby_raider/releases/tag/v1.2.0
128
+ https://rubygems.org/gems/ruby_raider/versions/1.2.0
129
+
130
+ ✨ Thank you for contributing to Ruby Raider!
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Semantic Versioning Guide
136
+
137
+ Ruby Raider follows [Semantic Versioning](https://semver.org/):
138
+
139
+ ### Patch Release (X.Y.Z+1)
140
+
141
+ **When:** Bug fixes, small improvements, no new features
142
+
143
+ **Examples:**
144
+ - Fix template rendering bug
145
+ - Update documentation
146
+ - Performance improvements
147
+ - Dependency updates
148
+
149
+ **Command:**
150
+ ```bash
151
+ bin/release patch # 1.1.4 -> 1.1.5
152
+ ```
153
+
154
+ ### Minor Release (X.Y+1.0)
155
+
156
+ **When:** New features, backward-compatible changes
157
+
158
+ **Examples:**
159
+ - Add new framework support
160
+ - New template system
161
+ - New CLI commands
162
+ - Enhanced functionality
163
+
164
+ **Command:**
165
+ ```bash
166
+ bin/release minor # 1.1.4 -> 1.2.0
167
+ ```
168
+
169
+ ### Major Release (X+1.0.0)
170
+
171
+ **When:** Breaking changes, major refactors
172
+
173
+ **Examples:**
174
+ - Drop Ruby 2.x support
175
+ - Change public API
176
+ - Remove deprecated features
177
+ - Architectural changes
178
+
179
+ **Command:**
180
+ ```bash
181
+ bin/release major # 1.1.4 -> 2.0.0
182
+ ```
183
+
184
+ ---
185
+
186
+ ## Monitoring the Release
187
+
188
+ ### 1. GitHub Actions Progress
189
+
190
+ Visit: https://github.com/RubyRaider/ruby_raider/actions
191
+
192
+ You'll see the "Automated Release" workflow running with steps:
193
+ - ✅ Checkout code
194
+ - ✅ Run tests
195
+ - ✅ Build gem
196
+ - ✅ Generate changelog
197
+ - ✅ Create GitHub Release
198
+ - ✅ Publish to RubyGems
199
+
200
+ **Expected duration:** 2-3 minutes
201
+
202
+ ### 2. GitHub Release
203
+
204
+ Visit: https://github.com/RubyRaider/ruby_raider/releases
205
+
206
+ You'll see the new release with:
207
+ - Version number
208
+ - Changelog (auto-generated from commits)
209
+ - Gem file download
210
+ - Installation instructions
211
+
212
+ ### 3. RubyGems.org
213
+
214
+ Visit: https://rubygems.org/gems/ruby_raider
215
+
216
+ The new version will appear within 1-2 minutes of publication.
217
+
218
+ ---
219
+
220
+ ## Troubleshooting
221
+
222
+ ### Problem: "Working directory is not clean"
223
+
224
+ **Solution:** Commit or stash your changes first
225
+ ```bash
226
+ git status
227
+ git add .
228
+ git commit -m "Your changes"
229
+ # Then try release again
230
+ ```
231
+
232
+ ### Problem: "Tests failed"
233
+
234
+ **Solution:** Fix the failing tests before releasing
235
+ ```bash
236
+ bundle exec rspec
237
+ bundle exec rubocop --auto-correct
238
+ bundle exec reek
239
+ ```
240
+
241
+ ### Problem: "Version mismatch in workflow"
242
+
243
+ **Solution:** This means `lib/version` doesn't match the tag
244
+
245
+ This should never happen if using `bin/release`, but if it does:
246
+ ```bash
247
+ # Check version
248
+ cat lib/version
249
+
250
+ # Update manually
251
+ echo "1.2.0" > lib/version
252
+ git add lib/version
253
+ git commit -m "Fix version"
254
+ git push
255
+ ```
256
+
257
+ ### Problem: "RubyGems API key not configured"
258
+
259
+ **Solution:** Add the secret in GitHub:
260
+
261
+ 1. Get your RubyGems API key:
262
+ ```bash
263
+ curl -u your-rubygems-username https://rubygems.org/api/v1/api_key.yaml
264
+ ```
265
+
266
+ 2. Add to GitHub Secrets:
267
+ - Go to: https://github.com/RubyRaider/ruby_raider/settings/secrets/actions
268
+ - Click "New repository secret"
269
+ - Name: `RUBYGEMS_API_KEY`
270
+ - Value: (paste your API key)
271
+ - Click "Add secret"
272
+
273
+ ### Problem: "Failed to push to GitHub"
274
+
275
+ **Solution:** Check your authentication
276
+ ```bash
277
+ # Test push access
278
+ git push origin master
279
+
280
+ # If using HTTPS, you may need a personal access token
281
+ # If using SSH, ensure your key is added
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Manual Release (Backup Method)
287
+
288
+ If the automated system fails, you can release manually:
289
+
290
+ ```bash
291
+ # 1. Update version
292
+ echo "1.2.0" > lib/version
293
+
294
+ # 2. Commit
295
+ git add lib/version
296
+ git commit -m "Bump version to 1.2.0"
297
+
298
+ # 3. Create tag
299
+ git tag -a v1.2.0 -m "Release version 1.2.0"
300
+
301
+ # 4. Push
302
+ git push origin master
303
+ git push origin v1.2.0
304
+
305
+ # 5. Build gem
306
+ gem build ruby_raider.gemspec
307
+
308
+ # 6. Push to RubyGems
309
+ gem push ruby_raider-1.2.0.gem
310
+
311
+ # 7. Create GitHub Release manually
312
+ # Visit: https://github.com/RubyRaider/ruby_raider/releases/new
313
+ ```
314
+
315
+ ---
316
+
317
+ ## Release Checklist
318
+
319
+ Before releasing, verify:
320
+
321
+ - [ ] All PRs merged to master
322
+ - [ ] CHANGELOG or commit messages are clear
323
+ - [ ] Tests passing locally (`bundle exec rspec`)
324
+ - [ ] RuboCop passing (`bundle exec rubocop`)
325
+ - [ ] Reek passing (`bundle exec reek`)
326
+ - [ ] Version bump type is correct (patch/minor/major)
327
+ - [ ] GitHub Actions secrets configured (RUBYGEMS_API_KEY)
328
+
329
+ Then run:
330
+
331
+ ```bash
332
+ bin/release [patch|minor|major]
333
+ ```
334
+
335
+ And monitor at:
336
+ - https://github.com/RubyRaider/ruby_raider/actions
337
+
338
+ ---
339
+
340
+ ## Post-Release
341
+
342
+ After a successful release:
343
+
344
+ 1. ✅ Verify gem on RubyGems: https://rubygems.org/gems/ruby_raider
345
+ 2. ✅ Check GitHub Release: https://github.com/RubyRaider/ruby_raider/releases
346
+ 3. ✅ Test installation:
347
+ ```bash
348
+ gem install ruby_raider -v 1.2.0
349
+ raider --version
350
+ ```
351
+ 4. ✅ Announce release (Twitter, Discord, etc.)
352
+ 5. ✅ Update website if needed
353
+
354
+ ---
355
+
356
+ ## Configuration Files
357
+
358
+ ### Release Workflow
359
+ - **File:** `.github/workflows/release.yml`
360
+ - **Trigger:** Push of tag matching `v*.*.*`
361
+ - **Actions:** Test → Build → Release → Publish
362
+
363
+ ### Release Script
364
+ - **File:** `bin/release`
365
+ - **Usage:** `bin/release [major|minor|patch]`
366
+ - **Purpose:** Local validation and version bumping
367
+
368
+ ### Version File
369
+ - **File:** `lib/version`
370
+ - **Format:** Single line with version number (no 'v' prefix)
371
+ - **Example:** `1.2.0`
372
+
373
+ ---
374
+
375
+ ## FAQ
376
+
377
+ **Q: Can I release from a branch?**
378
+ A: The script will warn you. It's recommended to release from master/main only.
379
+
380
+ **Q: Can I skip tests?**
381
+ A: No. Tests are mandatory for releases to ensure quality.
382
+
383
+ **Q: How do I rollback a release?**
384
+ A: You can't unpublish from RubyGems, but you can:
385
+ 1. Yank the version: `gem yank ruby_raider -v X.Y.Z`
386
+ 2. Release a new patch version with fixes
387
+
388
+ **Q: What if the GitHub Actions workflow fails?**
389
+ A: Check the logs, fix the issue, delete the tag, and try again:
390
+ ```bash
391
+ git tag -d v1.2.0
392
+ git push origin :refs/tags/v1.2.0
393
+ # Fix issue, then re-run bin/release
394
+ ```
395
+
396
+ **Q: How long does a release take?**
397
+ A: ~2-3 minutes from pushing the tag to gem being available on RubyGems.
398
+
399
+ ---
400
+
401
+ ## Support
402
+
403
+ If you encounter issues with the release process:
404
+
405
+ 1. Check the [troubleshooting section](#troubleshooting)
406
+ 2. Review GitHub Actions logs
407
+ 3. Open an issue: https://github.com/RubyRaider/ruby_raider/issues
408
+
409
+ ---
410
+
411
+ **Last Updated:** 2026-02-10
412
+ **Automation Version:** 1.0