diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-03-11 20:42:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 20:42:36 +0100 |
commit | 7874257afd15b07169925405a0253570787362a6 (patch) | |
tree | d0b63fc7e8390617e4e12fede2dec1e4fd9e1b87 /railties | |
parent | 878e98091d93603e07620ca9177f58a880ab9cb8 (diff) | |
parent | f133fdd00e1b74ad99a64a9517d740b1e734e27a (diff) | |
download | rails-7874257afd15b07169925405a0253570787362a6.tar.gz rails-7874257afd15b07169925405a0253570787362a6.tar.bz2 rails-7874257afd15b07169925405a0253570787362a6.zip |
Merge pull request #34965 from bogdanvlviv/improve-rails-encrypted--help
Improve output of `rails encrypted(:edit/:show) --help`
Diffstat (limited to 'railties')
-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 |