blind_index 2.6.0 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +1 -1
- data/lib/blind_index/extensions.rb +11 -3
- data/lib/blind_index/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3974523e6d9e37b26e94da6e224d073d4da563a9844dfea461b8b96ea1194f7d
|
4
|
+
data.tar.gz: c5d0acd3bb4bea2830fcb671ebcb088ef2c44ae44c8284e9ad1f8c3850c840e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1076b81d8534cf0536a54db04dfa9d402e7a8cc3d85d4d821a8c76e187997f10fc11801908a21841cb38c1a4b371dddb2b89a633863c69799d8f555fbacdecb6
|
7
|
+
data.tar.gz: a9ac6a74a631cfa59d5c76fd5782f851d2f2c200e01710b3f445c31ee700abde31fe2efac97cfac2c8596a6d763d2629970f16ba7739a36c4924a83c1aa6547c
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
@@ -14,12 +14,20 @@ module BlindIndex
|
|
14
14
|
# https://github.com/rails/rails/commit/56f30962b84fc53b76001301fb830c1594fd377e
|
15
15
|
def build(attribute, value, *args)
|
16
16
|
if table.has_blind_indexes? && (bi = table.send(:klass).blind_indexes[attribute.name.to_sym]) && !value.is_a?(ActiveRecord::StatementCache::Substitute)
|
17
|
+
model = table.send(:klass)
|
18
|
+
attribute_name = attribute.name.to_sym
|
19
|
+
cast =
|
20
|
+
if model.respond_to?(:normalized_attributes) && model.normalized_attributes.include?(attribute_name)
|
21
|
+
->(v) { model.normalize_value_for(attribute_name, v) }
|
22
|
+
else
|
23
|
+
->(v) { v }
|
24
|
+
end
|
17
25
|
attribute = attribute.relation[bi[:bidx_attribute]]
|
18
26
|
value =
|
19
|
-
if value.is_a?(Array)
|
20
|
-
value.map { |v| BlindIndex.generate_bidx(v, **bi) }
|
27
|
+
if value.is_a?(Array) || (defined?(Set) && value.is_a?(Set))
|
28
|
+
value.map { |v| BlindIndex.generate_bidx(cast.call(v), **bi) }
|
21
29
|
else
|
22
|
-
BlindIndex.generate_bidx(value, **bi)
|
30
|
+
BlindIndex.generate_bidx(cast.call(value), **bi)
|
23
31
|
end
|
24
32
|
end
|
25
33
|
|
data/lib/blind_index/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blind_index
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-23 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -38,7 +37,6 @@ dependencies:
|
|
38
37
|
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
39
|
version: '0.2'
|
41
|
-
description:
|
42
40
|
email: andrew@ankane.org
|
43
41
|
executables: []
|
44
42
|
extensions: []
|
@@ -58,7 +56,6 @@ homepage: https://github.com/ankane/blind_index
|
|
58
56
|
licenses:
|
59
57
|
- MIT
|
60
58
|
metadata: {}
|
61
|
-
post_install_message:
|
62
59
|
rdoc_options: []
|
63
60
|
require_paths:
|
64
61
|
- lib
|
@@ -73,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
70
|
- !ruby/object:Gem::Version
|
74
71
|
version: '0'
|
75
72
|
requirements: []
|
76
|
-
rubygems_version: 3.
|
77
|
-
signing_key:
|
73
|
+
rubygems_version: 3.6.2
|
78
74
|
specification_version: 4
|
79
75
|
summary: Securely search encrypted database fields
|
80
76
|
test_files: []
|