require 'logger' module ActiveRecord module ConnectionAdapters module CipherStashPG module DatabaseExtensions def self.install logger.info("Installing database extension.....") ActiveRecord::Base.connection.execute( ::CipherStashPG.install_script ) logger.info("Database extension installed.") end def self.uninstall logger.info("Uninstalling database extension.....") ActiveRecord::Base.connection.execute( ::CipherStashPG.uninstall_script ) logger.info("Database extension uninstalled.") end private_class_method def self.logger @logger ||= Logger.new(STDOUT) end end end end end