lib/blind_index.rb in blind_index-2.2.0 vs lib/blind_index.rb in blind_index-2.3.0
- old
+ new
@@ -1,10 +1,12 @@
# dependencies
require "active_support"
-require "openssl"
require "argon2/kdf"
+# stdlib
+require "openssl"
+
# modules
require "blind_index/backfill"
require "blind_index/key_generator"
require "blind_index/model"
require "blind_index/version"
@@ -138,17 +140,11 @@
require "blind_index/extensions"
extend BlindIndex::Model
ActiveRecord::TableMetadata.prepend(BlindIndex::Extensions::TableMetadata)
ActiveRecord::DynamicMatchers::Method.prepend(BlindIndex::Extensions::DynamicMatchers)
-
- unless ActiveRecord::VERSION::STRING.to_f == 5.1
- ActiveRecord::Validations::UniquenessValidator.prepend(BlindIndex::Extensions::UniquenessValidator)
- end
-
- if ActiveRecord::VERSION::STRING.to_f >= 5.2
- ActiveRecord::PredicateBuilder.prepend(BlindIndex::Extensions::PredicateBuilder)
- end
+ ActiveRecord::Validations::UniquenessValidator.prepend(BlindIndex::Extensions::UniquenessValidator)
+ ActiveRecord::PredicateBuilder.prepend(BlindIndex::Extensions::PredicateBuilder)
end
ActiveSupport.on_load(:mongoid) do
require "blind_index/mongoid"
Mongoid::Document::ClassMethods.include(BlindIndex::Model)