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

Fixes #24964 - Document how to deprecate commands #301

Merged
merged 2 commits into from Apr 17, 2019

Conversation

Projects
None yet
3 participants
@ofedoren
Copy link
Member

commented Apr 2, 2019

Except documentation the fix adds a way to mark a command as deprecated in its definition (in case of subcommand autoloading):

class Command < HammerCLI::AbstractCommand
  deprecation 'This command is deprecated.'
  # ...
  def execute
    # ...
  end
end
@mbacovsky

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

@ofedoren this looks good! I appreciate the added docs 🍺.
I was curious why the option and command does not use consistent names e.g. warning?

@ofedoren

This comment has been minimized.

Copy link
Member Author

commented Apr 16, 2019

@mbacovsky. good question :) I've changed names, so there only warning is used.

@mbacovsky
Copy link
Member

left a comment

@ofedoren thanks. It looks nice and clean now.

@mbacovsky mbacovsky merged commit f9c0e12 into theforeman:master Apr 17, 2019

1 check passed

hammer Build finished. 2277 tests run, 0 skipped, 0 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.