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 Extensions
5
- module Encryption
6
- def self.included(base)
7
- base.instance_eval do
8
- def encrypted_property(name, options = {})
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
@@ -5,6 +5,6 @@ require File.expand_path(File.dirname(__FILE__) + "/extensions/encrypted_view_sp
5
5
 
6
6
  module CouchPotato
7
7
  module Extensions
8
- VERSION = '0.0.1'
8
+ VERSION = '0.0.2'
9
9
  end
10
10
  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
 
@@ -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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mathias Meyer