Skip to content
Browse files

Merge branch '0.0.3' of https://github.com/basho/ripple-encryption

  • Loading branch information...
2 parents af77c5b + 32ec3bf commit 760091579dfc4eca8f655352c91fdbe141b54055 @randysecrist randysecrist committed
Showing with 3 additions and 6 deletions.
  1. +0 −3 lib/ripple-encryption/{encryption.rb → activation.rb}
  2. +2 −2 test/helper.rb
  3. +1 −1 test/test_unencrypted_document.rb
View
3 lib/ripple-encryption/encryption.rb → lib/ripple-encryption/activation.rb
@@ -2,14 +2,12 @@
require 'ripple'
module Ripple
-
module Encryption
# When mixed into a Ripple::Document class, this will encrypt the
# serialized form before it is stored in Riak. You must register
# a serializer that will perform the encryption.
# @see EncryptedSerializer
- module Encryption
extend ActiveSupport::Concern
@@is_activated = false
@@ -54,7 +52,6 @@ def self.activated
@@is_activated
end
- end
end
end
View
4 test/helper.rb
@@ -21,10 +21,10 @@
raise RuntimeError, "Could not connect to the Riak test node."
end
# define test Ripple Documents
-Ripple::Encryption::Encryption.activate ENV['ENCRYPTION']
+Ripple::Encryption.activate ENV['ENCRYPTION']
class TestDocument
include Ripple::Document
- include Ripple::Encryption::Encryption
+ include Ripple::Encryption
property :message, String
def self.bucket_name
View
2 test/test_unencrypted_document.rb
@@ -13,7 +13,7 @@ class TestMigrationV1ToV2 < MiniTest::Spec
should "write unencrypted document type when content-type is plain" do
document = TestDocument.new
document.message = 'here is some new data'
- Ripple::Encryption::Encryption.class_variable_set(:@@is_activated, false)
+ Ripple::Encryption.class_variable_set(:@@is_activated, false)
document.robject.content_type = 'application/json'
document.save
expected_v2_data = '{"message":"here is some new data","_type":"TestDocument"}'

0 comments on commit 7600915

Please sign in to comment.
Something went wrong with that request. Please try again.