pii_cipher 0.1.0-aarch64-linux → 0.1.1-aarch64-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 946a696c29de9fa7fbf55b5c7d59165dcdb2a2bf8332d9d77c571746ea16c69e
4
- data.tar.gz: 7f0f20452726d1ee859e92172981133418dc4d81e0519057f435b7cb9a0cf78c
3
+ metadata.gz: fc1e403eeae7d04f4234e47da657842a828cc05106e45089b5ed021846b9ccdf
4
+ data.tar.gz: 594365dd799caae9ce779aac2875ee0b5f185722bd6741177d32ce425c1082a6
5
5
  SHA512:
6
- metadata.gz: de8b860ec97b0ec51667f75fa104156646914964f66eda7f87b29699cce3017a68ab30ee56f5e05db6a3cb4b25e950bf36ff0a2ad669406f41932d69d7a4a15c
7
- data.tar.gz: 79fe86eb7acfa4f7b7cf0f63ba4c19cc8a90807977c799d2a8805ef8609747c31c4958311ea0078e3ca478e1ce434b4a3dd072a00a962bd860839ff87cf08f33
6
+ metadata.gz: 553b316af3beeb682c303c3dec56fe68592740e508117c8a49006eebf6e10d24cae611fcc9e027c7d8879ac9a760ac39ad7cd317a790eca79ab094db4c72263a
7
+ data.tar.gz: 2c84b19dfdb8478b2bfb7051ec94f51b8e4d2b6894180f4f4a31cc6e5fd46727d3aa8b8af9b3732ae34168ab3e23b6f62b95846dc130f1175af0905468861c7b
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
- task default: %i[compile spec rubocop]
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
@@ -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
- unless defined?(@_pii_cipher_configured) && @_pii_cipher_configured
53
- before_save :generate_pii_ciphers!
54
- PiiCipher.install_query_patch!
55
- @_pii_cipher_configured = true
56
- end
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PiiCipher
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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
- require_relative "pii_cipher/pii_cipher"
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.0
4
+ version: 0.1.1
5
5
  platform: aarch64-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.2'
86
+ version: '3.3'
86
87
  - - "<"
87
88
  - !ruby/object:Gem::Version
88
- version: 3.4.dev
89
+ version: 4.1.dev
89
90
  required_rubygems_version: !ruby/object:Gem::Requirement
90
91
  requirements:
91
92
  - - ">="