lockbox 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/lockbox/model.rb +6 -6
- data/lib/lockbox/version.rb +1 -1
- data/lib/lockbox.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25557e658cab349f0b1e5875b87f3c0a804a5c3aa587171331c5bdbece0ebf2f
|
4
|
+
data.tar.gz: 6d9d0e425c3c2107e9cdce85880c9b11db16062c68e1f87706c8f70afac6eef0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1df5017733e14858ed3bacb5a480bbe43858974b05a74abe0165d680bb4a6a0e700e49990e5cd8004f8b021c33d6ed0c4edfe3bd5d0e7a02dc114d16894cf02d
|
7
|
+
data.tar.gz: 3d51c407d23036699bf2b3a7813eca85c1004e01ba8edda1bc75b5e0e6a1086e3fe1cbd0593f9cab4b0ce7fd16dd1cc320dd6fac8aead84fdfd436530db0ae5a
|
data/CHANGELOG.md
CHANGED
data/lib/lockbox/model.rb
CHANGED
@@ -543,8 +543,8 @@ module Lockbox
|
|
543
543
|
# do nothing
|
544
544
|
# encrypt will convert to binary
|
545
545
|
else
|
546
|
-
# use original name for serialized attributes
|
547
|
-
type = (try(:attribute_types) || {})[original_name.to_s]
|
546
|
+
# use original name for serialized attributes if no type specified
|
547
|
+
type = (try(:attribute_types) || {})[(options[:type] ? name : original_name).to_s]
|
548
548
|
message = type.serialize(message) if type
|
549
549
|
end
|
550
550
|
end
|
@@ -576,9 +576,9 @@ module Lockbox
|
|
576
576
|
when :time
|
577
577
|
message = ActiveRecord::Type::Time.new.deserialize(message)
|
578
578
|
when :integer
|
579
|
-
message = ActiveRecord::Type::Integer.new(limit: 8).deserialize(message.
|
579
|
+
message = ActiveRecord::Type::Integer.new(limit: 8).deserialize(message.unpack1("q>"))
|
580
580
|
when :float
|
581
|
-
message = ActiveRecord::Type::Float.new.deserialize(message.
|
581
|
+
message = ActiveRecord::Type::Float.new.deserialize(message.unpack1("G"))
|
582
582
|
when :string
|
583
583
|
message.force_encoding(Encoding::UTF_8)
|
584
584
|
when :binary
|
@@ -590,8 +590,8 @@ module Lockbox
|
|
590
590
|
message = IPAddr.new_ntoh(addr.first(len))
|
591
591
|
message.prefix = prefix
|
592
592
|
else
|
593
|
-
# use original name for serialized attributes
|
594
|
-
type = (try(:attribute_types) || {})[original_name.to_s]
|
593
|
+
# use original name for serialized attributes if no type specified
|
594
|
+
type = (try(:attribute_types) || {})[(options[:type] ? name : original_name).to_s]
|
595
595
|
message = type.deserialize(message) if type
|
596
596
|
message.force_encoding(Encoding::UTF_8) if !type || type.is_a?(ActiveModel::Type::String)
|
597
597
|
end
|
data/lib/lockbox/version.rb
CHANGED
data/lib/lockbox.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.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-01 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.
|
61
|
+
rubygems_version: 3.4.1
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: Modern encryption for Ruby and Rails
|