class Rails::Generators::EncryptedFileGenerator
:nodoc:
def add_encrypted_file_silently(file_path, key_path, template = encrypted_file_template)
def add_encrypted_file_silently(file_path, key_path, template = encrypted_file_template) unless File.exist?(file_path) ActiveSupport::EncryptedFile.new( content_path: file_path, key_path: key_path, env_key: "RAILS_MASTER_KEY", raise_if_missing_key: true ).write(template) end end
def encrypted_file_template
def encrypted_file_template <<~YAML # aws: # access_key_id: 123 # secret_access_key: 345 YAML end