couch_potato-extensions 0.0.1 → 0.0.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.
@@ -1,13 +1,11 @@
|
|
1
1
|
require 'ezcrypto'
|
2
2
|
|
3
3
|
module CouchPotato
|
4
|
-
module
|
5
|
-
module
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
properties << CouchPotato::Extensions::EncryptedProperty.new(self, name, options)
|
10
|
-
end
|
4
|
+
module Persistence
|
5
|
+
module Properties
|
6
|
+
module ClassMethods
|
7
|
+
def encrypted_property(name, options = {})
|
8
|
+
properties << CouchPotato::Extensions::EncryptedProperty.new(self, name, options)
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
@@ -3,7 +3,6 @@ require 'spec_helper'
|
|
3
3
|
describe CouchPotato::Extensions::EncryptedProperty do
|
4
4
|
class SecureDocument
|
5
5
|
include CouchPotato::Persistence
|
6
|
-
include CouchPotato::Extensions::Encryption
|
7
6
|
encrypted_property :body, :salt => 'Va7JYeT7t08vMweYU6F6dO', :password => "coffee! more coffee!"
|
8
7
|
end
|
9
8
|
|
data/spec/encrypted_view_spec.rb
CHANGED
@@ -3,7 +3,6 @@ require 'spec_helper'
|
|
3
3
|
describe CouchPotato::Extensions::EncryptedViewSpec do
|
4
4
|
class SecureUser
|
5
5
|
include CouchPotato::Persistence
|
6
|
-
include CouchPotato::Extensions::Encryption
|
7
6
|
encrypted_property :email, :salt => 'Va7JYeT7t08vMweYU6F6dO', :password => "coffee! more coffee!"
|
8
7
|
|
9
8
|
view :by_email, :key => :email, :type => CouchPotato::Extensions::EncryptedViewSpec
|