Closed rafaelgomesxyz closed 4 months ago
The changes focus on refactoring command execution in multiple files to utilize a new method, run_cpflow_command
, instead of directly calling Cpflow::Cli.start
. This update improves code modularity, reusability, and ensures that common options are consistently forwarded to all commands, addressing the issues raised in the linked problem.
File | Change Summary |
---|---|
lib/command/... |
Replaced direct calls to Cpflow::Cli.start with run_cpflow_command in various methods, including start , stop , apply-template , deploy-image . |
spec/command/setup_app_spec.rb |
Added context to test forwarding organization in apply-template command. |
spec/dummy/.controlplane/controlplane.yml |
Introduced a key setup_app_templates for enabling setup app templates. |
Objective | Addressed | Explanation |
---|---|---|
Common options are not forwarded to other commands (#206) | ✅ |
In the world of code, a command anew, A method named
run_cpflow_command
grew. Options are forwarded without any dread, Errors resolved, the bugs all fled. Modules now clean, reusability in tow, Cheers to the team, with a codebase aglow! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
ready to merge?
@justin808 Yes
Fixes #206
Summary by CodeRabbit
Refactor
Cpflow::Cli.start
with a newrun_cpflow_command
method across multiple command files. This improves modularity and reusability.Tests
setup_app_spec.rb
to forward the organization correctly to theapply-template
command and verify expected behavior.Chores
controlplane.yml
for thedummy
application to include thesetup_app_templates
key, enabling setup app templates.