I frequently use the :x command in vim to encrypt files on my computer. Recently I've wanted to do some processing on these files in ruby.
I have an app that has all "secrets" in env vars. My idea is actually to just have ONE secret 'password' env var. I'm considering a method for this and future apps where I just have an encrypted file I can keep in source control with all my sensitive data, and then only have to maintain one env var. Not sure how viable it is tho.
Is there a way to read them with ruby, and maybe even save them?
My current idea is to somehow call vi directly from ruby, pass the password in the command, and somehow get the output. I don't know if this is possible, and I'm having trouble finding out if is.
Thanks