lib/sym.rb in sym-2.1.2 vs lib/sym.rb in sym-2.2.0
- old
+ new
@@ -1,19 +1,40 @@
require 'colored2'
require 'zlib'
-require 'coin'
+require 'logger'
require_relative 'sym/configuration'
Sym::Configuration.configure do |config|
config.password_cipher = 'AES-128-CBC'
config.data_cipher = 'AES-256-CBC'
config.private_key_cipher = config.data_cipher
config.compression_enabled = true
config.compression_level = Zlib::BEST_COMPRESSION
+
+ config.password_cache_timeout = 300
+
+ # When nil is selected, providers are auto-detected.
+ config.password_cache_default_provider = nil
+ config.password_cache_arguments = {
+ drb: {
+ opts: {
+ uri: 'druby://127.0.0.1:24924'
+ }
+ },
+ memcached: {
+ args: %w(127.0.0.1:11211),
+ opts: { namespace: 'sym',
+ compress: true,
+ expires_in: config.password_cache_timeout
+ }
+
+ }
+ }
end
+
#
# == Using Sym Library
#
# This library is a "wrapper" that allows you to take advantage of the
# symmetric encryption functionality provided by the {OpenSSL} gem (and the
@@ -115,7 +136,9 @@
BASH_COMPLETION = {
file: File.expand_path('../../bin/sym.completion', __FILE__),
script: "[[ -f '#{COMPLETION_PATH}' ]] && source '#{COMPLETION_PATH}'",
}
+
+ LOGGER = Logger.new(nil) # empty logger
end