diff options
author | Alberto Almagro <albertoalmagro@gmail.com> | 2018-06-26 22:02:51 +0200 |
---|---|---|
committer | Alberto Almagro <albertoalmagro@gmail.com> | 2018-07-06 22:46:35 +0200 |
commit | 40b209db53796ae515387d0fee2a525872eb2ae4 (patch) | |
tree | 604a386af44a319c9cb136b9e1e260e7c59a4d7c /railties/lib/rails/commands/secrets | |
parent | a0061d2389a178b093f0d3f64f58236ffbe088e0 (diff) | |
download | rails-40b209db53796ae515387d0fee2a525872eb2ae4.tar.gz rails-40b209db53796ae515387d0fee2a525872eb2ae4.tar.bz2 rails-40b209db53796ae515387d0fee2a525872eb2ae4.zip |
Recommend use of rails over bin/rails
As discussed in #33203 rails command already looks for, and runs,
bin/rails if it is present.
We were mixing recommendations within guides and USAGE guidelines,
in some files we recommended using rails, in others bin/rails and
in some cases we even had both options mixed together.
Diffstat (limited to 'railties/lib/rails/commands/secrets')
-rw-r--r-- | railties/lib/rails/commands/secrets/USAGE | 6 | ||||
-rw-r--r-- | railties/lib/rails/commands/secrets/secrets_command.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/commands/secrets/USAGE b/railties/lib/rails/commands/secrets/USAGE index 96e322fe91..e205cdc001 100644 --- a/railties/lib/rails/commands/secrets/USAGE +++ b/railties/lib/rails/commands/secrets/USAGE @@ -7,7 +7,7 @@ with the code. === Setup -Run `bin/rails secrets:setup` to opt in and generate the `config/secrets.yml.key` +Run `rails secrets:setup` to opt in and generate the `config/secrets.yml.key` and `config/secrets.yml.enc` files. The latter contains all the keys to be encrypted while the former holds the @@ -45,12 +45,12 @@ the key. Add this: config.read_encrypted_secrets = true -to the environment you'd like to read encrypted secrets. `bin/rails secrets:setup` +to the environment you'd like to read encrypted secrets. `rails secrets:setup` inserts this into the production environment by default. === Editing Secrets -After `bin/rails secrets:setup`, run `bin/rails secrets:edit`. +After `rails secrets:setup`, run `rails secrets:edit`. That command opens a temporary file in `$EDITOR` with the decrypted contents of `config/secrets.yml.enc` to edit the encrypted secrets. diff --git a/railties/lib/rails/commands/secrets/secrets_command.rb b/railties/lib/rails/commands/secrets/secrets_command.rb index a36ccf314c..3d2c2cc7c6 100644 --- a/railties/lib/rails/commands/secrets/secrets_command.rb +++ b/railties/lib/rails/commands/secrets/secrets_command.rb @@ -22,7 +22,7 @@ module Rails if ENV["EDITOR"].to_s.empty? say "No $EDITOR to open decrypted secrets in. Assign one like this:" say "" - say %(EDITOR="mate --wait" bin/rails secrets:edit) + say %(EDITOR="mate --wait" rails secrets:edit) say "" say "For editors that fork and exit immediately, it's important to pass a wait flag," say "otherwise the secrets will be saved immediately with no chance to edit." @@ -56,7 +56,7 @@ module Rails private def deprecate_in_favor_of_credentials_and_exit say "Encrypted secrets is deprecated in favor of credentials. Run:" - say "bin/rails credentials:help" + say "rails credentials:help" exit 1 end |