-
-
Notifications
You must be signed in to change notification settings - Fork 638
Fix spec/dummy bin/dev to use correct route #2029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 35 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
WalkthroughA new development script is introduced at Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code ReviewSummaryThis PR successfully addresses the issue of the dummy app's ✅ Strengths
🔍 Observations
🎯 Potential Improvements (Optional)
🔒 SecurityNo security concerns. This is a development-only script. ⚡ PerformanceNo performance impact. 🧪 Test Coverage
📋 ChangelogAccording to CLAUDE.md, this change does not require a CHANGELOG entry as it's an internal fix to the test/dummy app, not a user-visible change to the gem. ✅ Final VerdictLGTM - This is a clean, minimal solution that correctly addresses the problem. The code is well-written and follows project conventions. Minor suggestion: Consider adding a brief test to verify the wrapper behavior, but this is optional as the base script is already well-tested. Note: CI failure in "build-dummy-app-webpack-test-bundles (false, false, false)" appears unrelated to this change (build/dependency issue, not a code issue with bin/dev). |
Change spec/dummy/bin/dev from a symlink to a wrapper script that calls the template bin/dev with --route=/ argument. This ensures the dummy app always uses the root route instead of the default hello_world route. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
e87d221 to
757d1f7
Compare
- Replace spec/dummy/bin/dev symlink with wrapper script - Replace react_on_rails_pro/spec/dummy/bin/dev bash script with wrapper - Both wrappers call the base dev script with --route=/ for their respective dummy apps - Use File.expand_path for proper path resolution This ensures both dummy apps use the root route (/) instead of the default hello_world route from the template. Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Remove 'nps' from ignoreBinaries (detected by Knip now) - Add spec/dummy client directories to ignore (dynamically loaded by React on Rails) - Add runtime dependencies to ignoreDependencies (needed in production mode) This fixes the failing "Detect dead code" CI check that was also failing on master. Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Both methods work, but File.join is simpler and was the original implementation. File.expand_path unnecessarily resolves to an absolute path when a relative path with .. segments works fine with exec.
|
@claude review this PR |
|
Claude finished @justin808's task —— View job Code Review for PR #2029Todo List:
SummaryThis PR successfully replaces the ✅ Strengths
🔍 Code AnalysisArgument Handling BehaviorThe wrapper passes argv_with_defaults.push("--route", DEFAULT_ROUTE) unless argv_with_defaults.any? { |arg| arg.start_with?("--route") }This means:
Behavior is correct: User can override the default route if needed. 📊 File Changesspec/dummy/bin/dev
react_on_rails_pro/spec/dummy/bin/dev
knip.ts
🎯 Suggestions (Optional)
⚡ CLAUDE.md Compliance
🔒 Security & Performance
✅ Final VerdictLGTM - This is a well-executed fix that:
The latest commit improving 📝 Minor NoteThe knip.ts changes appear to be refactoring/cleanup (reorganizing comments and dependencies). This is a positive improvement for maintainability but doesn't directly relate to the bin/dev fix - consider whether these should be in a separate commit for cleaner git history in future PRs. | |
## Summary Replaces the `spec/dummy/bin/dev` symlink with a wrapper script that passes `--route=/` to the base dev script. ## Problem The `spec/dummy/bin/dev` was a symlink to the template script at `lib/generators/react_on_rails/templates/base/base/bin/dev`, which defaults to `DEFAULT_ROUTE = "hello_world"`. This is incorrect for the dummy app which needs to use the root route `/`. ## Solution Replace the symlink with a wrapper script that: - Calls the base dev script - Forces `--route=/` for the dummy app - Passes through all other command-line arguments ## Test Plan - Verified `bundle exec rubocop` passes with no offenses - Verified `bin/dev --help` works correctly in spec/dummy - Verified file is executable and has correct permissions Generated with Claude Code (https://claude.com/claude-code) <!-- Reviewable:start --> - - - This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/shakacode/react_on_rails/2029) <!-- Reviewable:end --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated internal development script configuration to improve development environment setup. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <[email protected]>
## Summary Replaces the `spec/dummy/bin/dev` symlink with a wrapper script that passes `--route=/` to the base dev script. ## Problem The `spec/dummy/bin/dev` was a symlink to the template script at `lib/generators/react_on_rails/templates/base/base/bin/dev`, which defaults to `DEFAULT_ROUTE = "hello_world"`. This is incorrect for the dummy app which needs to use the root route `/`. ## Solution Replace the symlink with a wrapper script that: - Calls the base dev script - Forces `--route=/` for the dummy app - Passes through all other command-line arguments ## Test Plan - Verified `bundle exec rubocop` passes with no offenses - Verified `bin/dev --help` works correctly in spec/dummy - Verified file is executable and has correct permissions Generated with Claude Code (https://claude.com/claude-code) <!-- Reviewable:start --> - - - This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/shakacode/react_on_rails/2029) <!-- Reviewable:end --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated internal development script configuration to improve development environment setup. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <[email protected]>
Summary
Replaces the
spec/dummy/bin/devsymlink with a wrapper script that passes--route=/to the base dev script.Problem
The
spec/dummy/bin/devwas a symlink to the template script atlib/generators/react_on_rails/templates/base/base/bin/dev, which defaults toDEFAULT_ROUTE = "hello_world". This is incorrect for the dummy app which needs to use the root route/.Solution
Replace the symlink with a wrapper script that:
--route=/for the dummy appTest Plan
bundle exec rubocoppasses with no offensesbin/dev --helpworks correctly in spec/dummyGenerated with Claude Code (https://claude.com/claude-code)
This change is
Summary by CodeRabbit