diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2019-01-17 18:45:30 +0000 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2019-01-17 19:02:38 +0000 |
commit | f133fdd00e1b74ad99a64a9517d740b1e734e27a (patch) | |
tree | 1e70ba80679ada2862806eaebf54eb49dffee7d1 /railties/lib/rails/commands/encrypted | |
parent | 2dee59fed1e78b983aed4db53dc8fc59e49b9200 (diff) | |
download | rails-f133fdd00e1b74ad99a64a9517d740b1e734e27a.tar.gz rails-f133fdd00e1b74ad99a64a9517d740b1e734e27a.tar.bz2 rails-f133fdd00e1b74ad99a64a9517d740b1e734e27a.zip |
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 68479d09ba6bbd583055672eb70518c1586ae534
Diffstat (limited to 'railties/lib/rails/commands/encrypted')
-rw-r--r-- | railties/lib/rails/commands/encrypted/USAGE | 22 | ||||
-rw-r--r-- | railties/lib/rails/commands/encrypted/encrypted_command.rb | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/encrypted/USAGE b/railties/lib/rails/commands/encrypted/USAGE new file mode 100644 index 0000000000..667af85cd8 --- /dev/null +++ b/railties/lib/rails/commands/encrypted/USAGE @@ -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`. diff --git a/railties/lib/rails/commands/encrypted/encrypted_command.rb b/railties/lib/rails/commands/encrypted/encrypted_command.rb index 8d5947652a..f10a07cdf8 100644 --- a/railties/lib/rails/commands/encrypted/encrypted_command.rb +++ b/railties/lib/rails/commands/encrypted/encrypted_command.rb @@ -16,6 +16,7 @@ module Rails def help say "Usage:\n #{self.class.banner}" say "" + say self.class.desc end end |