lockbox 1.3.1 → 1.3.3
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 +8 -0
- data/README.md +2 -0
- data/lib/lockbox/model.rb +8 -0
- data/lib/lockbox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a238a9d70f5c46cabf8824957f739beb662730a2039696da29b6bc2f7a23462
|
4
|
+
data.tar.gz: eaebb7f1bd209792eee41166c6b5878b99ea0ee9436d030bf76ff13c8c56e4e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc5a1953cbc1493d5eba15ef0d0aed760ee6bd5d0f50e9810d522d57e46e2426f1a8573284834b262208fb6b20638ce15f0f52b5eb1c74dd9f5cc79c9124d6d1
|
7
|
+
data.tar.gz: ab01a6601a0317e0182f49bff4410ab232f88a88a5e65b68d20c6b761a38c3777a527d66c6c1fc0896ce23fdeacb493ec5487a494bf310760581f0ab511c3be3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.3.3 (2024-02-07)
|
2
|
+
|
3
|
+
- Added warning for encrypting store attributes
|
4
|
+
|
5
|
+
## 1.3.2 (2024-01-10)
|
6
|
+
|
7
|
+
- Fixed issue with serialized attributes
|
8
|
+
|
1
9
|
## 1.3.1 (2024-01-06)
|
2
10
|
|
3
11
|
- Fixed error with `array` and `hash` types and no default column serializer with Rails 7.1
|
data/README.md
CHANGED
@@ -140,6 +140,8 @@ class User < ApplicationRecord
|
|
140
140
|
end
|
141
141
|
```
|
142
142
|
|
143
|
+
For [Active Record Store](https://api.rubyonrails.org/classes/ActiveRecord/Store.html), encrypt the column rather than individual accessors.
|
144
|
+
|
143
145
|
For [StoreModel](https://github.com/DmitryTsepelev/store_model), use:
|
144
146
|
|
145
147
|
```ruby
|
data/lib/lockbox/model.rb
CHANGED
@@ -289,6 +289,11 @@ module Lockbox
|
|
289
289
|
@lockbox_attributes[original_name] = options
|
290
290
|
|
291
291
|
if activerecord
|
292
|
+
# warn on store attributes
|
293
|
+
if stored_attributes.any? { |k, v| v.include?(name) }
|
294
|
+
warn "[lockbox] WARNING: encrypting store accessors is not supported. Encrypt the column instead."
|
295
|
+
end
|
296
|
+
|
292
297
|
# warn on default attributes
|
293
298
|
if attributes_to_define_after_schema_loads.key?(name.to_s)
|
294
299
|
opt = attributes_to_define_after_schema_loads[name.to_s][1]
|
@@ -509,6 +514,9 @@ module Lockbox
|
|
509
514
|
clear_attribute_change(name)
|
510
515
|
end
|
511
516
|
end
|
517
|
+
|
518
|
+
# ensure same object is returned as next call
|
519
|
+
message = super()
|
512
520
|
else
|
513
521
|
instance_variable_set("@#{name}", message)
|
514
522
|
end
|
data/lib/lockbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: andrew@ankane.org
|