-
Notifications
You must be signed in to change notification settings - Fork 22k
Fix Devcontainer generator with --dev option path error #52705
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
Fix Devcontainer generator with --dev option path error #52705
Conversation
railties/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb
Show resolved
Hide resolved
9f32df7
to
673feaf
Compare
673feaf
to
2f27b66
Compare
Tests for the rest of the generator functionality should probably be added to the new test file? |
2f27b66
to
3ad802a
Compare
The devcontainer generator functionality looks like it has been pretty extensively (albeit indirectly) tested in If you are suggesting that you want to move (or copy/share) those tests over to your new test file, to me (with limited knowledge of this codebase's best practices) the PR looks good as is. There are just enough tests for some sanity checks and testing that the bug has been fixed. |
1aca997
to
dfc38cb
Compare
3f89a06
to
3681358
Compare
This looks good to me. Thanks =) |
3681358
to
7accd04
Compare
Devcontainer generator errors with uninitialized constant Rails::Generators::RAILS_DEV_PATH, which is defined with AppGenerator in .../generators/rails/app/app_generator.rb. Move definition to rails/generators. Co-authored-by: Jerome Dalbert <jerome.dalbert@gmail.com>
7accd04
to
cd6e5d6
Compare
…ev-flag-error Fix Devcontainer generator with --dev option path error
Motivation / Background
Fixes #52704
This Pull Request has been created because the devcontainer generator with the --dev option fails (
rails g devcontainer --dev
). The app generator --dev works just fine.Detail
This Pull request moves the
Rails::Generators::RAILS_DEV_PATH
definition to Rails::Generators module rather than adding it to Rails::Generators in AppGenerator definition. It also creates a DEV_RAILS_PATH constant inrailties/test/generators/generators_test_helper.rb
, so that it can be used consistently in tests.Additional information
rails generate
usage, though it is well tested via app generator. I added tests for the dev option behavior only. I can work on full specs, but will keep it separate from this.Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]