active_record_encrypted_string 1.2.1 → 1.3.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: 10b1f88b4b3d4290082a4ca3247ec65067fa7ab6284346d4c81dae307e2f0cfd
4
- data.tar.gz: fb75ea77daf623ed6c8768ac0a4dc39cb3fd46ab450c67820d87f92bb6823811
3
+ metadata.gz: eaca94f1fa9afbb362cd25ea0d6a5584f2d8a363f350071c826a8d592d66af13
4
+ data.tar.gz: 6a11f272ee10642e36ab68edd9872e1a9d4cda83970f26541ad40d177a19e04f
5
5
  SHA512:
6
- metadata.gz: 0573d1fde5bc890c8bfea087f52e4b4853a5a2a535232162c1cedeae0106e45a7f33cf34c161a19a7cc3846ad662a8508a1eb1615189dbb7ce95ad570596397d
7
- data.tar.gz: 42b3ce9c64ef2394b3fde99bdfb146964250782de587e9d8524ac85c08ab848c61b3270ee3e5855453057132da7068ef5ae211a9065b3a861354f4887899a296
6
+ metadata.gz: fe606825e0a6bdf75c97dbb86a1d472bc46b2ce53823cb20fbf2a38814c326d522cb7684adbddce375aa65e8f2eff851ba1cff496e6459286aca7db720cf8226
7
+ data.tar.gz: 5191836c70140cdcdfff98b879ab1f40a163222f15d2cad46f3422db0f37e259e8a9c38240deed9cc5169a63d803a44d6e9bcd12a1d8a3bad138c699e48d62af
@@ -2,6 +2,12 @@
2
2
 
3
3
  - [#x](https://github.com/kamillle/active_record_encrypted_string/pull/x) Please describe
4
4
 
5
+ ## 1.3.0
6
+
7
+ - [#13](https://github.com/kamillle/active_record_encrypted_string/pull/16) Override changed_in_place? for handling changes
8
+
9
+ Thanks @ericproulx :heart:
10
+
5
11
  ## 1.2.1
6
12
 
7
13
  - [#13](https://github.com/kamillle/active_record_encrypted_string/pull/13) Replace to rspec-parameterized-context
@@ -28,6 +28,10 @@ module ActiveRecordEncryptedString
28
28
  v.present? ? encryptor.decrypt_and_verify(v) : v
29
29
  end
30
30
 
31
+ def changed_in_place?(raw_old_value, new_value)
32
+ deserialize(raw_old_value) != new_value if new_value.is_a?(::String)
33
+ end
34
+
31
35
  private
32
36
 
33
37
  def encryptor
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordEncryptedString
4
- VERSION = '1.2.1'
4
+ VERSION = '1.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_encrypted_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kamillle
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-14 00:00:00.000000000 Z
11
+ date: 2020-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -193,7 +193,7 @@ metadata:
193
193
  homepage_uri: https://github.com/kamillle/active_record_encrypted_string
194
194
  source_code_uri: https://github.com/kamillle/active_record_encrypted_string
195
195
  changelog_uri: https://github.com/kamillle/active_record_encrypted_string/CHANGELOG.md
196
- post_install_message:
196
+ post_install_message:
197
197
  rdoc_options: []
198
198
  require_paths:
199
199
  - lib
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  version: '0'
210
210
  requirements: []
211
211
  rubygems_version: 3.1.2
212
- signing_key:
212
+ signing_key:
213
213
  specification_version: 4
214
214
  summary: Generates encrypted_string type that transparently encrypt and decrypt string
215
215
  value to ActiveRecord.