-
-
Notifications
You must be signed in to change notification settings - Fork 638
Open
Description
Summary
Complete Phase 6 of the monorepo migration by restructuring the directory layout so react_on_rails_pro is a sibling structure instead of a nested subdirectory.
Status: Ready to start (Phase 5 complete via PR #2069)
Background
Currently, the Pro Ruby gem lives in a nested subdirectory:
react_on_rails/
└── react_on_rails_pro/ # ❌ Confusing nested structure
├── lib/react_on_rails_pro/
├── spec/
└── react_on_rails_pro.gemspec
This should be restructured to make both gems equal siblings:
react_on_rails/
├── lib/
│ ├── react_on_rails/ # MIT gem code
│ └── react_on_rails_pro/ # Pro gem code
├── spec/
│ └── pro/ # Pro specs
├── react_on_rails.gemspec # MIT gemspec
└── react_on_rails_pro.gemspec # Pro gemspec
Tasks
1. Move Pro Ruby Gem Code
- Move
react_on_rails_pro/lib/react_on_rails_pro/→lib/react_on_rails_pro/(preserving git history) - Verify both gems are now siblings under
lib/
2. Move Pro Specs
- Move
react_on_rails_pro/spec/→spec/pro/ - Update RSpec configuration for new paths
- Test specs can be discovered and run
3. Move Pro Gemspec to Root
- Move
react_on_rails_pro/react_on_rails_pro.gemspec→ root - Update gemspec paths (now relative to root instead of subdirectory)
- Update core version dependency path
- Test
gem build react_on_rails_pro.gemspec
4. Update Root Gemfile
- Update Gemfile to include both gemspecs:
gemspec name: "react_on_rails" gemspec name: "react_on_rails_pro"
- Run
bundle installand verify both gems resolve
5. Update Ruby Require Paths
- Find all files with
require.*react_on_rails_prostatements - Update any paths assuming old structure
- Test requires work in IRB
6. Update LICENSE.md
- Remove
react_on_rails_pro/directory reference - Add final structure:
## React on Rails Pro License applies to: - lib/react_on_rails_pro/ - spec/pro/ - packages/react-on-rails-pro/ - packages/react-on-rails-pro-node-renderer/ - react_on_rails_pro.gemspec
- Verify no pro code in MIT directories
7. Remove Empty react_on_rails_pro Directory
- Handle remaining files (CHANGELOG_PRO.md, README.md, docs)
- Move CHANGELOG.md to root as
CHANGELOG_PRO.md - Remove the directory:
git rm -rf react_on_rails_pro/
8. Update File Paths in Scripts and CI
- Update rake tasks referencing old paths
- Update GitHub Actions workflows
- Update shell scripts in
bin/andscript/ - Update documentation (CONTRIBUTING.md, CLAUDE.md, etc.)
9. Update RuboCop Configuration
- Update exclusions for new paths
- Run
bundle exec rubocopand fix violations
10. Update CI Configuration
- Update test paths in workflows
- Update build paths
- Update caching paths
11. Testing & Validation
- Build both gems from root
- Run core specs
- Run pro specs
- Test dummy apps
- Verify all CI checks pass
Documentation
See detailed step-by-step checklist: .claude/docs/analysis/PHASE_6_CHECKLIST.md
Success Criteria
- Both gems build successfully from root
- All tests pass (Ruby + JS)
- No
react_on_rails_pro/directory exists (except maybe dummy app) - LICENSE.md accurately reflects new structure
- All CI checks pass
- No broken requires or imports
- Documentation updated
Related
- Completes monorepo migration Phase 6
- Follows PR Phase 5: Add Pro Node Renderer Package to workspace #2069 (Phase 5: Add Pro Node Renderer Package)
- Prepares for Phase 7-8 (Final polish and documentation)
- See
docs/MONOREPO_MERGER_PLAN.mdfor full migration plan
Estimated Effort
3-4 days
Risk Level: Medium-High (significant directory restructure, but no API changes)
Migration Impact
- Users: No impact (gem names and APIs unchanged)
- Contributors: Must update local clones, paths changed