Commit 54bb39b
Fix DEFAULT_ROUTE for --rsc installs using gsub_file instead of .tt template
The previous approach renamed bin/dev to bin/dev.tt to make DEFAULT_ROUTE
dynamic via ERB. This broke the dummy app (which exec's bin/dev directly)
and the dev_spec.rb tests (which read/load the file from source).
Instead, keep bin/dev as a plain Ruby file and use gsub_file after copying
to change DEFAULT_ROUTE from "hello_world" to "hello_server" when --rsc
is used without --redux (the only case where hello_world doesn't exist).
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 9f3bf0a commit 54bb39b
File tree
2 files changed
+17
-0
lines changed- react_on_rails
- lib/generators/react_on_rails
- spec/react_on_rails/generators
2 files changed
+17
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
228 | 233 | | |
229 | 234 | | |
230 | 235 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
743 | 749 | | |
744 | 750 | | |
745 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
746 | 758 | | |
747 | 759 | | |
748 | 760 | | |
| |||
0 commit comments