active_record-pgcrypto 0.2.5 → 0.2.6

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: 720cc8894659947200a913bee9a2757ddb9b31f993dd5a710d0a4dba781c3f95
4
- data.tar.gz: e4309d8fe0032d489a205158bd37768cc867aaa8adf8e0999ffbf20ee32082bf
3
+ metadata.gz: 97344e7536d8cae65d07a9367efb4fbafd5c7b2a184a954fc0fa3d1dc9a43240
4
+ data.tar.gz: 94da041a559e67ea37ce3a97052090dbc6f368d5d9106bbe93509ee089689447
5
5
  SHA512:
6
- metadata.gz: 146fbaa31f74481b715ae9dec906bf5f556ad23881a5c0a7d8510cd5869500104ad4d211b0c273499f60aa9d6c9e5a12c24a7e1da1c4a6dd7c7294494b585d9d
7
- data.tar.gz: 7e534fd989099428241b88f64822c55b75f8e6a2e7a923c03f002c4353dd76b0dfbc34be8d108f29f883911c2598af9074122d87b9002937c717003c3043f231
6
+ metadata.gz: 31bff89b5403e6ade89f4fa80cf770f115d3356523b9841f296deb921e4ded9b1b148e151c2a7994ca4d35ed75410a46a60c6fa2c59b1645be2fdf58c45e0bc2
7
+ data.tar.gz: 4406389b8f07e536c17276d53bb3c3c73a74e967f8a17cea0e40d496dd46e5575b7a6c6c41033098df22d3f303a7650784b3e2a3a4662ef3ce1bad5015ac65ec
data/README.md CHANGED
@@ -71,6 +71,8 @@ class MyModel < ActiveRecord::Base
71
71
  end
72
72
  ```
73
73
 
74
+ NOTE: In order for the encrypted data to be store the column must be of type `binary`.
75
+
74
76
  The coder provides a simple API to help you provide search support by
75
77
  leveraging the Arel API:
76
78
 
@@ -12,11 +12,7 @@ module ActiveRecord
12
12
  #
13
13
  # @return [NilClass]
14
14
  def sql(event)
15
- scrubbed_sql = event.payload[:sql].gsub(REGEXP) do |_|
16
- "#{$LAST_MATCH_INFO[:operation]}(#{PLACEHOLDER})"
17
- end
18
-
19
- event.payload[:sql] = scrubbed_sql
15
+ event.payload[:sql] = event.payload[:sql].gsub(REGEXP, PLACEHOLDER)
20
16
 
21
17
  super(event)
22
18
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module PGCrypto
3
- VERSION = '0.2.5'.freeze
3
+ VERSION = '0.2.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record-pgcrypto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas SUȘCOV
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-09 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord