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:
parent
2dee59fed1
commit
f133fdd00e
2 changed files with 23 additions and 0 deletions
22
railties/lib/rails/commands/encrypted/USAGE
Normal file
22
railties/lib/rails/commands/encrypted/USAGE
Normal 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`.
|
|
@ -16,6 +16,7 @@ module Rails
|
|||
def help
|
||||
say "Usage:\n #{self.class.banner}"
|
||||
say ""
|
||||
say self.class.desc
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue