blind_index 2.3.2 → 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: 5a8f12336176bc78927ea8f645fa707e872db1a4523ee00ea5e43e5b6663db19
4
- data.tar.gz: fb0eab6db99944ab6e249f26e2f5f01846127732d23443944a11e2d3bcd05b59
3
+ metadata.gz: cca7398adad9e03afd11dd268f4e69d99abe9ef767d648525ceeaee02aa37ba2
4
+ data.tar.gz: 9ebc3c610a67aace050bffc6724cf7067f734bfe142ff2e0409cd73be66cbbb0
5
5
  SHA512:
6
- metadata.gz: 170b3ce8ee37f46f930c9bc7a16d828bf86c2653d215b05b1d34c93d0f60f1cb6f246f201095be33cff78e2f1c8de440987177e55462f1f5c662fd9b4616ffc7
7
- data.tar.gz: 35690b9711146af73d4dfc4d8b92d7f1562619d2a98212ce9c2d4f6edafc4a785ae2458c5455c12c2fb312d986b1fb0f4df34883987ec1a4840fa49436e3ff26
6
+ metadata.gz: d2bc3c733e12261e561cfb0e82a171c9c995079d20f032dba22f757b07dc23dddadbcc87a20e7c83f7a683f6c6904b2227235aee5e69523168d3df2cb50551ec
7
+ data.tar.gz: ccea3ba949b1643cbbe86f8a2c5fdbd8dc1837334d9db1055bd8cfc0b2f16ea00133029483ea876ddef1c44359f9dec8e1313cbfcd5f727c54f14e803b2110fe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 2.5.0 (2024-06-03)
2
+
3
+ - Added support for Mongoid 9
4
+ - Dropped support for Ruby < 3.1
5
+
6
+ ## 2.4.0 (2023-07-02)
7
+
8
+ - Dropped support for Ruby < 3 and Rails < 6.1
9
+ - Dropped support for Mongoid < 7
10
+
1
11
  ## 2.3.2 (2023-04-26)
2
12
 
3
13
  - Added `key_table` and `key_attribute` options
@@ -72,7 +82,7 @@ Breaking changes
72
82
 
73
83
  - Added `size` option
74
84
  - Added sanity checks for Argon2 cost parameters
75
- - Fixed ActiveRecord callback issues introduced in 0.3.3
85
+ - Fixed Active Record callback issues introduced in 0.3.3
76
86
 
77
87
  ## 0.3.3 (2018-11-12)
78
88
 
@@ -101,13 +111,13 @@ Breaking changes
101
111
 
102
112
  ## 0.2.0 (2018-05-11)
103
113
 
104
- - Added support for ActiveRecord 4.2
114
+ - Added support for Active Record 4.2
105
115
  - Improved validation support when multiple blind indexes
106
116
  - Fixed `nil` handling
107
117
 
108
118
  ## 0.1.1 (2018-04-09)
109
119
 
110
- - Added support for ActiveRecord 5.2
120
+ - Added support for Active Record 5.2
111
121
  - Added `callback` option
112
122
  - Added support for `key` proc
113
123
  - Fixed error inheritance
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2021 Andrew Kane
1
+ Copyright (c) 2017-2023 Andrew Kane
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
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.3.2"
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.3.2
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-04-27 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
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.2'
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: argon2-kdf
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,14 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '2.6'
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