Add ability to generate credentials from cleartext YAML

Hi,

I’m working on a project that will distribute to my customers and they need to configure some third-party tokens,

so I consider I should using credentials.

But credentials isn’t convenient because for security reason I have to let my customers generate their own master key and encrypted credentials,

for now they have to edit credentials with a special format that I given.

before credentials, we usually provides an example template e.g database.yml.example and it’s easy to edit and easy to teach,

so I hope we can use credentials like old way.

I think the good way is adding a command to generate credentials from a cleartext YAML.

so I can bundle a credentials.yml.example to git repo, and customers can just edit it and run a command to generate credentials and master.key.

I’ve already attached a PR https://github.com/rails/rails/pull/34777