lockbox 0.6.5 → 0.6.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: c45d2348a69188c159cef722e1bcf20cbb47091d41a18dea9aad623479138f9b
4
- data.tar.gz: 62aa904c4dadd24e8fa727f8d7d8e966d2f9aac8494c05185ecee6bb1129de5f
3
+ metadata.gz: 71efd55022975063c04c0a0588532e1bdd5167c7f2e6df5c8cf442362b4d52d6
4
+ data.tar.gz: b823faa4b637c300367032b625972f7d41d0e3e12595921d7474140a955c64c7
5
5
  SHA512:
6
- metadata.gz: f65d019fd987015f246fa3fb901ff23047663cce1a09edeca6e1a69e39e06b6442ec74a12057bc1850704414bfd8ca283da55a1990fa130119faba9df01e136f
7
- data.tar.gz: 98c7b76529683742621eea3e9c16b6cd1666b125720da58e1f3babb79d2e6b717e47de97b7593425d3ae106553d896d720e75a43165a88cd79a92a255a65a223
6
+ metadata.gz: 0d7fd7b285c51ac3f80657ec8956d7cd4692481d33710be69dfa567da02dd2f38de7bef9e4b43962395d9241d7d8c452d01f156e2124d957f52ea9026c0ea14f
7
+ data.tar.gz: 5d62ccbb565e9a3a6e76c1b6df617377bdcd1003289634cd16a2ba4b0e1d1a1ec72966c2a98dae27959e471fdf9ca77fd0755d25bd75ce6bd1e0cd7755819162
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.6.6 (2021-09-27)
2
+
3
+ - Fixed `attribute?` method for `boolean` and `integer` types
4
+
1
5
  ## 0.6.5 (2021-07-07)
2
6
 
3
7
  - Fixed issue with `pluck` extension not loading in some cases
data/lib/lockbox/model.rb CHANGED
@@ -309,6 +309,11 @@ module Lockbox
309
309
  super()
310
310
  end
311
311
  end
312
+
313
+ define_method("#{name}?") do
314
+ # uses public_send, so we don't need to preload attribute
315
+ query_attribute(name)
316
+ end
312
317
  else
313
318
  # keep this module dead simple
314
319
  # Mongoid uses changed_attributes to calculate keys to update
@@ -348,10 +353,10 @@ module Lockbox
348
353
  send("reset_#{encrypted_attribute}_to_default!")
349
354
  send(name)
350
355
  end
351
- end
352
356
 
353
- define_method("#{name}?") do
354
- send("#{encrypted_attribute}?")
357
+ define_method("#{name}?") do
358
+ send("#{encrypted_attribute}?")
359
+ end
355
360
  end
356
361
 
357
362
  define_method("#{name}=") do |message|
@@ -1,3 +1,3 @@
1
1
  module Lockbox
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
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: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-07 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubygems_version: 3.2.3
61
+ rubygems_version: 3.2.22
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: Modern encryption for Ruby and Rails