ruby_raider 3.8.0 → 3.10.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/release.yml +18 -29
- data/.github/workflows/security.yml +68 -0
- data/.rubocop.yml +28 -0
- data/README.md +22 -4
- data/docs/superpowers/plans/2026-10-25-failure-video-replay.md +400 -0
- data/docs/superpowers/plans/2026-10-26-parity-cleanup.md +233 -0
- data/docs/superpowers/plans/2026-10-28-failure-card.md +295 -0
- data/docs/superpowers/specs/2026-10-25-failure-video-replay-design.md +214 -0
- data/docs/superpowers/specs/2026-10-28-failure-card-design.md +210 -0
- data/lib/commands/scaffolding_commands.rb +3 -3
- data/lib/commands/utility_commands.rb +36 -6
- data/lib/generators/cucumber/templates/cucumber.tt +1 -1
- data/lib/generators/cucumber/templates/partials/appium_env.tt +6 -0
- data/lib/generators/cucumber/templates/partials/selenium_env.tt +6 -0
- data/lib/generators/cucumber/templates/partials/watir_env.tt +6 -0
- data/lib/generators/helper_generator.rb +5 -1
- data/lib/generators/infrastructure/azure_generator.rb +1 -0
- data/lib/generators/infrastructure/github_generator.rb +1 -0
- data/lib/generators/infrastructure/templates/azure_pipelines.tt +26 -2
- data/lib/generators/infrastructure/templates/github.tt +31 -1
- data/lib/generators/infrastructure/templates/github_appium.tt +50 -1
- data/lib/generators/invoke_generators.rb +20 -2
- data/lib/generators/rspec/rspec_generator.rb +0 -1
- data/lib/generators/templates/common/gemfile.tt +1 -1
- data/lib/generators/templates/common/git_ignore.tt +3 -0
- data/lib/generators/templates/common/partials/mobile_config.tt +5 -0
- data/lib/generators/templates/common/partials/web_config.tt +6 -1
- data/lib/generators/templates/common/read_me.tt +80 -2
- data/lib/generators/templates/helpers/browser_helper.tt +5 -1
- data/lib/generators/templates/helpers/driver_helper.tt +1 -0
- data/lib/generators/templates/helpers/partials/selenium_driver.tt +4 -1
- data/lib/generators/templates/helpers/spec_helper.tt +8 -0
- data/lib/generators/templates/helpers/video_helper.tt +338 -171
- data/lib/ruby_raider/ffmpeg.rb +280 -0
- data/lib/ruby_raider.rb +2 -3
- data/lib/scaffolding/project_detector.rb +1 -3
- data/lib/scaffolding/scaffolding.rb +0 -1
- data/lib/utilities/utilities.rb +15 -2
- data/lib/version +1 -1
- data/ruby_raider.gemspec +3 -1
- data/sig/commands/utility_commands.rbs +4 -1
- data/sig/generators/invoke_generators.rbs +2 -3
- data/sig/ruby_raider/ffmpeg.rbs +23 -0
- data/sig/utilities/utilities.rbs +1 -0
- data/spec/commands/raider_commands_spec.rb +56 -1
- data/spec/generators/fixtures/video_helper_stubs/selenium-webdriver.rb +28 -0
- data/spec/generators/video_helper_spec.rb +608 -0
- data/spec/integration/commands/browser_update_after_creation_spec.rb +7 -6
- data/spec/integration/commands/utility_commands_spec.rb +2 -2
- data/spec/integration/content/azure_content_spec.rb +48 -3
- data/spec/integration/content/ci_content_spec.rb +115 -5
- data/spec/integration/content/common_content_spec.rb +8 -0
- data/spec/integration/content/config_content_spec.rb +14 -0
- data/spec/integration/content/cucumber_reporter_content_spec.rb +22 -1
- data/spec/integration/content/gemfile_content_spec.rb +2 -3
- data/spec/integration/content/helper_content_spec.rb +146 -0
- data/spec/integration/content/page_content_spec.rb +0 -1
- data/spec/integration/content/readme_content_spec.rb +65 -0
- data/spec/integration/content/rspec_reporter_content_spec.rb +2 -2
- data/spec/integration/content/test_content_spec.rb +2 -3
- data/spec/integration/end_to_end_features_spec.rb +0 -2
- data/spec/integration/end_to_end_spec.rb +252 -26
- data/spec/integration/generators/azure_generator_spec.rb +7 -6
- data/spec/integration/generators/common_generator_spec.rb +1 -1
- data/spec/integration/generators/invoke_generators_spec.rb +52 -0
- data/spec/integration/scaffolding_e2e_spec.rb +13 -24
- data/spec/scaffolding/scaffold_project_detector_spec.rb +0 -1
- data/spec/scaffolding/scaffolding_features_spec.rb +0 -1
- data/spec/system/selenium_spec.rb +0 -1
- data/spec/system/watir_spec.rb +0 -1
- data/spec/utilities/ffmpeg_spec.rb +424 -0
- data/spec/utilities/utilities_spec.rb +19 -2
- data/spec/utilities/video_command_spec.rb +120 -0
- metadata +49 -11
- data/lib/commands/adopt_commands.rb +0 -42
- data/lib/commands/loaded_commands.rb +0 -9
- data/lib/commands/plugin_commands.rb +0 -32
- data/sig/commands/adopt_commands.rbs +0 -8
- data/sig/commands/loaded_commands.rbs +0 -5
- data/sig/commands/plugin_commands.rbs +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a901c209fc30681088e9acb4d7c5fb315990db7346128a63533e0e70ef8c58f
|
|
4
|
+
data.tar.gz: 1e99b0e973091657bfc10b98d5de1b730d9f7972a2446c56b7a56ddd786f9392
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 757ad8b61b6c3605d17739690e895198f2ad4c0aadbe4144fc1df77ec743afefd8095472c07e4d2ba4246c515d8038c052d096badc8cfbb04c432218c68ddb45
|
|
7
|
+
data.tar.gz: 2e9d2bfb4e714c98052cb6df654be058d37fe40476aa93ce20e9319aeea5bbc24abe4359299b7a9f71f0c204ad19599865f1396794393e634b7200ed29a80bdb
|
|
@@ -23,18 +23,10 @@ jobs:
|
|
|
23
23
|
url: https://rubygems.org/gems/ruby_raider
|
|
24
24
|
|
|
25
25
|
steps:
|
|
26
|
-
- name: Generate release token
|
|
27
|
-
id: app-token
|
|
28
|
-
uses: actions/create-github-app-token@v1
|
|
29
|
-
with:
|
|
30
|
-
app-id: ${{ secrets.APP_ID }}
|
|
31
|
-
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
32
|
-
|
|
33
26
|
- name: Checkout code
|
|
34
27
|
uses: actions/checkout@v4
|
|
35
28
|
with:
|
|
36
29
|
fetch-depth: 0
|
|
37
|
-
token: ${{ steps.app-token.outputs.token }}
|
|
38
30
|
|
|
39
31
|
- name: Set up Ruby
|
|
40
32
|
uses: ruby/setup-ruby@v1
|
|
@@ -42,29 +34,20 @@ jobs:
|
|
|
42
34
|
ruby-version: '3.3'
|
|
43
35
|
bundler-cache: true
|
|
44
36
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
49
|
-
|
|
50
|
-
- name: Update version file
|
|
37
|
+
# master is protected, so the workflow does not push a version bump: bump lib/version in a PR,
|
|
38
|
+
# merge it, then run this workflow with the same version.
|
|
39
|
+
- name: Check version file
|
|
51
40
|
id: version
|
|
41
|
+
env:
|
|
42
|
+
VERSION: ${{ github.event.inputs.version }}
|
|
52
43
|
run: |
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- name: Commit and push version bump
|
|
59
|
-
run: |
|
|
60
|
-
VERSION="${{ steps.version.outputs.version }}"
|
|
61
|
-
git add lib/version
|
|
62
|
-
if git diff --cached --quiet; then
|
|
63
|
-
echo "Version already up to date"
|
|
64
|
-
else
|
|
65
|
-
git commit -m "Bump version to ${VERSION}"
|
|
66
|
-
git push origin HEAD
|
|
44
|
+
CURRENT="$(tr -d '[:space:]' < lib/version)"
|
|
45
|
+
if [ "$CURRENT" != "$VERSION" ]; then
|
|
46
|
+
echo "::error::lib/version is $CURRENT but $VERSION was requested. Bump lib/version to $VERSION in a PR, merge it, then run this workflow again."
|
|
47
|
+
exit 1
|
|
67
48
|
fi
|
|
49
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
50
|
+
echo "Releasing version: $VERSION"
|
|
68
51
|
|
|
69
52
|
- name: Install dependencies
|
|
70
53
|
run: bundle install
|
|
@@ -170,6 +153,12 @@ jobs:
|
|
|
170
153
|
echo "Could not check RubyGems (HTTP $HTTP_CODE) — will attempt push"
|
|
171
154
|
fi
|
|
172
155
|
|
|
156
|
+
# The Rakefile has no bundler/gem_tasks, so rubygems/release-gem (which runs `rake release`)
|
|
157
|
+
# cannot be used; push the gem built above with trusted-publishing (OIDC) credentials instead.
|
|
158
|
+
- name: Configure RubyGems credentials (trusted publishing)
|
|
159
|
+
if: steps.check_gem.outputs.published == 'false'
|
|
160
|
+
uses: rubygems/configure-rubygems-credentials@v2.1.0
|
|
161
|
+
|
|
173
162
|
- name: Push gem to RubyGems
|
|
174
163
|
if: steps.check_gem.outputs.published == 'false'
|
|
175
|
-
|
|
164
|
+
run: gem push "${{ steps.build.outputs.gem_file }}"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Security
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '0 6 * * 1' # Mondays 06:00 UTC
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
bundler-audit:
|
|
15
|
+
name: bundler-audit
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Ruby
|
|
22
|
+
uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: '3.4'
|
|
25
|
+
bundler-cache: true
|
|
26
|
+
|
|
27
|
+
- name: Check gems for known vulnerabilities
|
|
28
|
+
run: bundle exec bundler-audit check --update
|
|
29
|
+
|
|
30
|
+
ruby-audit:
|
|
31
|
+
name: ruby-audit
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout repository
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
|
|
37
|
+
- name: Set up Ruby
|
|
38
|
+
uses: ruby/setup-ruby@v1
|
|
39
|
+
with:
|
|
40
|
+
ruby-version: '3.4'
|
|
41
|
+
bundler-cache: true
|
|
42
|
+
|
|
43
|
+
- name: Check Ruby and RubyGems for known vulnerabilities
|
|
44
|
+
run: bundle exec ruby-audit check
|
|
45
|
+
|
|
46
|
+
osv-scanner:
|
|
47
|
+
name: osv-scanner
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- name: Checkout repository
|
|
51
|
+
uses: actions/checkout@v4
|
|
52
|
+
|
|
53
|
+
# Gemfile.lock is gitignored in this repo, so generate it for the scanner
|
|
54
|
+
- name: Set up Ruby
|
|
55
|
+
uses: ruby/setup-ruby@v1
|
|
56
|
+
with:
|
|
57
|
+
ruby-version: '3.4'
|
|
58
|
+
|
|
59
|
+
- name: Generate Gemfile.lock
|
|
60
|
+
run: bundle lock
|
|
61
|
+
|
|
62
|
+
- name: Scan with OSV-Scanner
|
|
63
|
+
uses: google/osv-scanner-action/osv-scanner-action@v2.7.0
|
|
64
|
+
with:
|
|
65
|
+
scan-args: |-
|
|
66
|
+
--recursive
|
|
67
|
+
--no-ignore
|
|
68
|
+
./
|
data/.rubocop.yml
CHANGED
|
@@ -60,11 +60,39 @@ Naming/AccessorMethodName:
|
|
|
60
60
|
# Migration
|
|
61
61
|
|
|
62
62
|
# Naming
|
|
63
|
+
# Stands in for the selenium-webdriver gem, so it keeps the gem's require name.
|
|
64
|
+
Naming/FileName:
|
|
65
|
+
Exclude:
|
|
66
|
+
- 'spec/generators/fixtures/video_helper_stubs/selenium-webdriver.rb'
|
|
67
|
+
|
|
63
68
|
Naming/PredicateName:
|
|
64
69
|
ForbiddenPrefixes:
|
|
65
70
|
- 'is_'
|
|
66
71
|
|
|
67
72
|
# Security
|
|
73
|
+
Security:
|
|
74
|
+
Enabled: true
|
|
75
|
+
|
|
76
|
+
Security/CompoundHash:
|
|
77
|
+
Enabled: true
|
|
78
|
+
|
|
79
|
+
Security/Eval:
|
|
80
|
+
Enabled: true
|
|
81
|
+
|
|
82
|
+
Security/IoMethods:
|
|
83
|
+
Enabled: true
|
|
84
|
+
|
|
85
|
+
Security/JSONLoad:
|
|
86
|
+
Enabled: true
|
|
87
|
+
|
|
88
|
+
Security/MarshalLoad:
|
|
89
|
+
Enabled: true
|
|
90
|
+
|
|
91
|
+
Security/Open:
|
|
92
|
+
Enabled: true
|
|
93
|
+
|
|
94
|
+
Security/YAMLLoad:
|
|
95
|
+
Enabled: true
|
|
68
96
|
|
|
69
97
|
# Styles
|
|
70
98
|
|
data/README.md
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
## What is Ruby Raider?
|
|
29
29
|
|
|
30
|
-
Ruby Raider is a CLI gem
|
|
30
|
+
Ruby Raider is a CLI gem for scaffolding and generating UI test automation frameworks. It supports interactive command-line usage and flag-driven invocation (for example `raider new my_project -p framework:rspec automation:selenium`), which is how [Raider Desktop](https://ruby-raider.com) drives it.
|
|
31
31
|
|
|
32
32
|
## Supported Frameworks
|
|
33
33
|
|
|
@@ -60,15 +60,22 @@ Every generated project comes with:
|
|
|
60
60
|
|
|
61
61
|
- **Page Object Model** — Base page and component classes with example pages
|
|
62
62
|
- **Test examples** — Working login tests against the [Raider Test Store](https://raider-test-site.onrender.com/)
|
|
63
|
-
- **Raider reporting** — RSpec and Cucumber projects include [raider_reporter](https://github.com/RaiderHQ/raider_reporter), which writes results to `raider-results/` and uploads runs when `RAIDER_TOKEN` and `RAIDER_ENDPOINT` are set; generated CI runs the suite through `raider-reporter exec` with `RAIDER_QUARANTINE`, so quarantined tests do not fail the build
|
|
64
|
-
- **
|
|
63
|
+
- **Raider reporting** — RSpec and Cucumber projects include [raider_reporter](https://github.com/RaiderHQ/raider_reporter), which writes results to `raider-results/` and uploads runs to your Raider Hideout server when `RAIDER_TOKEN` and `RAIDER_ENDPOINT` are set; generated CI runs the suite through `raider-reporter exec` with `RAIDER_QUARANTINE`, so quarantined tests do not fail the build; an opt-in `raider-gate` job (`RAIDER_GATE=1`) fails CI when the Raider quality gate fails
|
|
64
|
+
- **Failure video replay** — Every test is recorded and the video is kept only for failing tests, attached to the report as `video` (WebM from page screenshots for Selenium and Watir, Appium's own MP4 for mobile, which needs `ffmpeg` on the Appium server host for iOS and for Android recordings over 180 s). Turn it off per run with `VIDEO=off`, or per project with `raider u video off`; ffmpeg is downloaded once, SHA-256 checked and cached in `~/.cache/raider`. The RaiderHQ `ffmpeg-7.1` build that the download uses is not published yet, so for now set `RAIDER_FFMPEG_PATH` to an ffmpeg with libvpx to get web videos
|
|
65
|
+
- **GitHub Actions CI** — Ready-to-use test pipeline that caches ffmpeg for failure videos
|
|
65
66
|
- **Rake tasks** — Default, smoke, and regression tasks with tag-based filtering
|
|
66
67
|
- **Retry support** — RSpec retry with configurable retry count via `RETRY_COUNT` env var
|
|
67
|
-
- **Re-run failed tests** —
|
|
68
|
+
- **Re-run failed tests** — RSpec keeps `spec/examples.txt` for `--only-failures`; Cucumber projects write failed scenarios to `rerun.txt`
|
|
68
69
|
- **Parallel execution** — parallel_tests and parallel_split_test gems included
|
|
69
70
|
- **Configurable browser** — Chrome/Firefox with customizable arguments, viewport, timeout, and headless mode
|
|
70
71
|
- **Linting** — RuboCop and Reek configs included
|
|
71
72
|
|
|
73
|
+
> **Upgrading from 3.9 or earlier:** existing projects are not changed automatically. To get failure videos, generate a
|
|
74
|
+
> new project with the same options and copy `helpers/video_helper.rb`, the video lines in `helpers/spec_helper.rb`
|
|
75
|
+
> (RSpec) or `features/support/env.rb` (Cucumber), the `listener:` in the driver or browser helper, the `video:` block
|
|
76
|
+
> in `config/config.yml`, and the ffmpeg cache and install steps in your CI pipeline. raider_reporter 0.10 or later
|
|
77
|
+
> adds the inline video player in `raider-results/index.html` and a larger size limit for video attachments.
|
|
78
|
+
|
|
72
79
|
For Appium projects, download the example [app](https://github.com/RaiderHQ/raider_test_app) and start the server:
|
|
73
80
|
|
|
74
81
|
```bash
|
|
@@ -156,6 +163,7 @@ raider u viewport [DIMENSIONS] # Set viewport size (e.g., 1920x1080)
|
|
|
156
163
|
raider u platform [PLATFORM] # Set platform for cross-platform tests
|
|
157
164
|
raider u start_appium # Start Appium server
|
|
158
165
|
raider u desktop # Download Raider Desktop
|
|
166
|
+
raider u video [ACTION] # Failure videos: install (ffmpeg), status, on, off
|
|
159
167
|
```
|
|
160
168
|
|
|
161
169
|
## Development
|
|
@@ -168,6 +176,16 @@ bundle exec rubocop # Run linter
|
|
|
168
176
|
bundle exec reek # Run code smell detection
|
|
169
177
|
```
|
|
170
178
|
|
|
179
|
+
### Security checks
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
bundle exec bundler-audit check --update # Check gems for known vulnerabilities
|
|
183
|
+
bundle exec ruby-audit check # Check Ruby and RubyGems versions for known vulnerabilities
|
|
184
|
+
bundle exec rubocop --only Security # Run RuboCop's Security cops
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The same checks (plus OSV-Scanner) run in CI via `.github/workflows/security.yml`.
|
|
188
|
+
|
|
171
189
|
## Links
|
|
172
190
|
|
|
173
191
|
* [RubyGems](https://rubygems.org/gems/ruby_raider)
|