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

Add coffee disable and coffee enable Commands #240

Merged
merged 4 commits into from
Feb 13, 2024

Conversation

tareknaser
Copy link
Collaborator

Description

This PR adds support for coffee disable and coffee enable commands, allowing users to toggle plugin status without complete uninstallation.
The implementation ensures backward compatibility by making the new field "enabled" optional in the plugin struct.

Closes #102

Changes made

  • Implemented disable and enable methods for CoffeeManager
  • Added CLI commands coffee enable/disable <plugin_name>
  • Included HTTP endpoints for the new commands
  • Updated documentation

To Do

- Added the enabled field in the plugin struct to track plugin status
- Plugins are now set as enabled by default upon installation
- Modified coffee list to display the enabled status of each plugin
- For backward compatibility, assume plugins are enabled if plugin.enabled is None

This sets the groundwork for implementing coffee enable and coffee disablecommands

Signed-off-by: Tarek <[email protected]>
This commit introduces coffee disable and coffee enable commands, enabling users to toggle plugin status without complete uninstallation.

Additionally, it includes the implementation of corresponding methods in CoffeeManager and updates to CLI commands and documentation.

Signed-off-by: Tarek <[email protected]>
Copy link

netlify bot commented Feb 10, 2024

Deploy Preview for coffee-docs canceled.

Name Link
🔨 Latest commit df37de5
🔍 Latest deploy log https://app.netlify.com/sites/coffee-docs/deploys/65ca92bfe72dc200087045a5

Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

we are missing test (we can avoid the httpd test btw) for this feature

coffee_cmd/src/coffee_term/command_show.rs Outdated Show resolved Hide resolved
coffee_lib/src/plugin.rs Outdated Show resolved Hide resolved
coffee_cmd/src/cmd.rs Show resolved Hide resolved
coffee_core/src/coffee.rs Outdated Show resolved Hide resolved
coffee_core/src/coffee.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@vincenzopalazzo vincenzopalazzo merged commit 6a1746e into coffee-tools:master Feb 13, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce coffee disable and coffee enable Commands
2 participants