blind_index 2.4.0 → 2.5.0

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: 4b195e7760fae1745c7040aa94f90ab4b2ec5c57593e6ae3db445d0a45461f8b
4
- data.tar.gz: bf8b47a67e61d433ae430e8d7d4534450917811a96e9ec3b07c30e3e75d67427
3
+ metadata.gz: cca7398adad9e03afd11dd268f4e69d99abe9ef767d648525ceeaee02aa37ba2
4
+ data.tar.gz: 9ebc3c610a67aace050bffc6724cf7067f734bfe142ff2e0409cd73be66cbbb0
5
5
  SHA512:
6
- metadata.gz: d06adf905e5a22b54a85bb787a71da0d2e422e395265c2cd1892ef7172fc93a4415ed72607be6ee4fa8886b0286391abaf346e4450f303a8aec711c620924e89
7
- data.tar.gz: 1db6a651cd9fd09f159e09cfb03aed1cd9fea783c55f3a7f2e76bdc1f0a986581ee3b4798857febd51c493273dd1fd9baa83e124f7e8484f29da851eb69d3a79
6
+ metadata.gz: d2bc3c733e12261e561cfb0e82a171c9c995079d20f032dba22f757b07dc23dddadbcc87a20e7c83f7a683f6c6904b2227235aee5e69523168d3df2cb50551ec
7
+ data.tar.gz: ccea3ba949b1643cbbe86f8a2c5fdbd8dc1837334d9db1055bd8cfc0b2f16ea00133029483ea876ddef1c44359f9dec8e1313cbfcd5f727c54f14e803b2110fe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 2.5.0 (2024-06-03)
2
+
3
+ - Added support for Mongoid 9
4
+ - Dropped support for Ruby < 3.1
5
+
1
6
  ## 2.4.0 (2023-07-02)
2
7
 
3
8
  - Dropped support for Ruby < 3 and Rails < 6.1
@@ -77,7 +82,7 @@ Breaking changes
77
82
 
78
83
  - Added `size` option
79
84
  - Added sanity checks for Argon2 cost parameters
80
- - Fixed ActiveRecord callback issues introduced in 0.3.3
85
+ - Fixed Active Record callback issues introduced in 0.3.3
81
86
 
82
87
  ## 0.3.3 (2018-11-12)
83
88
 
@@ -106,13 +111,13 @@ Breaking changes
106
111
 
107
112
  ## 0.2.0 (2018-05-11)
108
113
 
109
- - Added support for ActiveRecord 4.2
114
+ - Added support for Active Record 4.2
110
115
  - Improved validation support when multiple blind indexes
111
116
  - Fixed `nil` handling
112
117
 
113
118
  ## 0.1.1 (2018-04-09)
114
119
 
115
- - Added support for ActiveRecord 5.2
120
+ - Added support for Active Record 5.2
116
121
  - Added `callback` option
117
122
  - Added support for `key` proc
118
123
  - Fixed error inheritance
data/README.md CHANGED
@@ -6,7 +6,7 @@ Works with [Lockbox](https://github.com/ankane/lockbox) ([full example](https://
6
6
 
7
7
  Learn more about [securing sensitive data in Rails](https://ankane.org/sensitive-data-rails)
8
8
 
9
- [![Build Status](https://github.com/ankane/blind_index/workflows/build/badge.svg?branch=master)](https://github.com/ankane/blind_index/actions)
9
+ [![Build Status](https://github.com/ankane/blind_index/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/blind_index/actions)
10
10
 
11
11
  ## How It Works
12
12
 
@@ -4,7 +4,7 @@ module BlindIndex
4
4
 
5
5
  def initialize(relation, batch_size:, columns:)
6
6
  @relation = relation
7
- @transaction = @relation.respond_to?(:transaction)
7
+ @transaction = @relation.respond_to?(:transaction) && !mongoid_relation?(relation.all)
8
8
  @batch_size = batch_size
9
9
  @blind_indexes = @relation.blind_indexes
10
10
  filter_columns!(columns) if columns
@@ -100,6 +100,10 @@ module BlindIndex
100
100
  end
101
101
  end
102
102
 
103
+ def mongoid_relation?(relation)
104
+ defined?(Mongoid::Criteria) && relation.is_a?(Mongoid::Criteria)
105
+ end
106
+
103
107
  def with_transaction
104
108
  if @transaction
105
109
  @relation.transaction do
@@ -1,3 +1,3 @@
1
1
  module BlindIndex
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blind_index
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-02 00:00:00.000000000 Z
11
+ date: 2024-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -66,14 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '3'
69
+ version: '3.1'
70
70
  required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.4.10
76
+ rubygems_version: 3.5.9
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Securely search encrypted database fields