Sha256: 0869fa63c9825ac5152465f038187764f1eab365b5b0cd2f1b935a08fbf26669

Contents?: true

Size: 775 Bytes

Versions: 25

Compression:

Stored size: 775 Bytes

Contents

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

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
activerecord-cipherstash-pg-adapter-0.8.5 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.8.4 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.8.3 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.8.2 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.8.1 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.8.0 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.19 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.18 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.17 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.16 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.15 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.14 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.12 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.11 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.10 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.9 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.8 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.7 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.6 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb
activerecord-cipherstash-pg-adapter-0.7.5 lib/active_record/connection_adapters/cipherstash_pg/database_extensions.rb