mongoid-kms 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cffedc1b6fdd40f2acea4724eb5cb66ed2b94bc2
4
- data.tar.gz: f9cace49c7fcbaa841fb63227e4b092af17fce2f
3
+ metadata.gz: 94eecdfe3a08a0df7c31af9323145764e2f533ea
4
+ data.tar.gz: 987d2308b3ec07529f0fed5601bf54c7a5acebb5
5
5
  SHA512:
6
- metadata.gz: 7a12c1f303e1a6ff655b2aff35dc6aff21e133129834534999199abfa5af5e87535caaa493e7d4edcaf39cf87ff7a2305dff04b8cb5e7f8cca0e24d7ffc9ae03
7
- data.tar.gz: 843812d2f3b1756cb8131f6ca9f38a224390d8a1921482b9c667875ad46d799584841d40e9caec255165b75184170cec21f7a00f5f15e66baa23749101238623
6
+ metadata.gz: 0921f2e89f4c22b5a82b63cdc823578b93d5ed662a95474fece209df225e89c9eadc5cace556e1b68ebb98d6cb55457ee4a5131d2aa23ff3e6c46e1e0863d738
7
+ data.tar.gz: 083bc76dbe8ae66ed2a80358da5e5db509709c7243c9e3180232d79d8d8c8cac866e395aa7d1e5db3797233b486d67c8d48df94529e9fa141bb989ddbc38152c
@@ -52,7 +52,7 @@ module Mongoid
52
52
  # Instance methods
53
53
  def set_kms_values
54
54
  self.class.kms_field_map.each do |field_name, settings|
55
- if self.send("#{field_name}_changed?") || kms_context_value_changed?(field_name)
55
+ if self.new_record? || self.send("#{field_name}_changed?") || kms_context_value_changed?(field_name)
56
56
  encrypted_field_name = self.class.get_encrypted_field_name(field_name)
57
57
 
58
58
  if instance_variable_get("@#{field_name}").nil? && kms_context_value_changed?(field_name)
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Kms
3
- VERSION = "0.0.22"
3
+ VERSION = "0.0.23"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-kms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Winslett