1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Improve output of rails encrypted(:edit/:show) --help

With these simple examples, It will be easier for users to figure out how to use these commands.

Related to 68479d09ba
This commit is contained in:
bogdanvlviv 2019-01-17 18:45:30 +00:00
parent 2dee59fed1
commit f133fdd00e
No known key found for this signature in database
GPG key ID: E4ACD76A6DB6DFDD
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,22 @@
=== Storing Encrypted Files in Source Control
The Rails `encrypted` commands provide access to encrypted files.
=== Editing Files
`rails encrypted:edit config/encrypted_file.yml.enc` opens a temporary file
in `$EDITOR` with the decrypted contents of `config/encrypted_file.yml.enc` to
edit. The encrypted key is either stored in `config/master.key`
or `ENV["RAILS_MASTER_KEY"]` is used, but you can provide relative path
to the encryption key by using `--key` option:
`rails encrypted:edit config/encrypted_file.yml.enc --key config/encrypted_file.key`.
=== Viewing files
`rails encrypted:show config/encrypted_file.yml.enc` prints the decrypted contents of
`config/encrypted_file.yml.enc` file. The encrypted key is either stored in `config/master.key`
or `ENV["RAILS_MASTER_KEY"]` is used, but you can provide relative path
to the encryption key by using `--key` option:
`rails encrypted:show config/encrypted_file.yml.enc --key config/encrypted_file.key`.

View file

@ -16,6 +16,7 @@ module Rails
def help
say "Usage:\n #{self.class.banner}"
say ""
say self.class.desc
end
end