Skip to content
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 deeply nested namespace command printing #35033

Merged

Conversation

gmcgibbon
Copy link
Member

Summary

Deeply nested commands currently don't get printed properly. See #34832 (comment). This should fix that by allowing Rails::Command::Base#command_root_namespace to include nested namespace segments, and not just the first one.

I tried making it so command_root_namespace excluded the command_name as well, but that didn't play nicely with method-based command definition (eg. SecretsCommand). The regex I use in namespaced_commands is probably not the best approach, any feedback here would be appreciated.

@rails-bot rails-bot bot added the railties label Jan 23, 2019
@gmcgibbon gmcgibbon force-pushed the multilevel_command_root_namespace branch from 6304b25 to 0a955e3 Compare January 23, 2019 22:36
Copy link
Contributor

@bogdanvlviv bogdanvlviv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

railties/CHANGELOG.md Show resolved Hide resolved
@gmcgibbon gmcgibbon force-pushed the multilevel_command_root_namespace branch from 0a955e3 to a670654 Compare January 24, 2019 17:28
@rafaelfranca rafaelfranca merged commit 1e25dfd into rails:master Jan 24, 2019
@gmcgibbon gmcgibbon deleted the multilevel_command_root_namespace branch January 24, 2019 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants