lockbox 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 395cfb4c691d2ddb7280f6b0fe7e0e0bcc663c128a391751d6e2d03087c7c0f8
4
- data.tar.gz: 964271ba8bc79f94c940daf2f90c88da800a03560dde7870d9e69da67eff9e5a
3
+ metadata.gz: 2a238a9d70f5c46cabf8824957f739beb662730a2039696da29b6bc2f7a23462
4
+ data.tar.gz: eaebb7f1bd209792eee41166c6b5878b99ea0ee9436d030bf76ff13c8c56e4e2
5
5
  SHA512:
6
- metadata.gz: 6833415a739d81b5570537616e8181a69d3b333d1f3ce3538e7a6f3f6c4a937611d07769d529f43c601bbf000c99cd55c89375b7a3be5915cb884df1785395ba
7
- data.tar.gz: eb64b479c6564db53d8b02821c987dc391c4c424e52de708f1a7b48308bd6ad381a8a72cd25f85cdbbd32b941f0e634efaa759269db764b9fba9efd3a0e0eea0
6
+ metadata.gz: cc5a1953cbc1493d5eba15ef0d0aed760ee6bd5d0f50e9810d522d57e46e2426f1a8573284834b262208fb6b20638ce15f0f52b5eb1c74dd9f5cc79c9124d6d1
7
+ data.tar.gz: ab01a6601a0317e0182f49bff4410ab232f88a88a5e65b68d20c6b761a38c3777a527d66c6c1fc0896ce23fdeacb493ec5487a494bf310760581f0ab511c3be3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.3.3 (2024-02-07)
2
+
3
+ - Added warning for encrypting store attributes
4
+
1
5
  ## 1.3.2 (2024-01-10)
2
6
 
3
7
  - Fixed issue with serialized attributes
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]
@@ -1,3 +1,3 @@
1
1
  module Lockbox
2
- VERSION = "1.3.2"
2
+ VERSION = "1.3.3"
3
3
  end
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.2
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-01-10 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org