react_on_rails 16.2.0.beta.3 → 16.2.0.beta.8
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/CHANGELOG.md +42 -5
- data/CLAUDE.md +59 -0
- data/CONTRIBUTING.md +49 -1
- data/Gemfile.development_dependencies +1 -1
- data/Gemfile.lock +25 -10
- data/SWITCHING_CI_CONFIGS.md +55 -6
- data/Steepfile +51 -0
- data/bin/ci-rerun-failures +68 -22
- data/bin/ci-run-failed-specs +26 -2
- data/bin/ci-switch-config +262 -34
- data/bin/lefthook/check-trailing-newlines +2 -12
- data/bin/lefthook/eslint-lint +0 -10
- data/bin/lefthook/prettier-format +0 -10
- data/bin/lefthook/ruby-autofix +3 -6
- data/knip.ts +35 -9
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt +32 -52
- data/lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml +5 -1
- data/lib/react_on_rails/configuration.rb +56 -12
- data/lib/react_on_rails/controller.rb +3 -3
- data/lib/react_on_rails/dev/server_manager.rb +11 -4
- data/lib/react_on_rails/doctor.rb +249 -2
- data/lib/react_on_rails/helper.rb +12 -3
- data/lib/react_on_rails/pro_helper.rb +2 -44
- data/lib/react_on_rails/react_component/render_options.rb +7 -7
- data/lib/react_on_rails/utils.rb +40 -0
- data/lib/react_on_rails/version.rb +1 -1
- data/react_on_rails_pro/CHANGELOG.md +142 -29
- data/react_on_rails_pro/CONTRIBUTING.md +2 -13
- data/react_on_rails_pro/Gemfile.development_dependencies +1 -0
- data/react_on_rails_pro/Gemfile.lock +24 -3
- data/react_on_rails_pro/README.md +559 -38
- data/react_on_rails_pro/docs/code-splitting-loadable-components.md +1 -1
- data/react_on_rails_pro/docs/contributors-info/releasing.md +2 -2
- data/react_on_rails_pro/docs/installation.md +129 -109
- data/react_on_rails_pro/docs/node-renderer/basics.md +29 -22
- data/react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md +8 -8
- data/react_on_rails_pro/docs/node-renderer/js-configuration.md +25 -23
- data/react_on_rails_pro/docs/node-renderer/troubleshooting.md +2 -0
- data/react_on_rails_pro/docs/updating.md +209 -15
- data/react_on_rails_pro/lib/react_on_rails_pro/concerns/stream.rb +58 -4
- data/react_on_rails_pro/lib/react_on_rails_pro/configuration.rb +17 -3
- data/react_on_rails_pro/lib/react_on_rails_pro/license_public_key.rb +9 -9
- data/react_on_rails_pro/lib/react_on_rails_pro/request.rb +41 -25
- data/react_on_rails_pro/lib/react_on_rails_pro/stream_request.rb +27 -7
- data/react_on_rails_pro/lib/react_on_rails_pro/utils.rb +3 -3
- data/react_on_rails_pro/lib/react_on_rails_pro/version.rb +1 -1
- data/react_on_rails_pro/package-scripts.yml +1 -1
- data/react_on_rails_pro/package.json +5 -8
- data/react_on_rails_pro/packages/node-renderer/src/integrations/api.ts +1 -1
- data/react_on_rails_pro/packages/node-renderer/src/master/restartWorkers.ts +39 -17
- data/react_on_rails_pro/packages/node-renderer/src/master.ts +15 -4
- data/react_on_rails_pro/packages/node-renderer/src/shared/configBuilder.ts +44 -5
- data/react_on_rails_pro/packages/node-renderer/src/shared/utils.ts +4 -2
- data/react_on_rails_pro/packages/node-renderer/src/worker/handleGracefulShutdown.ts +49 -0
- data/react_on_rails_pro/packages/node-renderer/src/worker/vm.ts +3 -3
- data/react_on_rails_pro/packages/node-renderer/src/worker.ts +5 -2
- data/react_on_rails_pro/packages/node-renderer/tests/helper.ts +8 -8
- data/react_on_rails_pro/packages/node-renderer/tests/testingNodeRendererConfigs.js +1 -1
- data/react_on_rails_pro/packages/node-renderer/tests/worker.test.ts +19 -19
- data/react_on_rails_pro/rakelib/public_key_management.rake +6 -5
- data/react_on_rails_pro/rakelib/rbs.rake +47 -0
- data/react_on_rails_pro/react_on_rails_pro.gemspec +1 -0
- data/react_on_rails_pro/sig/react_on_rails_pro/cache.rbs +13 -0
- data/react_on_rails_pro/sig/react_on_rails_pro/configuration.rbs +100 -0
- data/react_on_rails_pro/sig/react_on_rails_pro/error.rbs +4 -0
- data/react_on_rails_pro/sig/react_on_rails_pro/utils.rbs +7 -0
- data/react_on_rails_pro/sig/react_on_rails_pro.rbs +5 -0
- data/react_on_rails_pro/spec/dummy/Gemfile.lock +23 -3
- data/react_on_rails_pro/spec/dummy/app/controllers/pages_controller.rb +3 -3
- data/react_on_rails_pro/spec/dummy/bin/dev +4 -8
- data/react_on_rails_pro/spec/dummy/client/node-renderer.js +4 -4
- data/react_on_rails_pro/spec/dummy/config/environments/production.rb +1 -1
- data/react_on_rails_pro/spec/dummy/config/initializers/react_on_rails.rb +28 -12
- data/react_on_rails_pro/spec/dummy/config.ru +1 -1
- data/react_on_rails_pro/spec/dummy/package.json +2 -2
- data/react_on_rails_pro/spec/dummy/spec/helpers/react_on_rails_pro_helper_spec.rb +40 -11
- data/react_on_rails_pro/spec/dummy/spec/rails_helper.rb +1 -1
- data/react_on_rails_pro/spec/dummy/spec/requests/renderer_console_logging_spec.rb +5 -5
- data/react_on_rails_pro/spec/dummy/spec/system/integration_spec.rb +15 -10
- data/react_on_rails_pro/spec/dummy/spec/system/renderer_integration_spec.rb +3 -3
- data/react_on_rails_pro/spec/dummy/yarn.lock +4 -4
- data/react_on_rails_pro/spec/execjs-compatible-dummy/config/environments/production.rb +1 -1
- data/react_on_rails_pro/spec/execjs-compatible-dummy/config/initializers/react_on_rails.rb +16 -43
- data/react_on_rails_pro/spec/react_on_rails_pro/assets_precompile_spec.rb +15 -18
- data/react_on_rails_pro/spec/react_on_rails_pro/cache_spec.rb +1 -1
- data/react_on_rails_pro/spec/react_on_rails_pro/configuration_spec.rb +5 -3
- data/react_on_rails_pro/spec/react_on_rails_pro/license_validator_spec.rb +27 -12
- data/react_on_rails_pro/spec/react_on_rails_pro/request_spec.rb +0 -27
- data/react_on_rails_pro/spec/react_on_rails_pro/spec_helper.rb +1 -1
- data/react_on_rails_pro/spec/react_on_rails_pro/stream_decorator_spec.rb +89 -0
- data/react_on_rails_pro/spec/react_on_rails_pro/stream_spec.rb +144 -0
- data/react_on_rails_pro/spec/react_on_rails_pro/support/caching.rb +1 -1
- data/react_on_rails_pro/spec/react_on_rails_pro/support/mock_block_helper.rb +4 -2
- data/sig/react_on_rails/controller.rbs +1 -1
- data/sig/react_on_rails/error.rbs +4 -0
- data/sig/react_on_rails/helper.rbs +2 -2
- data/sig/react_on_rails/json_parse_error.rbs +10 -0
- data/sig/react_on_rails/prerender_error.rbs +21 -0
- data/sig/react_on_rails/smart_error.rbs +28 -0
- data/sig/react_on_rails.rbs +3 -24
- metadata +14 -4
- data/lib/react_on_rails/pro_utils.rb +0 -37
- data/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/TestingStreamableComponent.jsx +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2d569c0148019a12155710806cbd6f3d94f6641ffd074099dc9b4255b0202d6
|
|
4
|
+
data.tar.gz: 8abd5fedee13d2d2d1bfa6fc6a03e8a6d11710ece7fb84b26fb3afc387156d75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22ef214ab6d5c12257a9ebc3fbf01c56c4211405ac4398628b1d69813d236d39dfe02d48168d4fabb0a0eb5d54ce624fb37790776952e4300547e502170432a4
|
|
7
|
+
data.tar.gz: e1fdf86179a42c10af444265839d2e95fe15b3771f0606038ce1c01611efcd96c03d34c1e94682b718b6011c6f0d9c049b59b1713bdb75fa942a23e08e0c60b2
|
data/CHANGELOG.md
CHANGED
|
@@ -23,6 +23,18 @@ After a release, please make sure to run `bundle exec rake update_changelog`. Th
|
|
|
23
23
|
|
|
24
24
|
Changes since the last non-beta release.
|
|
25
25
|
|
|
26
|
+
#### Changed
|
|
27
|
+
|
|
28
|
+
- **Generator Configuration Modernization**: Updated the generator to enable recommended configurations by default for new applications:
|
|
29
|
+
|
|
30
|
+
- `config.build_test_command` is now uncommented and set to `"RAILS_ENV=test bin/shakapacker"` by default, enabling automatic asset building during tests for better integration test reliability
|
|
31
|
+
- `config.auto_load_bundle = true` is now set by default, enabling automatic loading of component bundles
|
|
32
|
+
- `config.components_subdirectory = "ror_components"` is now set by default, organizing React components in a dedicated subdirectory
|
|
33
|
+
|
|
34
|
+
**Note:** These changes only affect newly generated applications. Existing applications are unaffected and do not need to make any changes. If you want to adopt these settings in an existing app, you can manually add them to your `config/initializers/react_on_rails.rb` file. [PR 2039](https://github.com/shakacode/react_on_rails/pull/2039) by [justin808](https://github.com/justin808).
|
|
35
|
+
|
|
36
|
+
### [16.2.0.beta.4] - 2025-11-12
|
|
37
|
+
|
|
26
38
|
#### Added
|
|
27
39
|
|
|
28
40
|
- **Rspack Support**: Added `--rspack` flag to `react_on_rails:install` generator for significantly faster builds (~20x improvement with SWC). Includes unified webpack/rspack configuration templates and `bin/switch-bundler` utility to switch between bundlers post-installation. [PR #1852](https://github.com/shakacode/react_on_rails/pull/1852) by [justin808](https://github.com/justin808).
|
|
@@ -35,6 +47,8 @@ Changes since the last non-beta release.
|
|
|
35
47
|
|
|
36
48
|
- **Improved RSC Payload Error Handling**: Errors that happen during generation of RSC payload are transferred properly to rails side and logs the error message and stack. [PR #1888](https://github.com/shakacode/react_on_rails/pull/1888) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
|
|
37
49
|
|
|
50
|
+
- **Use as Git dependency**: All packages can now be installed as Git dependencies. This is useful for development and testing purposes. See [CONTRIBUTING.md](./CONTRIBUTING.md#git-dependencies) for documentation. [PR #1873](https://github.com/shakacode/react_on_rails/pull/1873) by [alexeyr-ci2](https://github.com/alexeyr-ci2).
|
|
51
|
+
|
|
38
52
|
#### Changed
|
|
39
53
|
|
|
40
54
|
- **Shakapacker 9.0.0 Upgrade**: Upgraded Shakapacker from 8.2.0 to 9.0.0 with Babel transpiler configuration for compatibility. Key changes include:
|
|
@@ -45,16 +59,38 @@ Changes since the last non-beta release.
|
|
|
45
59
|
- Fixed webpack configuration to process SCSS rules and CSS loaders in a single pass for better performance
|
|
46
60
|
[PR 1904](https://github.com/shakacode/react_on_rails/pull/1904) by [justin808](https://github.com/justin808).
|
|
47
61
|
|
|
48
|
-
-
|
|
62
|
+
- **`immediate_hydration` now automatically enabled for Pro users**: The `config.immediate_hydration` configuration option has been removed. Immediate hydration is now automatically enabled for React on Rails Pro users and disabled for non-Pro users, simplifying configuration while providing optimal performance by default. Component-level overrides are still supported via the `immediate_hydration` parameter on `react_component`, `redux_store`, and `stream_react_component` helpers. [PR 1997](https://github.com/shakacode/react_on_rails/pull/1997) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
|
|
49
63
|
|
|
50
|
-
-
|
|
64
|
+
- **`generated_component_packs_loading_strategy` now defaults based on Pro license**: When using Shakapacker >= 8.2.0, the default loading strategy is now `:async` for Pro users and `:defer` for non-Pro users. This provides optimal performance for Pro users while maintaining compatibility for non-Pro users. You can still explicitly set the strategy in your configuration. [PR #1993](https://github.com/shakacode/react_on_rails/pull/1993) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
|
|
51
65
|
|
|
52
|
-
####
|
|
66
|
+
#### Documentation
|
|
53
67
|
|
|
54
|
-
- **
|
|
68
|
+
- **Simplified Configuration Files**: Improved configuration documentation and generator template for better clarity and usability. Reduced generator template from 67 to 42 lines (37% reduction). Added comprehensive testing configuration guide. Reorganized configuration docs into Essential vs Advanced sections. Enhanced Doctor program with diagnostics for server rendering and test compilation consistency. [PR #2011](https://github.com/shakacode/react_on_rails/pull/2011) by [justin808](https://github.com/justin808).
|
|
69
|
+
|
|
70
|
+
#### Deprecated
|
|
71
|
+
|
|
72
|
+
- **Node Renderer Configuration**: Renamed `bundlePath` configuration option to `serverBundleCachePath` in the node renderer to better describe its purpose and avoid confusion with Shakapacker's public bundle path. The old `bundlePath` option continues to work with deprecation warnings. Both `RENDERER_SERVER_BUNDLE_CACHE_PATH` (new) and `RENDERER_BUNDLE_PATH` (deprecated) environment variables are supported. [PR #2008](https://github.com/shakacode/react_on_rails/pull/2008) by [justin808](https://github.com/justin808).
|
|
73
|
+
|
|
74
|
+
#### Fixed
|
|
75
|
+
|
|
76
|
+
- **Node Renderer Worker Restart**: Fixed "descriptor closed" error that occurred when the node renderer restarts while handling an in-progress request (especially streaming requests). Workers now perform graceful shutdowns: they disconnect from the cluster to stop receiving new requests, wait for active requests to complete, then shut down cleanly. A configurable `gracefulWorkerRestartTimeout` ensures workers are forcibly killed if they don't shut down in time. [PR 1970](https://github.com/shakacode/react_on_rails/pull/1970) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
|
|
77
|
+
|
|
78
|
+
- **Body Duplication Bug On Streaming**: Fixed a bug that happens while streaming if the node renderer connection closed after streaming some chunks to the client. [PR #1995](https://github.com/shakacode/react_on_rails/pull/1995) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
|
|
55
79
|
|
|
56
80
|
#### Breaking Changes
|
|
57
81
|
|
|
82
|
+
- **`config.immediate_hydration` configuration removed**: The `config.immediate_hydration` setting in `config/initializers/react_on_rails.rb` has been removed. Immediate hydration is now automatically enabled for React on Rails Pro users and automatically disabled for non-Pro users.
|
|
83
|
+
|
|
84
|
+
**Migration steps:**
|
|
85
|
+
|
|
86
|
+
- Remove any `config.immediate_hydration = true` or `config.immediate_hydration = false` lines from your `config/initializers/react_on_rails.rb` file
|
|
87
|
+
- Pro users: No action needed - immediate hydration is now enabled automatically for optimal performance
|
|
88
|
+
- Non-Pro users: No action needed - standard hydration behavior continues to work as before
|
|
89
|
+
- Component-level overrides: You can still override behavior per-component using `react_component("MyComponent", immediate_hydration: false)` or `redux_store("MyStore", immediate_hydration: true)`
|
|
90
|
+
- If a non-Pro user explicitly sets `immediate_hydration: true` on a component or store, a warning will be logged and it will be enforced to fall back to standard hydration (the value will be overridden to `false`)
|
|
91
|
+
|
|
92
|
+
[PR 1997](https://github.com/shakacode/react_on_rails/pull/1997) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
|
|
93
|
+
|
|
58
94
|
- **React on Rails Core Package**: Several Pro-only methods have been removed from the core package and are now exclusively available in the `react-on-rails-pro` package. If you're using any of the following methods, you'll need to migrate to React on Rails Pro:
|
|
59
95
|
- `getOrWaitForComponent()`
|
|
60
96
|
- `getOrWaitForStore()`
|
|
@@ -1801,7 +1837,8 @@ such as:
|
|
|
1801
1837
|
|
|
1802
1838
|
- Fix several generator-related issues.
|
|
1803
1839
|
|
|
1804
|
-
[unreleased]: https://github.com/shakacode/react_on_rails/compare/16.
|
|
1840
|
+
[unreleased]: https://github.com/shakacode/react_on_rails/compare/16.2.0.beta.4...master
|
|
1841
|
+
[16.2.0.beta.4]: https://github.com/shakacode/react_on_rails/compare/16.1.1...16.2.0.beta.4
|
|
1805
1842
|
[16.1.1]: https://github.com/shakacode/react_on_rails/compare/16.1.0...16.1.1
|
|
1806
1843
|
[16.1.0]: https://github.com/shakacode/react_on_rails/compare/16.0.0...16.1.0
|
|
1807
1844
|
[16.0.0]: https://github.com/shakacode/react_on_rails/compare/14.2.0...16.0.0
|
data/CLAUDE.md
CHANGED
|
@@ -45,6 +45,11 @@ Pre-commit hooks automatically run:
|
|
|
45
45
|
- Check formatting without fixing: `yarn start format.listDifferent`
|
|
46
46
|
- **Build**: `yarn run build` (compiles TypeScript to JavaScript in packages/react-on-rails/lib)
|
|
47
47
|
- **Type checking**: `yarn run type-check`
|
|
48
|
+
- **RBS Type Checking**:
|
|
49
|
+
- Validate RBS signatures: `bundle exec rake rbs:validate`
|
|
50
|
+
- Run Steep type checker: `bundle exec rake rbs:steep`
|
|
51
|
+
- Run both: `bundle exec rake rbs:all`
|
|
52
|
+
- List RBS files: `bundle exec rake rbs:list`
|
|
48
53
|
- **⚠️ MANDATORY BEFORE GIT PUSH**: `bundle exec rubocop` and fix ALL violations + ensure trailing newlines
|
|
49
54
|
- Never run `npm` commands, only equivalent Yarn Classic ones
|
|
50
55
|
|
|
@@ -117,6 +122,60 @@ This script:
|
|
|
117
122
|
- 🔄 **Deduplicates** - removes duplicate specs
|
|
118
123
|
- 📁 **Auto-detects directory** - runs from spec/dummy when needed
|
|
119
124
|
|
|
125
|
+
## RBS Type Checking
|
|
126
|
+
|
|
127
|
+
React on Rails uses RBS (Ruby Signature) for static type checking with Steep.
|
|
128
|
+
|
|
129
|
+
### Quick Start
|
|
130
|
+
|
|
131
|
+
- **Validate signatures**: `bundle exec rake rbs:validate` (run by CI)
|
|
132
|
+
- **Run type checker**: `bundle exec rake rbs:steep` (currently disabled in CI due to existing errors)
|
|
133
|
+
- **Runtime checking**: Enabled by default in tests when `rbs` gem is available
|
|
134
|
+
|
|
135
|
+
### Runtime Type Checking
|
|
136
|
+
|
|
137
|
+
Runtime type checking is **ENABLED BY DEFAULT** during test runs for:
|
|
138
|
+
- `rake run_rspec:gem` - Unit tests
|
|
139
|
+
- `rake run_rspec:dummy` - Integration tests
|
|
140
|
+
- `rake run_rspec:dummy_no_turbolinks` - Integration tests without Turbolinks
|
|
141
|
+
|
|
142
|
+
**Performance Impact**: Runtime type checking adds overhead (typically 5-15%) to test execution. This is acceptable during development and CI as it catches type errors in actual execution paths that static analysis might miss.
|
|
143
|
+
|
|
144
|
+
To disable runtime checking (e.g., for faster test iterations during development):
|
|
145
|
+
```bash
|
|
146
|
+
DISABLE_RBS_RUNTIME_CHECKING=true rake run_rspec:gem
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**When to disable**: Consider disabling during rapid test-driven development cycles where you're running tests frequently. Re-enable before committing to catch type violations.
|
|
150
|
+
|
|
151
|
+
### Adding Type Signatures
|
|
152
|
+
|
|
153
|
+
When creating new Ruby files in `lib/react_on_rails/`:
|
|
154
|
+
|
|
155
|
+
1. **Create RBS signature**: Add `sig/react_on_rails/filename.rbs`
|
|
156
|
+
2. **Add to Steepfile**: Include `check "lib/react_on_rails/filename.rb"` in Steepfile
|
|
157
|
+
3. **Validate**: Run `bundle exec rake rbs:validate`
|
|
158
|
+
4. **Type check**: Run `bundle exec rake rbs:steep`
|
|
159
|
+
5. **Fix errors**: Address any type errors before committing
|
|
160
|
+
|
|
161
|
+
### Files Currently Type-Checked
|
|
162
|
+
|
|
163
|
+
See `Steepfile` for the complete list. Core files include:
|
|
164
|
+
- `lib/react_on_rails.rb`
|
|
165
|
+
- `lib/react_on_rails/configuration.rb`
|
|
166
|
+
- `lib/react_on_rails/helper.rb`
|
|
167
|
+
- `lib/react_on_rails/packer_utils.rb`
|
|
168
|
+
- `lib/react_on_rails/server_rendering_pool.rb`
|
|
169
|
+
- And 5 more (see Steepfile for full list)
|
|
170
|
+
|
|
171
|
+
### Pro Package Type Checking
|
|
172
|
+
|
|
173
|
+
The Pro package has its own RBS signatures in `react_on_rails_pro/sig/`.
|
|
174
|
+
|
|
175
|
+
Validate Pro signatures:
|
|
176
|
+
```bash
|
|
177
|
+
cd react_on_rails_pro && bundle exec rake rbs:validate
|
|
178
|
+
```
|
|
120
179
|
## Changelog
|
|
121
180
|
|
|
122
181
|
- **Update CHANGELOG.md for user-visible changes only** (features, bug fixes, breaking changes, deprecations, performance improvements)
|
data/CONTRIBUTING.md
CHANGED
|
@@ -14,6 +14,7 @@ During this transition:
|
|
|
14
14
|
|
|
15
15
|
- [docs/contributor-info/Releasing](./docs/contributor-info/releasing.md) for instructions on releasing.
|
|
16
16
|
- [docs/contributor-info/pull-requests](./docs/contributor-info/pull-requests.md)
|
|
17
|
+
- [docs/contributor-info/rbs-type-signatures](./docs/contributor-info/rbs-type-signatures.md) for information on RBS type signatures
|
|
17
18
|
- See other docs in [docs/contributor-info](./docs/contributor-info)
|
|
18
19
|
|
|
19
20
|
## Prerequisites
|
|
@@ -128,7 +129,7 @@ Package react-on-rails@12.0.0-12070fd1 added ==> /Users/justin/shakacode/react-o
|
|
|
128
129
|
Don't forget you may need to run yarn after adding packages with yalc to install/update dependencies/bin scripts.
|
|
129
130
|
```
|
|
130
131
|
|
|
131
|
-
Of course, you can do the same with `react-on-rails-pro` and
|
|
132
|
+
Of course, you can do the same with `react-on-rails-pro` and `react-on-rails-pro-node-renderer` packages.
|
|
132
133
|
|
|
133
134
|
This is the approach `spec/dummy` apps use, so you can also look at their implementation.
|
|
134
135
|
|
|
@@ -421,6 +422,53 @@ The CI system intelligently skips unnecessary work:
|
|
|
421
422
|
|
|
422
423
|
For more details, see [`docs/CI_OPTIMIZATION.md`](./docs/CI_OPTIMIZATION.md).
|
|
423
424
|
|
|
425
|
+
### CI Control Commands
|
|
426
|
+
|
|
427
|
+
React on Rails provides PR comment commands to control CI behavior:
|
|
428
|
+
|
|
429
|
+
#### `/run-skipped-ci` - Enable Full CI Mode
|
|
430
|
+
|
|
431
|
+
Runs all skipped CI checks and enables full CI mode for the PR:
|
|
432
|
+
|
|
433
|
+
```
|
|
434
|
+
/run-skipped-ci
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**What it does:**
|
|
438
|
+
|
|
439
|
+
- Triggers all CI workflows that were skipped due to unchanged code
|
|
440
|
+
- Adds the `full-ci` label to the PR
|
|
441
|
+
- **Persists across future commits** - all subsequent pushes will run the full test suite
|
|
442
|
+
- Runs minimum dependency tests (Ruby 3.2, Node 20, Shakapacker 8.2.0, React 18)
|
|
443
|
+
|
|
444
|
+
**When to use:**
|
|
445
|
+
|
|
446
|
+
- You want comprehensive testing across all configurations
|
|
447
|
+
- Testing changes that might affect minimum supported versions
|
|
448
|
+
- Validating generator changes or core functionality
|
|
449
|
+
- Before merging PRs that touch critical paths
|
|
450
|
+
|
|
451
|
+
#### `/stop-run-skipped-ci` - Disable Full CI Mode
|
|
452
|
+
|
|
453
|
+
Removes the `full-ci` label and returns to standard CI behavior:
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
/stop-run-skipped-ci
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**What it does:**
|
|
460
|
+
|
|
461
|
+
- Removes the `full-ci` label from the PR
|
|
462
|
+
- Future commits will use the optimized CI suite (tests only changed code)
|
|
463
|
+
- Does not stop currently running workflows
|
|
464
|
+
|
|
465
|
+
**When to use:**
|
|
466
|
+
|
|
467
|
+
- You've validated changes with full CI and want to return to faster feedback
|
|
468
|
+
- Reducing CI time during rapid iteration on a PR
|
|
469
|
+
|
|
470
|
+
**Note:** The `full-ci` label is preserved on merged PRs as a historical record of which PRs ran with comprehensive testing.
|
|
471
|
+
|
|
424
472
|
### Install Generator
|
|
425
473
|
|
|
426
474
|
In your Rails app add this gem with a path to your fork.
|
|
@@ -34,10 +34,10 @@ group :development, :test do
|
|
|
34
34
|
gem "pry-rails"
|
|
35
35
|
gem "pry-rescue"
|
|
36
36
|
gem "rbs", require: false
|
|
37
|
+
gem "steep", require: false
|
|
37
38
|
gem "rubocop", "1.61.0", require: false
|
|
38
39
|
gem "rubocop-performance", "~>1.20.0", require: false
|
|
39
40
|
gem "rubocop-rspec", "~>2.26", require: false
|
|
40
|
-
gem "scss_lint", require: false
|
|
41
41
|
gem "spring", "~> 4.0"
|
|
42
42
|
gem "lefthook", require: false
|
|
43
43
|
# Added for Ruby 3.5+ compatibility to silence warnings
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
react_on_rails (16.2.0.beta.
|
|
4
|
+
react_on_rails (16.2.0.beta.8)
|
|
5
5
|
addressable
|
|
6
6
|
connection_pool
|
|
7
7
|
execjs (~> 2.5)
|
|
@@ -120,7 +120,8 @@ GEM
|
|
|
120
120
|
thor (>= 0.19.4, < 2.0)
|
|
121
121
|
tins (~> 1.6)
|
|
122
122
|
crass (1.0.6)
|
|
123
|
-
|
|
123
|
+
csv (3.3.5)
|
|
124
|
+
cypress-on-rails (1.20.0)
|
|
124
125
|
rack
|
|
125
126
|
date (3.3.4)
|
|
126
127
|
debug (1.9.2)
|
|
@@ -135,6 +136,7 @@ GEM
|
|
|
135
136
|
erubi (1.13.1)
|
|
136
137
|
execjs (2.9.1)
|
|
137
138
|
ffi (1.16.3)
|
|
139
|
+
fileutils (1.8.0)
|
|
138
140
|
gem-release (2.2.2)
|
|
139
141
|
generator_spec (0.10.0)
|
|
140
142
|
activesupport (>= 3.0.0)
|
|
@@ -330,11 +332,6 @@ GEM
|
|
|
330
332
|
rubocop (~> 1.40)
|
|
331
333
|
ruby-progressbar (1.13.0)
|
|
332
334
|
rubyzip (2.3.2)
|
|
333
|
-
sass (3.7.4)
|
|
334
|
-
sass-listen (~> 4.0.0)
|
|
335
|
-
sass-listen (4.0.0)
|
|
336
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
337
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
|
338
335
|
sass-rails (6.0.0)
|
|
339
336
|
sassc-rails (~> 2.1, >= 2.1.1)
|
|
340
337
|
sassc (2.4.0)
|
|
@@ -345,10 +342,9 @@ GEM
|
|
|
345
342
|
sprockets (> 3.0)
|
|
346
343
|
sprockets-rails
|
|
347
344
|
tilt
|
|
348
|
-
scss_lint (0.60.0)
|
|
349
|
-
sass (~> 3.5, >= 3.5.5)
|
|
350
345
|
sdoc (2.6.1)
|
|
351
346
|
rdoc (>= 5.0)
|
|
347
|
+
securerandom (0.4.1)
|
|
352
348
|
selenium-webdriver (4.9.0)
|
|
353
349
|
rexml (~> 3.2, >= 3.2.5)
|
|
354
350
|
rubyzip (>= 1.2.2, < 3.0)
|
|
@@ -375,11 +371,29 @@ GEM
|
|
|
375
371
|
sprockets (>= 3.0.0)
|
|
376
372
|
sqlite3 (1.7.3)
|
|
377
373
|
mini_portile2 (~> 2.8.0)
|
|
374
|
+
steep (1.9.4)
|
|
375
|
+
activesupport (>= 5.1)
|
|
376
|
+
concurrent-ruby (>= 1.1.10)
|
|
377
|
+
csv (>= 3.0.9)
|
|
378
|
+
fileutils (>= 1.1.0)
|
|
379
|
+
json (>= 2.1.0)
|
|
380
|
+
language_server-protocol (>= 3.15, < 4.0)
|
|
381
|
+
listen (~> 3.0)
|
|
382
|
+
logger (>= 1.3.0)
|
|
383
|
+
parser (>= 3.1)
|
|
384
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
385
|
+
rbs (~> 3.8)
|
|
386
|
+
securerandom (>= 0.1)
|
|
387
|
+
strscan (>= 1.0.0)
|
|
388
|
+
terminal-table (>= 2, < 4)
|
|
389
|
+
uri (>= 0.12.0)
|
|
378
390
|
stringio (3.1.7)
|
|
379
391
|
strscan (3.1.0)
|
|
380
392
|
sync (0.5.0)
|
|
381
393
|
term-ansicolor (1.8.0)
|
|
382
394
|
tins (~> 1.0)
|
|
395
|
+
terminal-table (3.0.2)
|
|
396
|
+
unicode-display_width (>= 1.1.1, < 3)
|
|
383
397
|
thor (1.4.0)
|
|
384
398
|
tilt (2.3.0)
|
|
385
399
|
timeout (0.4.1)
|
|
@@ -399,6 +413,7 @@ GEM
|
|
|
399
413
|
uglifier (4.2.0)
|
|
400
414
|
execjs (>= 0.3.0, < 3)
|
|
401
415
|
unicode-display_width (2.5.0)
|
|
416
|
+
uri (1.1.1)
|
|
402
417
|
webdrivers (5.3.0)
|
|
403
418
|
nokogiri (~> 1.6)
|
|
404
419
|
rubyzip (>= 1.3.0)
|
|
@@ -451,13 +466,13 @@ DEPENDENCIES
|
|
|
451
466
|
rubocop-performance (~> 1.20.0)
|
|
452
467
|
rubocop-rspec (~> 2.26)
|
|
453
468
|
sass-rails (~> 6.0)
|
|
454
|
-
scss_lint
|
|
455
469
|
sdoc
|
|
456
470
|
selenium-webdriver (= 4.9.0)
|
|
457
471
|
shakapacker (= 9.3.0)
|
|
458
472
|
spring (~> 4.0)
|
|
459
473
|
sprockets (~> 4.0)
|
|
460
474
|
sqlite3 (~> 1.6)
|
|
475
|
+
steep
|
|
461
476
|
turbo-rails
|
|
462
477
|
turbolinks
|
|
463
478
|
uglifier
|
data/SWITCHING_CI_CONFIGS.md
CHANGED
|
@@ -53,24 +53,53 @@ The project runs tests against two configurations:
|
|
|
53
53
|
|
|
54
54
|
## Prerequisites
|
|
55
55
|
|
|
56
|
-
You must have a version manager
|
|
56
|
+
You must have a version manager installed to manage Ruby and Node versions. The script supports:
|
|
57
|
+
|
|
58
|
+
- **[mise](https://mise.jdx.dev/)** - Recommended, modern, manages both Ruby and Node
|
|
59
|
+
- **[asdf](https://asdf-vm.com/)** - Legacy option, manages both Ruby and Node
|
|
60
|
+
- **[rvm](https://rvm.io/) + [nvm](https://github.com/nvm-sh/nvm)** - Separate managers for Ruby and Node
|
|
61
|
+
|
|
62
|
+
### Option 1: mise (Recommended)
|
|
57
63
|
|
|
58
64
|
```bash
|
|
59
|
-
# Install mise
|
|
65
|
+
# Install mise
|
|
60
66
|
brew install mise
|
|
61
67
|
echo 'eval "$(mise activate zsh)"' >> ~/.zshrc
|
|
62
68
|
source ~/.zshrc
|
|
63
69
|
|
|
64
|
-
#
|
|
70
|
+
# mise automatically reads from .tool-versions
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Option 2: asdf
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Install asdf
|
|
65
77
|
brew install asdf
|
|
66
78
|
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.zshrc
|
|
67
79
|
source ~/.zshrc
|
|
68
80
|
|
|
69
|
-
# Install plugins
|
|
81
|
+
# Install plugins
|
|
70
82
|
asdf plugin add ruby
|
|
71
83
|
asdf plugin add nodejs
|
|
72
84
|
```
|
|
73
85
|
|
|
86
|
+
### Option 3: rvm + nvm
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Install rvm for Ruby
|
|
90
|
+
\curl -sSL https://get.rvm.io | bash -s stable
|
|
91
|
+
source ~/.rvm/scripts/rvm
|
|
92
|
+
|
|
93
|
+
# Install nvm for Node
|
|
94
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
|
95
|
+
# Add to shell config (the installer usually does this automatically)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Important Notes:**
|
|
99
|
+
|
|
100
|
+
- If you only have rvm (no nvm) or only nvm (no rvm), the script will detect this and provide helpful error messages guiding you to install the missing manager or switch to mise/asdf.
|
|
101
|
+
- **Do not mix version managers** (e.g., don't install both mise and rvm). The script prioritizes mise > asdf > rvm+nvm, so mise/asdf will always take precedence. Using multiple managers can cause confusion about which versions are active.
|
|
102
|
+
|
|
74
103
|
## Detailed Usage
|
|
75
104
|
|
|
76
105
|
### 1. Check Current Configuration
|
|
@@ -107,7 +136,9 @@ This will:
|
|
|
107
136
|
```bash
|
|
108
137
|
# Reload your shell to pick up new Ruby/Node versions
|
|
109
138
|
cd <project-root>
|
|
110
|
-
mise current
|
|
139
|
+
mise current # For mise users
|
|
140
|
+
# asdf current # For asdf users
|
|
141
|
+
# rvm current && nvm current # For rvm+nvm users
|
|
111
142
|
|
|
112
143
|
# Build and test
|
|
113
144
|
rake node_package
|
|
@@ -137,7 +168,9 @@ This will:
|
|
|
137
168
|
```bash
|
|
138
169
|
# Reload your shell to pick up new Ruby/Node versions
|
|
139
170
|
cd <project-root>
|
|
140
|
-
mise current
|
|
171
|
+
mise current # For mise users
|
|
172
|
+
# asdf current # For asdf users
|
|
173
|
+
# rvm current && nvm current # For rvm+nvm users
|
|
141
174
|
|
|
142
175
|
# Build and test
|
|
143
176
|
rake node_package
|
|
@@ -243,6 +276,22 @@ asdf reshim ruby
|
|
|
243
276
|
asdf reshim nodejs
|
|
244
277
|
```
|
|
245
278
|
|
|
279
|
+
**For rvm + nvm:**
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# Install and use specific Ruby version
|
|
283
|
+
rvm install 3.2.8 # or 3.4.3
|
|
284
|
+
rvm use 3.2.8
|
|
285
|
+
|
|
286
|
+
# Install and use specific Node version
|
|
287
|
+
nvm install 20.18.1 # or 22.12.0
|
|
288
|
+
nvm use 20.18.1
|
|
289
|
+
|
|
290
|
+
# Verify versions
|
|
291
|
+
ruby --version
|
|
292
|
+
node --version
|
|
293
|
+
```
|
|
294
|
+
|
|
246
295
|
### Yarn install fails
|
|
247
296
|
|
|
248
297
|
If you get package resolution errors:
|
data/Steepfile
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Steepfile - Configuration for Steep type checker
|
|
4
|
+
# See https://github.com/soutaro/steep for documentation
|
|
5
|
+
#
|
|
6
|
+
# IMPORTANT: This file lists only the files that are ready for type checking.
|
|
7
|
+
# We use a positive list (explicit check statements) rather than checking all files
|
|
8
|
+
# because not all files have RBS signatures yet.
|
|
9
|
+
#
|
|
10
|
+
# Files/directories intentionally excluded (no RBS signatures yet):
|
|
11
|
+
# - lib/generators/**/* - Rails generators (complex Rails integration)
|
|
12
|
+
# - lib/react_on_rails/engine.rb - Rails engine setup
|
|
13
|
+
# - lib/react_on_rails/doctor.rb - Diagnostic tool
|
|
14
|
+
# - lib/react_on_rails/locales/**/* - I18n files
|
|
15
|
+
# - lib/react_on_rails/props_js_builder.rb - TODO: Add signature
|
|
16
|
+
# - lib/react_on_rails/shakapacker/**/* - Shakapacker integration (complex)
|
|
17
|
+
#
|
|
18
|
+
# To add a new file to type checking:
|
|
19
|
+
# 1. Create corresponding RBS signature in sig/react_on_rails/filename.rbs
|
|
20
|
+
# 2. Add `check "lib/react_on_rails/filename.rb"` below
|
|
21
|
+
# 3. Run `bundle exec rake rbs:steep` to verify
|
|
22
|
+
# 4. Fix any type errors before committing
|
|
23
|
+
|
|
24
|
+
D = Steep::Diagnostic
|
|
25
|
+
|
|
26
|
+
target :lib do
|
|
27
|
+
# Core files with RBS signatures (alphabetically ordered for easy maintenance)
|
|
28
|
+
check "lib/react_on_rails.rb"
|
|
29
|
+
check "lib/react_on_rails/configuration.rb"
|
|
30
|
+
check "lib/react_on_rails/controller.rb"
|
|
31
|
+
check "lib/react_on_rails/git_utils.rb"
|
|
32
|
+
check "lib/react_on_rails/helper.rb"
|
|
33
|
+
check "lib/react_on_rails/packer_utils.rb"
|
|
34
|
+
check "lib/react_on_rails/server_rendering_pool.rb"
|
|
35
|
+
check "lib/react_on_rails/test_helper.rb"
|
|
36
|
+
check "lib/react_on_rails/utils.rb"
|
|
37
|
+
check "lib/react_on_rails/version_checker.rb"
|
|
38
|
+
|
|
39
|
+
# Specify RBS signature directories
|
|
40
|
+
signature "sig"
|
|
41
|
+
|
|
42
|
+
# Configure libraries (gems) - Steep will load their RBS signatures
|
|
43
|
+
configure_code_diagnostics(D::Ruby.default)
|
|
44
|
+
|
|
45
|
+
# Library configuration - standard library gems used by checked files
|
|
46
|
+
library "pathname"
|
|
47
|
+
library "singleton"
|
|
48
|
+
library "logger"
|
|
49
|
+
library "monitor"
|
|
50
|
+
library "securerandom"
|
|
51
|
+
end
|
data/bin/ci-rerun-failures
CHANGED
|
@@ -173,21 +173,66 @@ if [ -z "$FAILED_CHECKS" ]; then
|
|
|
173
173
|
exit 0
|
|
174
174
|
fi
|
|
175
175
|
|
|
176
|
+
# Map CI job names to identifiers
|
|
177
|
+
# NOTE: Version numbers below must match .github/workflows/main.yml matrix configuration
|
|
178
|
+
declare -A JOB_MAP
|
|
179
|
+
JOB_MAP["lint-js-and-ruby"]="lint-js-and-ruby"
|
|
180
|
+
JOB_MAP["rspec-package-tests"]="rspec-package-tests"
|
|
181
|
+
JOB_MAP["package-js-tests"]="package-js-tests"
|
|
182
|
+
JOB_MAP["dummy-app-integration-tests (3.4, 22, latest)"]="dummy-app-integration-tests"
|
|
183
|
+
JOB_MAP["dummy-app-integration-tests (3.2, 20, minimum)"]="dummy-app-integration-tests"
|
|
184
|
+
JOB_MAP["examples"]="examples"
|
|
185
|
+
|
|
186
|
+
# Function to execute commands without eval
|
|
187
|
+
run_command() {
|
|
188
|
+
local cmd_id="$1"
|
|
189
|
+
case "$cmd_id" in
|
|
190
|
+
"lint-js-and-ruby")
|
|
191
|
+
bundle exec rubocop && yarn run eslint --report-unused-disable-directives && yarn start format.listDifferent
|
|
192
|
+
;;
|
|
193
|
+
"rspec-package-tests")
|
|
194
|
+
bundle exec rake run_rspec:gem
|
|
195
|
+
;;
|
|
196
|
+
"package-js-tests")
|
|
197
|
+
yarn test
|
|
198
|
+
;;
|
|
199
|
+
"dummy-app-integration-tests")
|
|
200
|
+
bundle exec rake run_rspec:all_dummy
|
|
201
|
+
;;
|
|
202
|
+
"examples")
|
|
203
|
+
bundle exec rake run_rspec:shakapacker_examples
|
|
204
|
+
;;
|
|
205
|
+
*)
|
|
206
|
+
echo "Unknown command ID: $cmd_id"
|
|
207
|
+
return 1
|
|
208
|
+
;;
|
|
209
|
+
esac
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
# Map CI job names to human-readable versions (matches SWITCHING_CI_CONFIGS.md)
|
|
213
|
+
declare -A JOB_VERSION_MAP
|
|
214
|
+
JOB_VERSION_MAP["dummy-app-integration-tests (3.4, 22, latest)"]="Ruby 3.4, Node 22, Shakapacker 9.3.0, React 19"
|
|
215
|
+
JOB_VERSION_MAP["dummy-app-integration-tests (3.2, 20, minimum)"]="Ruby 3.2, Node 20, Shakapacker 8.2.0, React 18"
|
|
216
|
+
|
|
217
|
+
# Helper function to get version info for a job name
|
|
218
|
+
get_version_info() {
|
|
219
|
+
local job_name="$1"
|
|
220
|
+
for mapped_job_name in "${!JOB_VERSION_MAP[@]}"; do
|
|
221
|
+
if [[ "$job_name" == "$mapped_job_name"* ]]; then
|
|
222
|
+
echo " (${JOB_VERSION_MAP[$mapped_job_name]})"
|
|
223
|
+
return
|
|
224
|
+
fi
|
|
225
|
+
done
|
|
226
|
+
echo ""
|
|
227
|
+
}
|
|
228
|
+
|
|
176
229
|
echo -e "${YELLOW}Failed CI jobs:${NC}"
|
|
177
230
|
echo "$FAILED_CHECKS" | while read -r check; do
|
|
178
|
-
|
|
231
|
+
version_info=$(get_version_info "$check")
|
|
232
|
+
echo -e "${RED} ✗ $check${version_info}${NC}"
|
|
179
233
|
done
|
|
180
234
|
echo ""
|
|
181
235
|
|
|
182
|
-
# Map CI job names to local commands
|
|
183
|
-
declare -A JOB_MAP
|
|
184
|
-
JOB_MAP["lint-js-and-ruby"]="bundle exec rubocop && yarn run eslint --report-unused-disable-directives && yarn start format.listDifferent"
|
|
185
|
-
JOB_MAP["rspec-package-tests"]="bundle exec rake run_rspec:gem"
|
|
186
|
-
JOB_MAP["package-js-tests"]="yarn test"
|
|
187
|
-
JOB_MAP["dummy-app-integration-tests (3.4, 22, latest)"]="bundle exec rake run_rspec:all_dummy"
|
|
188
|
-
JOB_MAP["dummy-app-integration-tests (3.2, 20, minimum)"]="bundle exec rake run_rspec:all_dummy"
|
|
189
|
-
JOB_MAP["examples"]="bundle exec rake run_rspec:shakapacker_examples"
|
|
190
|
-
|
|
191
236
|
# Track what we'll run (deduplicated)
|
|
192
237
|
declare -A COMMANDS_TO_RUN
|
|
193
238
|
|
|
@@ -217,8 +262,10 @@ if [ "$NUM_COMMANDS" -eq 0 ]; then
|
|
|
217
262
|
fi
|
|
218
263
|
|
|
219
264
|
echo -e "${BLUE}Will run the following commands:${NC}"
|
|
220
|
-
for
|
|
221
|
-
|
|
265
|
+
for cmd_id in "${!COMMANDS_TO_RUN[@]}"; do
|
|
266
|
+
job_name="${COMMANDS_TO_RUN[$cmd_id]}"
|
|
267
|
+
version_info=$(get_version_info "$job_name")
|
|
268
|
+
echo -e "${BLUE} • $job_name${version_info}${NC}"
|
|
222
269
|
done
|
|
223
270
|
echo ""
|
|
224
271
|
|
|
@@ -249,21 +296,20 @@ fi
|
|
|
249
296
|
# Run commands
|
|
250
297
|
FAILED_COMMANDS=()
|
|
251
298
|
|
|
252
|
-
for
|
|
253
|
-
job_name="${COMMANDS_TO_RUN[$
|
|
254
|
-
|
|
255
|
-
|
|
299
|
+
for cmd_id in "${!COMMANDS_TO_RUN[@]}"; do
|
|
300
|
+
job_name="${COMMANDS_TO_RUN[$cmd_id]}"
|
|
301
|
+
version_info=$(get_version_info "$job_name")
|
|
302
|
+
|
|
303
|
+
echo -e "${BLUE}▶ Running: $job_name${version_info}${NC}"
|
|
256
304
|
echo ""
|
|
257
305
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if eval "$cmd"; then
|
|
261
|
-
echo -e "${GREEN}✓ $job_name passed${NC}"
|
|
306
|
+
if run_command "$cmd_id"; then
|
|
307
|
+
echo -e "${GREEN}✓ $job_name${version_info} passed${NC}"
|
|
262
308
|
echo ""
|
|
263
309
|
else
|
|
264
|
-
echo -e "${RED}✗ $job_name failed${NC}"
|
|
310
|
+
echo -e "${RED}✗ $job_name${version_info} failed${NC}"
|
|
265
311
|
echo ""
|
|
266
|
-
FAILED_COMMANDS+=("$job_name")
|
|
312
|
+
FAILED_COMMANDS+=("${job_name}${version_info}")
|
|
267
313
|
fi
|
|
268
314
|
done
|
|
269
315
|
|