mongoid-encrypted-fields 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +4 -0
- data/lib/mongoid-encrypted-fields/mongoid4/validatable/uniqueness.rb +1 -2
- data/lib/mongoid-encrypted-fields/version.rb +1 -1
- data/spec/mongoid-encrypted-fields/fields/encrypted_date_spec.rb +1 -1
- data/spec/mongoid-encrypted-fields/fields/encrypted_datetime_spec.rb +1 -1
- data/spec/mongoid-encrypted-fields/fields/encrypted_field_spec.rb +3 -3
- data/spec/mongoid-encrypted-fields/fields/encrypted_hash_spec.rb +1 -1
- data/spec/mongoid-encrypted-fields/fields/encrypted_string_spec.rb +1 -1
- data/spec/mongoid-encrypted-fields/fields/encrypted_time_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjQ0NDFiNjFjYzAxNzg0MTg5NWYzOTU4MmM5NmI1ZTI1NTQzZjM0Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjZkNmExNmU3M2VkMWM0NjNjYTRkNmI1YzA3NjQyYWYzYTlhODlmNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWYwMTU4M2JiZTUzMjU3MTEyMDllN2M2OWE3MzBkN2M0ODQxYTQwMzA5MmY4
|
10
|
+
N2Y0MDhjYWNlMzNlNTBlY2UxNDc3YmIxY2E2NDQyYzg0YmNjOTI2ZTZmODMw
|
11
|
+
MWIyOTJhNWZmZTdhNmQxOGFjZmRiOWQxZjczOWE4M2QyMGFkOTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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!
|
@@ -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
|
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
|
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
|
26
|
+
Mongoid::EncryptedString.is_encrypted?(unencrypted).should be false
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
@@ -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
|
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
|
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.
|
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-
|
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.
|
165
|
+
rubygems_version: 2.4.4
|
166
166
|
signing_key:
|
167
167
|
specification_version: 4
|
168
168
|
summary: Custom types for storing encrypted data
|