encrypt_attr 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 64d1f65f2d3aaf72b3bf4e0fc66b43a2702f80d4
4
- data.tar.gz: 6ee5571af9bf005cf5da3d9d780881dc965194e4
3
+ metadata.gz: bcc38fab2754e7957dd3674e4fbe3437c7e64f5d
4
+ data.tar.gz: 5b7a041d6bba77fd3fc7a69480c12f16acaae2b6
5
5
  SHA512:
6
- metadata.gz: 9b950542fee37e987304b88e58985bb00d26d4825fe223a5fe78926b59122f08ca6e4a16943b564badef324a9a2ae0c353a549a4d5e8bdb7785a95b3ae4af00b
7
- data.tar.gz: 128849e268fd76b0cf6e4a43f02614851fb0084985abd67432a4a9e1bdccc8a4482770c8e1d250a39c4894c3a253245bde6fadc956690d31068ad11933ad424b
6
+ metadata.gz: 3ea7a6a267539aca5149fb3d62b5df9f5a572bae3c489df0c6ed4e30ee24adfda57d2d3c384c86ec4bb27e9349731cbde203cece5fb9a841ac140a7a3e91c952
7
+ data.tar.gz: 392aad7a970e1f23ee1bd82ff44eb6c3e2e0cc4a32abdabba3f5defd78fa5199ab78c91c7a1d96d696a648494e190069caa348f1cb1a5b72a77a311bdaf7d5f3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.1
4
+
5
+ - Ignore empty strings; OpenSSL::Cipher raises exception with it.
6
+
3
7
  ## v0.2.0
4
8
 
5
9
  - Allow custom encryptor per attribute.
@@ -64,7 +64,7 @@ module EncryptAttr
64
64
  define_method "#{attribute}=" do |value|
65
65
  instance_variable_set("@#{attribute}", value)
66
66
  send("encrypted_#{attribute}=", nil)
67
- send("encrypted_#{attribute}=", encryptor.encrypt(secret_token, value)) if value
67
+ send("encrypted_#{attribute}=", encryptor.encrypt(secret_token, value)) if value && value != ""
68
68
  end
69
69
  end
70
70
  end
@@ -1,3 +1,3 @@
1
1
  module EncryptAttr
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encrypt_attr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-25 00:00:00.000000000 Z
11
+ date: 2016-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.4.5.1
167
+ rubygems_version: 2.5.1
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: Encrypt attributes using AES-256-CBC (or your custom encryption strategy).