Sha256: b62552749452fb54586a285b5b578fbbc2b2718155765331b6901802e65d02a8

Contents?: true

Size: 691 Bytes

Versions: 2

Compression:

Stored size: 691 Bytes

Contents

require 'mongoid'
require 'byebug'

require_relative '../lib/mongoid/kms'

Mongoid.load!("spec/mongoid.yml", :test)

class MyClass
  include Mongoid::Document
  include Mongoid::Kms

  secure_field :secure, type: String, context: [:unsecure]
  field :unsecure
end

class OtherClass
  include Mongoid::Document
  include Mongoid::Kms

  secure_field :super_secure, type: String, context: [:unsecure, "deployment", :timestamp]
  field :unsecure
  field :timestamp, type: Time
end

class ClassWithoutContext
  include Mongoid::Document
  include Mongoid::Kms

  secure_field :secure, type: String
  field :unsecure
end

Mongoid::Kms.configure({region: "us-east-1", key: ENV['AWS_KMS_KEY_ID']})

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongoid-kms-0.0.19 spec/spec_helper.rb
mongoid-kms-0.0.18 spec/spec_helper.rb