Module: RailsMasterKeyKmsDecrypter::WithKmsEncryptedConfiguration

Defined in:
lib/rails_master_key_kms_decrypter/railtie.rb

Instance Method Summary collapse

Instance Method Details

#encrypted(path, key_path: 'config/master.key', env_key: 'RAILS_MASTER_KEY') ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/rails_master_key_kms_decrypter/railtie.rb', line 7

def encrypted(path, key_path: 'config/master.key', env_key: 'RAILS_MASTER_KEY')
  RailsMasterKeyKmsDecrypter::KmsEncryptedConfiguration.new(
    config_path: Rails.root.join(path),
    key_path: Rails.root.join(key_path),
    env_key: env_key,
    raise_if_missing_key: config.require_master_key
  )
end