Skip to content

Commit 2f14afd

Browse files
justin808claude
andcommitted
Phase 6: Restructure Ruby Gems to Final Monorepo Layout
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. ## Major Changes ### Directory Moves - Moved `react_on_rails_pro/lib/react_on_rails_pro/` → `lib/react_on_rails_pro/` Both Ruby gems are now equal siblings under `lib/` - Moved `react_on_rails_pro/spec/react_on_rails_pro/` → `spec/pro/react_on_rails_pro/` Pro specs now live alongside core specs in `spec/` - Moved `react_on_rails_pro/react_on_rails_pro.gemspec` → `react_on_rails_pro.gemspec` Both gemspecs now at repository root - Moved `react_on_rails_pro/CHANGELOG.md` → `CHANGELOG_PRO.md` Pro changelog now at root as sibling to main CHANGELOG.md - Moved `react_on_rails_pro/lib/react_on_rails_pro.rb` → `lib/react_on_rails_pro.rb` Main require file now at lib/ root - Moved Pro rake tasks from `react_on_rails_pro/lib/tasks/` → `lib/tasks/` (Renamed assets.rake to assets_pro.rake to avoid conflict) ### Configuration Updates - Updated `Gemfile` to explicitly include both gemspecs: ```ruby gemspec name: "react_on_rails" gemspec name: "react_on_rails_pro" ``` - Updated `react_on_rails_pro.gemspec` paths: - Changed core version require from `../lib/` to `lib/` - Updated `LICENSE.md` with final directory structure: - Added `lib/react_on_rails_pro/` for Pro Ruby code - Added `spec/pro/` for Pro specs - Added `react_on_rails_pro.gemspec` for Pro gemspec - Updated `.rubocop.yml` exclusions for new Pro locations - Updated `rakelib/release.rake` to reference new paths - Updated `script/ci-changes-detector` patterns for new structure ### Path Updates - Fixed require_relative paths in: - `spec/pro/react_on_rails_pro/assets_precompile_spec.rb` - `react_on_rails_pro/spec/dummy/spec/rails_helper.rb` ### What Remained in react_on_rails_pro/ The following remain in `react_on_rails_pro/` directory: - `spec/dummy/` - Pro dummy app and test infrastructure - `spec/execjs-compatible-dummy/` - Alternative test dummy - Configuration files (.gitignore, .prettierrc, etc.) - Documentation (docs/, README.md, CI_SETUP.md, etc.) - Build infrastructure (Gemfile, Rakefile, package-scripts.yml, etc.) This is intentional and documented in LICENSE.md. ## Benefits ✅ Clearer directory structure (equal siblings, not parent/child) ✅ Both gems buildable from root ✅ Licensing boundaries more obvious ✅ Matches monorepo plan target architecture ✅ Simpler import/require paths ## Test Plan - [x] Both gems build successfully from root - [x] Bundle install resolves both gems correctly - [x] RuboCop passes with no violations - [x] Prettier formatting passes - [x] All paths updated in scripts and CI configs ## Migration Impact **Users:** No impact - gem names and APIs unchanged **Contributors:** Must update local clones - paths changed ## Related - Completes Phase 6 of monorepo migration - Resolves #2103 - Follows PR #2069 (Phase 5: Add Pro Node Renderer Package) - Prepares for Phase 7-8 (Final polish and documentation) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 86520a9 commit 2f14afd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+59
-13
lines changed

.rubocop.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ AllCops:
2727
- '**/tmp/**/*'
2828
- 'coverage/**/*'
2929
- 'gen-examples/examples/**/*'
30+
- 'lib/react_on_rails_pro/**/*' # Exclude Pro Ruby code (has its own linting)
3031
- 'node_modules/**/*'
31-
- 'react_on_rails_pro/**/*' # Exclude pro package (has its own linting)
32+
- 'react_on_rails_pro/**/*' # Exclude Pro dummy app and test infrastructure
3233
- 'spec/dummy/bin/*'
34+
- 'spec/pro/**/*' # Exclude Pro specs (has its own linting)
3335
- 'spec/fixtures/**/*'
3436
- 'spec/react_on_rails/dummy-for-generators/**/*'
3537
- 'tmp/**/*'

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
source "https://rubygems.org"
44

5-
# Specify your gem"s dependencies in react_on_rails.gemspec
6-
gemspec
5+
# Specify your gem"s dependencies in react_on_rails.gemspec and react_on_rails_pro.gemspec
6+
gemspec name: "react_on_rails"
7+
gemspec name: "react_on_rails_pro"
78

89
eval_gemfile File.expand_path("./Gemfile.development_dependencies", __dir__)

