pii_cipher 0.1.0-x86_64-linux → 0.1.1-x86_64-linux
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Rakefile +15 -18
- data/lib/pii_cipher/3.3/pii_cipher.so +0 -0
- data/lib/pii_cipher/3.4/pii_cipher.so +0 -0
- data/lib/pii_cipher/{3.2 → 4.0}/pii_cipher.so +0 -0
- data/lib/pii_cipher/active_record_ext.rb +5 -5
- data/lib/pii_cipher/version.rb +1 -1
- data/lib/pii_cipher.rb +10 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87e810ae0af418e9643b1486e69cdaf3f11631e48c47a825a38529428a0afd83
|
|
4
|
+
data.tar.gz: 8874a360c392a7d054b81dc9dd9c0fd45b508e27bdabd537d48e2f6546e232e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2651cfe168a062c6373f8b1095aa0cdd80eb67a6a3268cad084668c729f4743d744d641970d80467f6451ce373c55039c7efe1b04471d14edff3eab4122bbabc
|
|
7
|
+
data.tar.gz: 31b37783d26a31dd786f6aed9c58820d6029701df47d1930fb568841c3603dc88b5f15d89f14a0c1c2f89c319553a99239e45157c8c8aa89131acc5bae94bdb1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.1.1] - 2026-06-29
|
|
4
|
+
|
|
5
|
+
- Fix precompiled-gem loading: `lib/pii_cipher.rb` now resolves the native binary
|
|
6
|
+
from its per-Ruby-ABI subdirectory (`lib/pii_cipher/<ver>/`), falling back to the
|
|
7
|
+
flat path for source builds. v0.1.0 precompiled gems failed to load with a
|
|
8
|
+
`LoadError` because no version-aware require existed.
|
|
9
|
+
- Widen precompiled coverage to every platform and stable Ruby version the rb-sys
|
|
10
|
+
toolchain supports (now including Ruby 3.4 and 4.0 and the linux-musl/Alpine
|
|
11
|
+
targets), so installing on the latest Ruby no longer falls back to a source build.
|
|
12
|
+
|
|
13
|
+
## Pre-0.1.1 unreleased changes
|
|
14
|
+
|
|
3
15
|
- Case-insensitive search by default (values are downcased before hashing); opt out with `case_sensitive: true`.
|
|
4
16
|
- Configurable partial-search window via `gram_size:` (default 3).
|
|
5
17
|
- Query rewriting now works on chained relations and scopes, not just direct `Model.where` calls.
|
data/Rakefile
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "bundler/gem_tasks"
|
|
4
|
-
require "rspec/core/rake_task"
|
|
5
|
-
|
|
6
|
-
RSpec::Core::RakeTask.new(:spec)
|
|
7
|
-
|
|
8
|
-
require "rubocop/rake_task"
|
|
9
|
-
|
|
10
|
-
RuboCop::RakeTask.new
|
|
11
|
-
|
|
12
4
|
require "rb_sys/extensiontask"
|
|
13
5
|
|
|
14
6
|
task build: :compile
|
|
@@ -17,18 +9,23 @@ GEMSPEC = Gem::Specification.load("pii_cipher.gemspec")
|
|
|
17
9
|
|
|
18
10
|
RbSys::ExtensionTask.new("pii_cipher", GEMSPEC) do |ext|
|
|
19
11
|
ext.lib_dir = "lib/pii_cipher"
|
|
20
|
-
ext.cross_compile = true
|
|
21
|
-
ext.cross_platform = %w[
|
|
22
|
-
x86_64-linux
|
|
23
|
-
aarch64-linux
|
|
24
|
-
x86_64-darwin
|
|
25
|
-
arm64-darwin
|
|
26
|
-
x64-mingw-ucrt
|
|
27
|
-
]
|
|
28
12
|
ext.cross_compiling do |spec|
|
|
29
|
-
# rb_sys is only needed to compile from source; pre-built gems don't need it
|
|
13
|
+
# rb_sys is only needed to compile from source; pre-built gems don't need it.
|
|
30
14
|
spec.dependencies.reject! { |dep| dep.name == "rb_sys" }
|
|
31
15
|
end
|
|
32
16
|
end
|
|
33
17
|
|
|
34
|
-
|
|
18
|
+
# The dev/test tasks below need gems that are absent inside the cross-compile
|
|
19
|
+
# build container (rb-sys-dock installs only the runtime deps). Guard them so
|
|
20
|
+
# the Rakefile still loads there and `rake native` / `rake compile` work.
|
|
21
|
+
begin
|
|
22
|
+
require "rspec/core/rake_task"
|
|
23
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
24
|
+
|
|
25
|
+
require "rubocop/rake_task"
|
|
26
|
+
RuboCop::RakeTask.new
|
|
27
|
+
|
|
28
|
+
task default: %i[compile spec rubocop]
|
|
29
|
+
rescue LoadError
|
|
30
|
+
task default: :compile
|
|
31
|
+
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -49,11 +49,11 @@ module PiiCipher
|
|
|
49
49
|
self.pii_cipher_configs = pii_cipher_configs.merge(new_configs)
|
|
50
50
|
|
|
51
51
|
# Install callbacks and the query patch once per model.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
return if defined?(@_pii_cipher_configured) && @_pii_cipher_configured
|
|
53
|
+
|
|
54
|
+
before_save :generate_pii_ciphers!
|
|
55
|
+
PiiCipher.install_query_patch!
|
|
56
|
+
@_pii_cipher_configured = true
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
data/lib/pii_cipher/version.rb
CHANGED
data/lib/pii_cipher.rb
CHANGED
|
@@ -6,7 +6,16 @@ require_relative "pii_cipher/version"
|
|
|
6
6
|
# 1. Load the compiled Rust extension. It defines:
|
|
7
7
|
# PiiCipher.generate_ngram_hashes(text, secret, n) -> [hash, ...]
|
|
8
8
|
# PiiCipher.generate_blind_index(text, secret) -> hash
|
|
9
|
-
|
|
9
|
+
#
|
|
10
|
+
# Precompiled (native) gems ship the binary in a per-Ruby-ABI subdirectory
|
|
11
|
+
# (lib/pii_cipher/3.3/pii_cipher.bundle) so one gem can serve several Ruby
|
|
12
|
+
# versions. Source builds compile straight into lib/pii_cipher/pii_cipher.*.
|
|
13
|
+
# Try the version-specific path first, then fall back to the flat one.
|
|
14
|
+
begin
|
|
15
|
+
require_relative "pii_cipher/#{RUBY_VERSION[/\d+\.\d+/]}/pii_cipher"
|
|
16
|
+
rescue LoadError
|
|
17
|
+
require_relative "pii_cipher/pii_cipher"
|
|
18
|
+
end
|
|
10
19
|
|
|
11
20
|
# 2. Load our Ruby logic
|
|
12
21
|
require_relative "pii_cipher/active_record_ext"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pii_cipher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Selva Chezhian
|
|
@@ -58,8 +58,9 @@ files:
|
|
|
58
58
|
- Rakefile
|
|
59
59
|
- benchmarks/run.rb
|
|
60
60
|
- lib/pii_cipher.rb
|
|
61
|
-
- lib/pii_cipher/3.2/pii_cipher.so
|
|
62
61
|
- lib/pii_cipher/3.3/pii_cipher.so
|
|
62
|
+
- lib/pii_cipher/3.4/pii_cipher.so
|
|
63
|
+
- lib/pii_cipher/4.0/pii_cipher.so
|
|
63
64
|
- lib/pii_cipher/active_record_ext.rb
|
|
64
65
|
- lib/pii_cipher/query_interceptor.rb
|
|
65
66
|
- lib/pii_cipher/railtie.rb
|
|
@@ -82,10 +83,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
82
83
|
requirements:
|
|
83
84
|
- - ">="
|
|
84
85
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: '3.
|
|
86
|
+
version: '3.3'
|
|
86
87
|
- - "<"
|
|
87
88
|
- !ruby/object:Gem::Version
|
|
88
|
-
version:
|
|
89
|
+
version: 4.1.dev
|
|
89
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
91
|
requirements:
|
|
91
92
|
- - ">="
|