mongoid-encrypted-fields 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGQyOGY5NmI1MzRjMmEzMTA3MTgyOTc2YWQ4Nzk2OTJlNzdjNmM3MQ==
4
+ MjQ0NDFiNjFjYzAxNzg0MTg5NWYzOTU4MmM5NmI1ZTI1NTQzZjM0Yg==
5
5
  data.tar.gz: !binary |-
6
- NGMxNDlkOWNhMDkzMzViMDljMjUzZmZiNWJhYjc4ZDdiNmQ1NTRjMA==
6
+ MjZkNmExNmU3M2VkMWM0NjNjYTRkNmI1YzA3NjQyYWYzYTlhODlmNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODkwNTU5NjAzYmIzNDc1NTM4MjYxMDcwZTYzMGQ4MDNlMmY3MGVlYzM0Njll
10
- MmViNjdkNTkxMThkYmVkOGZhNjk4Mjg2YjFmZmRiYjQ4NzYwOWJhNzk5ZWZk
11
- YjY0ZDI0MTE2NmM2Mjc1M2MwMWNiY2M3OGNiODgxNmI0NDIyOTI=
9
+ MWYwMTU4M2JiZTUzMjU3MTEyMDllN2M2OWE3MzBkN2M0ODQxYTQwMzA5MmY4
10
+ N2Y0MDhjYWNlMzNlNTBlY2UxNDc3YmIxY2E2NDQyYzg0YmNjOTI2ZTZmODMw
11
+ MWIyOTJhNWZmZTdhNmQxOGFjZmRiOWQxZjczOWE4M2QyMGFkOTk=
12
12
  data.tar.gz: !binary |-
13
- Y2NiNDY4NDU4Y2ZiZjk2ZGM0ZGJkYzYxYjk0YjVhZWUwNGY4Mjc3ODI0ZGYz
14
- OTk2ZTkyZDA3MjljNTUyOWY3NTEzODljNmEzZDljZjMyYmM2OWM5Mjc5YTdj
15
- ZmJhOGE4ZjBmYjgzOTgxOTQ4Y2FjOWJlYzYwN2I1MGEzZDNjMjA=
13
+ YzVhZmYxMzg0MTI2ODQyODQ2ZDJiNDAxMGNlNjllMDk1MDI3OWNlNTc5YzUz
14
+ NTQ5NTAzZjczOTA1Yzg1ZjA5NjFmM2Y3MjVkMzA2MjRmMzQyY2M3NmRmMzU3
15
+ YmNhNGE5ODVkMTU4YWI3Yjg2YWJiZjhlYzAyYzllYzA0NGJjYmI=
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Revision history
2
2
 
3
+ ## 1.3.2
4
+ * \#17 Updates due to changes in ActiveModel 4.2
5
+ * Added gemfiles to specifically test Mongoid 4, Mongoid 4 with Rails 4.1, and Mongoid 4 with Rails 4.2
6
+
3
7
  ## 1.3.1
4
8
  * \#14 Updates due to changes in Mongoid 4 and ActiveModel 4
5
9
 
@@ -12,13 +12,12 @@ module Mongoid
12
12
  # Older versions of Mongoid's UniquenessValidator have a klass variable to reference the validating document
13
13
  # This was later replaced in ActiveModel with options[:class]
14
14
  def initialize(options={})
15
+ @klass = options[:class] if options.key?(:class)
15
16
  super
16
- @klass = options[:class]
17
17
  end
18
18
 
19
19
  def setup(klass)
20
20
  @klass = klass
21
- check_validity!
22
21
  end
23
22
 
24
23
  def check_validity!
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module EncryptedFields
3
- VERSION = '1.3.1'
3
+ VERSION = '1.3.2'
4
4
  end
5
5
  end
@@ -39,7 +39,7 @@ module Mongoid
39
39
 
40
40
  it "encrypted date should return unencrypted date" do
41
41
  decrypted = subject.demongoize(encrypted)
42
- decrypted.is_a?(subject).should be_true
42
+ decrypted.is_a?(subject).should be true
43
43
  decrypted.should eq(raw)
44
44
  end
45
45
 
@@ -39,7 +39,7 @@ module Mongoid
39
39
 
40
40
  it "encrypted datetime should return unencrypted datetime" do
41
41
  decrypted = subject.demongoize(encrypted)
42
- decrypted.is_a?(subject).should be_true
42
+ decrypted.is_a?(subject).should be true
43
43
  decrypted.should eq(raw)
44
44
  end
45
45
 
@@ -17,13 +17,13 @@ module Mongoid
17
17
 
18
18
  it "should be able to identify an encrypted string" do
19
19
  plaintext = "this is a test!"
20
- Mongoid::EncryptedString.is_encrypted?(plaintext).should be_false
20
+ Mongoid::EncryptedString.is_encrypted?(plaintext).should be false
21
21
 
22
22
  encrypted = Mongoid::EncryptedString.encrypt(plaintext)
23
- Mongoid::EncryptedString.is_encrypted?(encrypted).should be_true
23
+ Mongoid::EncryptedString.is_encrypted?(encrypted).should be true
24
24
 
25
25
  unencrypted = Mongoid::EncryptedString.decrypt(encrypted)
26
- Mongoid::EncryptedString.is_encrypted?(unencrypted).should be_false
26
+ Mongoid::EncryptedString.is_encrypted?(unencrypted).should be false
27
27
  end
28
28
 
29
29
  end
@@ -39,7 +39,7 @@ module Mongoid
39
39
 
40
40
  it "encrypted hash should return unencrypted hash" do
41
41
  decrypted = subject.demongoize(encrypted)
42
- decrypted.is_a?(subject).should be_true
42
+ decrypted.is_a?(subject).should be true
43
43
  decrypted.should eq(raw.stringify_keys)
44
44
  end
45
45
 
@@ -42,7 +42,7 @@ module Mongoid
42
42
  end
43
43
 
44
44
  it "encrypted string should return instance of Mongoid::EncryptedString" do
45
- Mongoid::EncryptedString.demongoize(encrypted).is_a?(Mongoid::EncryptedString).should be_true
45
+ Mongoid::EncryptedString.demongoize(encrypted).is_a?(Mongoid::EncryptedString).should be true
46
46
  end
47
47
 
48
48
  it "encrypted string should return unencrypted string" do
@@ -39,7 +39,7 @@ module Mongoid
39
39
 
40
40
  it "encrypted time should return unencrypted time" do
41
41
  decrypted = subject.demongoize(encrypted)
42
- decrypted.is_a?(subject).should be_true
42
+ decrypted.is_a?(subject).should be true
43
43
  decrypted.should eq(raw)
44
44
  end
45
45
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-encrypted-fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koan Health
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-21 00:00:00.000000000 Z
11
+ date: 2014-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  version: 1.3.6
163
163
  requirements: []
164
164
  rubyforge_project:
165
- rubygems_version: 2.2.2
165
+ rubygems_version: 2.4.4
166
166
  signing_key:
167
167
  specification_version: 4
168
168
  summary: Custom types for storing encrypted data