Sha256: b054c7a21d20344c891d3c57fa34fb6fdff4b0260d0840db6243bf866420abba
Contents?: true
Size: 584 Bytes
Versions: 1
Compression:
Stored size: 584 Bytes
Contents
#!/usr/bin/env ruby require 'configliere' DUMP_FILENAME = '/tmp/encrypted_script.yml' Settings.use :config_file, :define, :encrypt_pass => 'password1' Settings.define :password, :encrypted => true Settings :password => 'plaintext' Settings.resolve! p ["saved version will have encrypted password (see #{DUMP_FILENAME}).", Settings.send(:export)] p ['live version still has password in plaintext', Settings] Settings.save!(DUMP_FILENAME) Settings[:password] = 'before read' Settings.read('/tmp/encrypted_script.yml') Settings.resolve! p ["value is decrypted on resolve.", Settings]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
configliere-0.0.3 | examples/encrypted_script.rb |