Skip to content

Conversation

jonathanhefner
Copy link
Member

This removes the custom help implementation from EncryptedCommand in favor of Thor's help implementation.

Before

$ bin/rails encrypted --help
Usage:
  bin/rails encrypted

=== Storing Encrypted Files in Source Control

The Rails `encrypted` commands provide access to encrypted files or configurations.
...

$ bin/rails encrypted:edit --help
Usage:
  bin/rails encrypted

=== Storing Encrypted Files in Source Control

The Rails `encrypted` commands provide access to encrypted files or configurations.
...

After

$ bin/rails encrypted --help
Commands:
  bin/rails encrypted:edit            # Open the decrypted file in `$EDITOR` for editing
  bin/rails encrypted:help [COMMAND]  # Describe available commands or one specific command
  bin/rails encrypted:show            # Show the decrypted contents of the file

Options:
  -k, [--key=KEY]  # The Rails.root relative path to the encryption key
                   # Default: config/master.key

=== Storing Encrypted Files in Source Control

The Rails `encrypted` commands provide access to encrypted files or configurations.
...

$ bin/rails encrypted:edit --help # OR bin/rails encrypted:help edit
Usage:
  bin/rails encrypted:edit

Options:
  -k, [--key=KEY]  # The Rails.root relative path to the encryption key
                   # Default: config/master.key

Open the decrypted file in `$EDITOR` for editing

This removes the custom `help` implementation from `EncryptedCommand` in
favor of Thor's `help` implementation.

__Before__

  ```console
  $ bin/rails encrypted --help
  Usage:
    bin/rails encrypted

  === Storing Encrypted Files in Source Control

  The Rails `encrypted` commands provide access to encrypted files or configurations.
  ...

  $ bin/rails encrypted:edit --help
  Usage:
    bin/rails encrypted

  === Storing Encrypted Files in Source Control

  The Rails `encrypted` commands provide access to encrypted files or configurations.
  ...
  ```

__After__

  ```console
  $ bin/rails encrypted --help
  Commands:
    bin/rails encrypted:edit            # Open the decrypted file in `$EDITOR` for editing
    bin/rails encrypted:help [COMMAND]  # Describe available commands or one specific command
    bin/rails encrypted:show            # Show the decrypted contents of the file

  Options:
    -k, [--key=KEY]  # The Rails.root relative path to the encryption key
                     # Default: config/master.key

  === Storing Encrypted Files in Source Control

  The Rails `encrypted` commands provide access to encrypted files or configurations.
  ...

  $ bin/rails encrypted:edit --help # OR bin/rails encrypted:help edit
  Usage:
    bin/rails encrypted:edit

  Options:
    -k, [--key=KEY]  # The Rails.root relative path to the encryption key
                     # Default: config/master.key

  Open the decrypted file in `$EDITOR` for editing
  ```
@rails-bot rails-bot bot added the railties label Feb 2, 2023
@jonathanhefner jonathanhefner merged commit 41138ab into rails:main Feb 2, 2023
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.

1 participant