Sha256: f9773e20c81b074cab0734a02ba5591914f2b4d5b0b821557e098464d6d10ddd

Contents?: true

Size: 396 Bytes

Versions: 5

Compression:

Stored size: 396 Bytes

Contents

# frozen_string_literal: true

require "sequel"

module AttrKeyring
  module Sequel
    def self.included(target)
      AttrKeyring.setup(target)

      target.class_eval do
        def before_save
          super
          migrate_to_latest_encryption_key
        end

        def keyring_rotate!
          migrate_to_latest_encryption_key
          save
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
attr_keyring-0.7.0 lib/attr_keyring/sequel.rb
attr_keyring-0.6.1 lib/attr_keyring/sequel.rb
attr_keyring-0.6.0 lib/attr_keyring/sequel.rb
attr_keyring-0.5.4 lib/attr_keyring/sequel.rb
attr_keyring-0.5.3 lib/attr_keyring/sequel.rb