lib/symmetric_encryption.rb in symmetric-encryption-3.2 vs lib/symmetric_encryption.rb in symmetric-encryption-3.3
- old
+ new
@@ -1,6 +1,10 @@
+# Used for compression
require 'zlib'
+# Used to coerce data types between string and their actual types
+require 'coercible'
+
require 'symmetric_encryption/version'
require 'symmetric_encryption/cipher'
require 'symmetric_encryption/symmetric_encryption'
module SymmetricEncryption
@@ -8,15 +12,9 @@
autoload :Writer, 'symmetric_encryption/writer'
end
if defined?(Rails)
require 'symmetric_encryption/railtie'
end
-# attr_encrypted and Encrypted validator
-if defined?(ActiveRecord::Base)
- require 'symmetric_encryption/extensions/active_record/base'
- require 'symmetric_encryption/railties/symmetric_encryption_validator'
-end
-# field encryption for Mongoid
-if defined?(Mongoid)
- require 'symmetric_encryption/mongoid'
-end
+require 'symmetric_encryption/extensions/active_record/base' if defined?(ActiveRecord::Base)
+require 'symmetric_encryption/railties/symmetric_encryption_validator' if defined?(ActiveModel)
+require 'symmetric_encryption/mongoid' if defined?(Mongoid)