Commit 1a75fcb
Improve validation skip documentation and test coverage
Addresses feedback from PR #1923:
1. Enhanced documentation:
- Added comprehensive method-level docs explaining ENV variable approach
- Documented why ENV is preferred over ARGV (Rails modifies ARGV during init)
- Added thread safety notes explaining process-global ENV scope
- Cross-referenced engine.rb and install_generator.rb for clarity
2. Improved test coverage:
- Added tests verifying ENV variable takes precedence over other checks
- Tests confirm ENV check short-circuits before package.json/ARGV checks
- Added 4 new test cases covering precedence scenarios
3. Thread safety documentation:
- Documented that generators run in single process (not a concern)
- Added note about parallel test scenarios (separate processes)
- Clarified ENV cleanup in ensure block
Changes:
- lib/react_on_rails/engine.rb: Enhanced skip_validation? docs
- lib/generators/react_on_rails/install_generator.rb: Added run_generators docs
- spec/react_on_rails/engine_spec.rb: Added 4 precedence tests
All specs pass (21 examples, 0 failures)
RuboCop clean
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent ae5425b commit 1a75fcb
File tree
3 files changed
+67
-0
lines changed- lib
- generators/react_on_rails
- react_on_rails
- spec/react_on_rails
3 files changed
+67
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| 55 | + | |
42 | 56 | | |
43 | 57 | | |
44 | 58 | | |
| |||
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
| 76 | + | |
| 77 | + | |
62 | 78 | | |
63 | 79 | | |
64 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
| |||
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
| 49 | + | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
34 | 71 | | |
35 | 72 | | |
36 | 73 | | |
| |||
0 commit comments