Gemfile.lock

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ PATH
88
rails (>= 5.2)
99
rainbow (~> 3.0)
1010
shakapacker (>= 6.0)
11+
react_on_rails_pro (16.2.0.beta.12)
12+
addressable
13+
async (>= 2.6)
14+
connection_pool
15+
execjs (~> 2.9)
16+
httpx (~> 1.5)
17+
jwt (~> 2.7)
18+
rainbow
19+
react_on_rails (= 16.2.0.beta.12)
1120

1221
GEM
1322
remote: https://rubygems.org/
@@ -90,6 +99,12 @@ GEM
9099
public_suffix (>= 2.0.2, < 7.0)
91100
amazing_print (1.6.0)
92101
ast (2.4.2)
102+
async (2.34.0)
103+
console (~> 1.29)
104+
fiber-annotation
105+
io-event (~> 1.11)
106+
metrics (~> 0.12)
107+
traces (~> 0.18)
93108
base64 (0.3.0)
94109
benchmark (0.4.1)
95110
bigdecimal (3.3.1)
@@ -111,8 +126,14 @@ GEM
111126
launchy
112127
childprocess (5.0.0)
113128
coderay (1.1.3)
129+
commonmarker (2.5.0)
130+
rb_sys (~> 0.9)
114131
concurrent-ruby (1.3.5)
115132
connection_pool (2.5.4)
133+
console (1.34.2)
134+
fiber-annotation
135+
fiber-local (~> 1.1)
136+
json
116137
coveralls (0.8.23)
117138
json (>= 1.8, < 3)
118139
simplecov (~> 0.16.1)
@@ -136,17 +157,25 @@ GEM
136157
erubi (1.13.1)
137158
execjs (2.9.1)
138159
ffi (1.16.3)
160+
fiber-annotation (0.2.0)
161+
fiber-local (1.1.0)
162+
fiber-storage
163+
fiber-storage (1.0.1)
139164
fileutils (1.8.0)
140165
gem-release (2.2.2)
141166
generator_spec (0.10.0)
142167
activesupport (>= 3.0.0)
143168
railties (>= 3.0.0)
144169
globalid (1.2.1)
145170
activesupport (>= 6.1)
171+
http-2 (1.1.1)
172+
httpx (1.6.3)
173+
http-2 (>= 1.0.0)
146174
i18n (1.14.7)
147175
concurrent-ruby (~> 1.0)
148176
interception (0.5)
149177
io-console (0.8.1)
178+
io-event (1.14.2)
150179
irb (1.15.3)
151180
pp (>= 0.6.0)
152181
rdoc (>= 4.0.0)
@@ -159,6 +188,8 @@ GEM
159188
railties (>= 4.2.0)
160189
thor (>= 0.14, < 2.0)
161190
json (2.7.2)
191+
jwt (2.10.2)
192+
base64
162193
language_server-protocol (3.17.0.3)
163194
launchy (3.0.1)
164195
addressable (~> 2.8)
@@ -179,6 +210,7 @@ GEM
179210
marcel (1.0.4)
180211
matrix (0.4.3)
181212
method_source (1.1.0)
213+
metrics (0.15.0)
182214
mini_mime (1.1.5)
183215
mini_portile2 (2.8.9)
184216
minitest (5.26.0)
@@ -268,9 +300,12 @@ GEM
268300
zeitwerk (~> 2.6)
269301
rainbow (3.1.1)
270302
rake (13.3.1)
303+
rake-compiler-dock (1.9.1)
271304
rb-fsevent (0.11.2)
272305
rb-inotify (0.10.1)
273306
ffi (~> 1.0)
307+
rb_sys (0.9.117)
308+
rake-compiler-dock (= 1.9.1)
274309
rbs (3.9.5)
275310
logger
276311
rdoc (6.15.1)
@@ -400,6 +435,7 @@ GEM
400435
tins (1.33.0)
401436
bigdecimal
402437
sync
438+
traces (0.18.2)
403439
tsort (0.2.0)
404440
turbo-rails (2.0.6)
405441
actionpack (>= 6.0.0)
@@ -434,8 +470,10 @@ DEPENDENCIES
434470
amazing_print
435471
benchmark
436472
bootsnap
473+
bundler
437474
capybara (~> 3.40)
438475
capybara-screenshot
476+
commonmarker
439477
coveralls
440478
cypress-on-rails (~> 1.19)
441479
debug
@@ -459,6 +497,7 @@ DEPENDENCIES
459497
rails (~> 7.1)
460498
rbs
461499
react_on_rails!
500+
react_on_rails_pro!
462501
rspec-rails
463502
rspec-retry
464503
rspec_junit_formatter
@@ -477,6 +516,7 @@ DEPENDENCIES
477516
turbolinks
478517
uglifier
479518
webdrivers (= 5.3.0)
519+
yard
480520

481521
BUNDLED WITH
482522
2.5.9

LICENSE.md

Lines changed: 4 additions & 1 deletion
File renamed without changes.

0 commit comments

Comments
 (0)