attr_encrypted 3.1.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +13 -51
- data/CHANGELOG.md +42 -18
- data/README.md +12 -5
- data/Rakefile +2 -0
- data/attr_encrypted.gemspec +5 -17
- data/checksum/attr_encrypted-3.1.0.gem.sha256 +1 -0
- data/checksum/attr_encrypted-3.1.0.gem.sha512 +1 -0
- data/lib/attr_encrypted/adapters/active_record.rb +31 -18
- data/lib/attr_encrypted/adapters/data_mapper.rb +3 -1
- data/lib/attr_encrypted/adapters/sequel.rb +3 -1
- data/lib/attr_encrypted/version.rb +4 -2
- data/lib/attr_encrypted.rb +41 -29
- data/test/active_record_test.rb +55 -56
- data/test/attr_encrypted_test.rb +31 -10
- data/test/compatibility_test.rb +2 -0
- data/test/data_mapper_test.rb +2 -0
- data/test/legacy_active_record_test.rb +2 -0
- data/test/legacy_attr_encrypted_test.rb +8 -6
- data/test/legacy_compatibility_test.rb +2 -0
- data/test/legacy_data_mapper_test.rb +2 -0
- data/test/legacy_sequel_test.rb +2 -0
- data/test/run.sh +15 -7
- data/test/sequel_test.rb +2 -0
- data/test/test_helper.rb +4 -5
- metadata +29 -60
- checksums.yaml.gz.sig +0 -1
- data/certs/saghaulor.pem +0 -21
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -1
data/test/active_record_test.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'test_helper'
|
2
4
|
|
5
|
+
RAILS_VERSION = Gem::Version.new(::ActiveRecord::VERSION::STRING).freeze
|
3
6
|
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
|
4
7
|
|
5
8
|
def create_tables
|
@@ -43,16 +46,14 @@ end
|
|
43
46
|
|
44
47
|
ActiveRecord::MissingAttributeError = ActiveModel::MissingAttributeError unless defined?(ActiveRecord::MissingAttributeError)
|
45
48
|
|
46
|
-
|
47
|
-
module
|
48
|
-
|
49
|
-
class UploadedFile; end
|
50
|
-
end
|
49
|
+
module Rack
|
50
|
+
module Test
|
51
|
+
class UploadedFile; end
|
51
52
|
end
|
52
|
-
|
53
|
-
require 'action_controller/metal/strong_parameters'
|
54
53
|
end
|
55
54
|
|
55
|
+
require 'action_controller/metal/strong_parameters'
|
56
|
+
|
56
57
|
class Person < ActiveRecord::Base
|
57
58
|
self.attr_encrypted_options[:mode] = :per_attribute_iv_and_salt
|
58
59
|
attr_encrypted :email, key: SECRET_KEY
|
@@ -83,7 +84,7 @@ class Account < ActiveRecord::Base
|
|
83
84
|
attr_encrypted :password, key: :password_encryption_key
|
84
85
|
|
85
86
|
def encrypting?(attr)
|
86
|
-
|
87
|
+
attr_encrypted_encrypted_attributes[attr][:operation] == :encrypting
|
87
88
|
end
|
88
89
|
|
89
90
|
def password_encryption_key
|
@@ -104,7 +105,6 @@ end
|
|
104
105
|
class UserWithProtectedAttribute < ActiveRecord::Base
|
105
106
|
self.table_name = 'users'
|
106
107
|
attr_encrypted :password, key: SECRET_KEY
|
107
|
-
attr_protected :is_admin if ::ActiveRecord::VERSION::STRING < "4.0"
|
108
108
|
end
|
109
109
|
|
110
110
|
class PersonUsingAlias < ActiveRecord::Base
|
@@ -219,52 +219,53 @@ class ActiveRecordTest < Minitest::Test
|
|
219
219
|
assert_equal pw.reverse, account.password
|
220
220
|
end
|
221
221
|
|
222
|
-
if ::
|
223
|
-
def
|
224
|
-
|
225
|
-
|
226
|
-
|
222
|
+
if Gem::Requirement.new('>= 5.2').satisfied_by?(RAILS_VERSION)
|
223
|
+
def test_should_create_will_save_change_to_predicate
|
224
|
+
person = Person.create!(email: 'test@example.com')
|
225
|
+
refute person.will_save_change_to_email?
|
226
|
+
person.email = 'test@example.com'
|
227
|
+
refute person.will_save_change_to_email?
|
228
|
+
person.email = 'test2@example.com'
|
229
|
+
assert person.will_save_change_to_email?
|
227
230
|
end
|
228
231
|
|
229
|
-
def
|
230
|
-
|
231
|
-
|
232
|
-
|
232
|
+
def test_should_create_saved_change_to_predicate
|
233
|
+
person = Person.create!(email: 'test@example.com')
|
234
|
+
assert person.saved_change_to_email?
|
235
|
+
person.reload
|
236
|
+
person.email = 'test@example.com'
|
237
|
+
refute person.saved_change_to_email?
|
238
|
+
person.email = nil
|
239
|
+
refute person.saved_change_to_email?
|
240
|
+
person.email = 'test2@example.com'
|
241
|
+
refute person.saved_change_to_email?
|
242
|
+
person.save
|
243
|
+
assert person.saved_change_to_email?
|
233
244
|
end
|
245
|
+
end
|
234
246
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
end
|
247
|
+
def test_should_assign_attributes
|
248
|
+
@user = UserWithProtectedAttribute.new(login: 'login', is_admin: false)
|
249
|
+
@user.attributes = ActionController::Parameters.new(login: 'modified', is_admin: true).permit(:login)
|
250
|
+
assert_equal 'modified', @user.login
|
251
|
+
end
|
241
252
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
else
|
248
|
-
def test_should_assign_attributes
|
249
|
-
@user = UserWithProtectedAttribute.new(login: 'login', is_admin: false)
|
250
|
-
@user.attributes = { login: 'modified', is_admin: true }
|
251
|
-
assert_equal 'modified', @user.login
|
252
|
-
end
|
253
|
+
def test_should_not_assign_protected_attributes
|
254
|
+
@user = UserWithProtectedAttribute.new(login: 'login', is_admin: false)
|
255
|
+
@user.attributes = ActionController::Parameters.new(login: 'modified', is_admin: true).permit(:login)
|
256
|
+
assert !@user.is_admin?
|
257
|
+
end
|
253
258
|
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
259
|
+
def test_should_raise_exception_if_not_permitted
|
260
|
+
@user = UserWithProtectedAttribute.new(login: 'login', is_admin: false)
|
261
|
+
assert_raises ActiveModel::ForbiddenAttributesError do
|
262
|
+
@user.attributes = ActionController::Parameters.new(login: 'modified', is_admin: true)
|
258
263
|
end
|
264
|
+
end
|
259
265
|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
@user.send(:assign_attributes, { login: 'modified', is_admin: true }, without_protection: true)
|
264
|
-
else
|
265
|
-
@user.send(:attributes=, { login: 'modified', is_admin: true }, false)
|
266
|
-
end
|
267
|
-
assert @user.is_admin?
|
266
|
+
def test_should_raise_exception_on_init_if_not_permitted
|
267
|
+
assert_raises ActiveModel::ForbiddenAttributesError do
|
268
|
+
@user = UserWithProtectedAttribute.new ActionController::Parameters.new(login: 'modified', is_admin: true)
|
268
269
|
end
|
269
270
|
end
|
270
271
|
|
@@ -277,23 +278,21 @@ class ActiveRecordTest < Minitest::Test
|
|
277
278
|
@person = PersonWithProcMode.create(email: 'test@example.com', credentials: 'password123')
|
278
279
|
|
279
280
|
# Email is :per_attribute_iv_and_salt
|
280
|
-
assert_equal @person.class.
|
281
|
-
assert_equal @person.class.
|
281
|
+
assert_equal @person.class.attr_encrypted_encrypted_attributes[:email][:mode].class, Proc
|
282
|
+
assert_equal @person.class.attr_encrypted_encrypted_attributes[:email][:mode].call, :per_attribute_iv_and_salt
|
282
283
|
refute_nil @person.encrypted_email_salt
|
283
284
|
refute_nil @person.encrypted_email_iv
|
284
285
|
|
285
286
|
# Credentials is :single_iv_and_salt
|
286
|
-
assert_equal @person.class.
|
287
|
-
assert_equal @person.class.
|
287
|
+
assert_equal @person.class.attr_encrypted_encrypted_attributes[:credentials][:mode].class, Proc
|
288
|
+
assert_equal @person.class.attr_encrypted_encrypted_attributes[:credentials][:mode].call, :single_iv_and_salt
|
288
289
|
assert_nil @person.encrypted_credentials_salt
|
289
290
|
assert_nil @person.encrypted_credentials_iv
|
290
291
|
end
|
291
292
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
assert_nil(@person.assign_attributes nil)
|
296
|
-
end
|
293
|
+
def test_should_allow_assign_attributes_with_nil
|
294
|
+
@person = Person.new
|
295
|
+
assert_nil(@person.assign_attributes nil)
|
297
296
|
end
|
298
297
|
|
299
298
|
def test_that_alias_encrypts_column
|
data/test/attr_encrypted_test.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# encoding: UTF-8
|
2
4
|
require_relative 'test_helper'
|
3
5
|
|
@@ -81,11 +83,11 @@ class AttrEncryptedTest < Minitest::Test
|
|
81
83
|
end
|
82
84
|
|
83
85
|
def test_should_store_email_in_encrypted_attributes
|
84
|
-
assert User.
|
86
|
+
assert User.attr_encrypted_encrypted_attributes.include?(:email)
|
85
87
|
end
|
86
88
|
|
87
89
|
def test_should_not_store_salt_in_encrypted_attributes
|
88
|
-
refute User.
|
90
|
+
refute User.attr_encrypted_encrypted_attributes.include?(:salt)
|
89
91
|
end
|
90
92
|
|
91
93
|
def test_attr_encrypted_should_return_true_for_email
|
@@ -93,7 +95,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
93
95
|
end
|
94
96
|
|
95
97
|
def test_attr_encrypted_should_not_use_the_same_attribute_name_for_two_attributes_in_the_same_line
|
96
|
-
refute_equal User.
|
98
|
+
refute_equal User.attr_encrypted_encrypted_attributes[:email][:attribute], User.attr_encrypted_encrypted_attributes[:without_encoding][:attribute]
|
97
99
|
end
|
98
100
|
|
99
101
|
def test_attr_encrypted_should_return_false_for_salt
|
@@ -152,7 +154,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
152
154
|
def test_should_decrypt_email_when_reading
|
153
155
|
@user = User.new
|
154
156
|
assert_nil @user.email
|
155
|
-
options = @user.
|
157
|
+
options = @user.attr_encrypted_encrypted_attributes[:email]
|
156
158
|
iv = @user.send(:generate_iv, options[:algorithm])
|
157
159
|
encoded_iv = [iv].pack(options[:encode_iv])
|
158
160
|
salt = SecureRandom.random_bytes
|
@@ -221,7 +223,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
221
223
|
end
|
222
224
|
|
223
225
|
def test_should_inherit_encrypted_attributes
|
224
|
-
assert_equal [User.
|
226
|
+
assert_equal [User.attr_encrypted_encrypted_attributes.keys, :testing].flatten.collect { |key| key.to_s }.sort, Admin.attr_encrypted_encrypted_attributes.keys.collect { |key| key.to_s }.sort
|
225
227
|
end
|
226
228
|
|
227
229
|
def test_should_inherit_attr_encrypted_options
|
@@ -231,7 +233,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
231
233
|
|
232
234
|
def test_should_not_inherit_unrelated_attributes
|
233
235
|
assert SomeOtherClass.attr_encrypted_options.empty?
|
234
|
-
assert SomeOtherClass.
|
236
|
+
assert SomeOtherClass.attr_encrypted_encrypted_attributes.empty?
|
235
237
|
end
|
236
238
|
|
237
239
|
def test_should_evaluate_a_symbol_option
|
@@ -302,7 +304,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
302
304
|
end
|
303
305
|
|
304
306
|
def test_should_work_with_aliased_attr_encryptor
|
305
|
-
assert User.
|
307
|
+
assert User.attr_encrypted_encrypted_attributes.include?(:aliased)
|
306
308
|
end
|
307
309
|
|
308
310
|
def test_should_always_reset_options
|
@@ -379,12 +381,12 @@ class AttrEncryptedTest < Minitest::Test
|
|
379
381
|
@user2 = User.new
|
380
382
|
@user2.email = 'test@example.com'
|
381
383
|
|
382
|
-
assert_equal 'test@example.com', @user1.
|
384
|
+
assert_equal 'test@example.com', @user1.attr_encrypted_decrypt(:email, @user1.encrypted_email)
|
383
385
|
end
|
384
386
|
|
385
387
|
def test_should_specify_the_default_algorithm
|
386
|
-
assert YetAnotherClass.
|
387
|
-
assert_equal YetAnotherClass.
|
388
|
+
assert YetAnotherClass.attr_encrypted_encrypted_attributes[:email][:algorithm]
|
389
|
+
assert_equal YetAnotherClass.attr_encrypted_encrypted_attributes[:email][:algorithm], 'aes-256-gcm'
|
388
390
|
end
|
389
391
|
|
390
392
|
def test_should_not_encode_iv_when_encode_iv_is_false
|
@@ -466,4 +468,23 @@ class AttrEncryptedTest < Minitest::Test
|
|
466
468
|
user.with_true_if = nil
|
467
469
|
assert_nil user.encrypted_with_true_if_iv
|
468
470
|
end
|
471
|
+
|
472
|
+
def test_encrypted_attributes_state_is_not_shared
|
473
|
+
user = User.new
|
474
|
+
user.ssn = '123456789'
|
475
|
+
|
476
|
+
another_user = User.new
|
477
|
+
|
478
|
+
assert_equal :encrypting, user.attr_encrypted_encrypted_attributes[:ssn][:operation]
|
479
|
+
assert_nil another_user.attr_encrypted_encrypted_attributes[:ssn][:operation]
|
480
|
+
end
|
481
|
+
|
482
|
+
def test_should_not_by_default_generate_key_when_attribute_is_empty
|
483
|
+
user = User.new
|
484
|
+
calls = 0
|
485
|
+
user.stub(:secret_key, lambda { calls += 1; SECRET_KEY }) do
|
486
|
+
user.ssn
|
487
|
+
end
|
488
|
+
assert_equal 0, calls
|
489
|
+
end
|
469
490
|
end
|
data/test/compatibility_test.rb
CHANGED
data/test/data_mapper_test.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# -*- encoding: utf-8 -*-
|
2
4
|
require_relative 'test_helper'
|
3
5
|
|
@@ -56,11 +58,11 @@ end
|
|
56
58
|
class LegacyAttrEncryptedTest < Minitest::Test
|
57
59
|
|
58
60
|
def test_should_store_email_in_encrypted_attributes
|
59
|
-
assert LegacyUser.
|
61
|
+
assert LegacyUser.attr_encrypted_encrypted_attributes.include?(:email)
|
60
62
|
end
|
61
63
|
|
62
64
|
def test_should_not_store_salt_in_encrypted_attributes
|
63
|
-
assert !LegacyUser.
|
65
|
+
assert !LegacyUser.attr_encrypted_encrypted_attributes.include?(:salt)
|
64
66
|
end
|
65
67
|
|
66
68
|
def test_attr_encrypted_should_return_true_for_email
|
@@ -68,7 +70,7 @@ class LegacyAttrEncryptedTest < Minitest::Test
|
|
68
70
|
end
|
69
71
|
|
70
72
|
def test_attr_encrypted_should_not_use_the_same_attribute_name_for_two_attributes_in_the_same_line
|
71
|
-
refute_equal LegacyUser.
|
73
|
+
refute_equal LegacyUser.attr_encrypted_encrypted_attributes[:email][:attribute], LegacyUser.attr_encrypted_encrypted_attributes[:without_encoding][:attribute]
|
72
74
|
end
|
73
75
|
|
74
76
|
def test_attr_encrypted_should_return_false_for_salt
|
@@ -199,7 +201,7 @@ class LegacyAttrEncryptedTest < Minitest::Test
|
|
199
201
|
end
|
200
202
|
|
201
203
|
def test_should_inherit_encrypted_attributes
|
202
|
-
assert_equal [LegacyUser.
|
204
|
+
assert_equal [LegacyUser.attr_encrypted_encrypted_attributes.keys, :testing].flatten.collect { |key| key.to_s }.sort, LegacyAdmin.attr_encrypted_encrypted_attributes.keys.collect { |key| key.to_s }.sort
|
203
205
|
end
|
204
206
|
|
205
207
|
def test_should_inherit_attr_encrypted_options
|
@@ -209,7 +211,7 @@ class LegacyAttrEncryptedTest < Minitest::Test
|
|
209
211
|
|
210
212
|
def test_should_not_inherit_unrelated_attributes
|
211
213
|
assert LegacySomeOtherClass.attr_encrypted_options.empty?
|
212
|
-
assert LegacySomeOtherClass.
|
214
|
+
assert LegacySomeOtherClass.attr_encrypted_encrypted_attributes.empty?
|
213
215
|
end
|
214
216
|
|
215
217
|
def test_should_evaluate_a_symbol_option
|
@@ -266,7 +268,7 @@ class LegacyAttrEncryptedTest < Minitest::Test
|
|
266
268
|
end
|
267
269
|
|
268
270
|
def test_should_work_with_aliased_attr_encryptor
|
269
|
-
assert LegacyUser.
|
271
|
+
assert LegacyUser.attr_encrypted_encrypted_attributes.include?(:aliased)
|
270
272
|
end
|
271
273
|
|
272
274
|
def test_should_always_reset_options
|
data/test/legacy_sequel_test.rb
CHANGED
data/test/run.sh
CHANGED
@@ -1,12 +1,20 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
3
|
+
set -e
|
4
|
+
|
5
|
+
for RUBY in 2.6.10 2.7.6
|
4
6
|
do
|
5
|
-
for
|
7
|
+
for ACTIVERECORD in 5.1.1 5.2.8
|
6
8
|
do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
echo ">>> Testing with Ruby ${RUBY} and ActiveRecord ${ACTIVERECORD}."
|
10
|
+
export RBENV_VERSION=$RUBY
|
11
|
+
export ACTIVERECORD=$ACTIVERECORD
|
12
|
+
|
13
|
+
rbenv install $RUBY --skip-existing
|
14
|
+
bundle install
|
15
|
+
bundle check
|
16
|
+
bundle exec rake test
|
17
|
+
rm Gemfile.lock
|
18
|
+
echo ">>> Finished testing with Ruby ${RUBY} and ActiveRecord ${ACTIVERECORD}."
|
11
19
|
done
|
12
20
|
done
|
data/test/sequel_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'pry'
|
1
4
|
require 'simplecov'
|
2
5
|
require 'simplecov-rcov'
|
3
|
-
require "codeclimate-test-reporter"
|
4
6
|
|
5
7
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
6
8
|
[
|
7
9
|
SimpleCov::Formatter::HTMLFormatter,
|
8
|
-
SimpleCov::Formatter::RcovFormatter
|
9
|
-
CodeClimate::TestReporter::Formatter
|
10
|
+
SimpleCov::Formatter::RcovFormatter
|
10
11
|
]
|
11
12
|
)
|
12
13
|
|
@@ -14,8 +15,6 @@ SimpleCov.start do
|
|
14
15
|
add_filter 'test'
|
15
16
|
end
|
16
17
|
|
17
|
-
CodeClimate::TestReporter.start
|
18
|
-
|
19
18
|
require 'minitest/autorun'
|
20
19
|
|
21
20
|
# Rails 4.0.x pins to an old minitest
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_encrypted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Huber
|
@@ -10,30 +10,8 @@ authors:
|
|
10
10
|
- Stephen Aghaulor
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
|
-
cert_chain:
|
14
|
-
-
|
15
|
-
-----BEGIN CERTIFICATE-----
|
16
|
-
MIIDdDCC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yWxmU
|
31
|
-
OLm0/t9icSWRPPJ1tLJvuAaDdVpY5dEHd6VdnNJGQC5vHKRInt1kEyqEttIJ/xmJ
|
32
|
-
leSEFyMeoFsR+C/WPG9WSC+xN0eXqakCu6YUJoQzCn/7znv8WxpHEbeZjNIHq0qb
|
33
|
-
nbqZ/ZW1bwzj1T/NIbnMr37wqV29XwkI4+LbewMkb6/bDPYl0qZpAkCxKtGYCCJp
|
34
|
-
l6KPs9K/72yH00dxuAhiTXikTkcLXeQJ
|
35
|
-
-----END CERTIFICATE-----
|
36
|
-
date: 2018-02-11 00:00:00.000000000 Z
|
13
|
+
cert_chain: []
|
14
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
37
15
|
dependencies:
|
38
16
|
- !ruby/object:Gem::Dependency
|
39
17
|
name: encryptor
|
@@ -53,30 +31,30 @@ dependencies:
|
|
53
31
|
name: activerecord
|
54
32
|
requirement: !ruby/object:Gem::Requirement
|
55
33
|
requirements:
|
56
|
-
- - "
|
34
|
+
- - ">="
|
57
35
|
- !ruby/object:Gem::Version
|
58
|
-
version:
|
36
|
+
version: 2.0.0
|
59
37
|
type: :development
|
60
38
|
prerelease: false
|
61
39
|
version_requirements: !ruby/object:Gem::Requirement
|
62
40
|
requirements:
|
63
|
-
- - "
|
41
|
+
- - ">="
|
64
42
|
- !ruby/object:Gem::Version
|
65
|
-
version:
|
43
|
+
version: 2.0.0
|
66
44
|
- !ruby/object:Gem::Dependency
|
67
45
|
name: actionpack
|
68
46
|
requirement: !ruby/object:Gem::Requirement
|
69
47
|
requirements:
|
70
|
-
- - "
|
48
|
+
- - ">="
|
71
49
|
- !ruby/object:Gem::Version
|
72
|
-
version:
|
50
|
+
version: 2.0.0
|
73
51
|
type: :development
|
74
52
|
prerelease: false
|
75
53
|
version_requirements: !ruby/object:Gem::Requirement
|
76
54
|
requirements:
|
77
|
-
- - "
|
55
|
+
- - ">="
|
78
56
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
57
|
+
version: 2.0.0
|
80
58
|
- !ruby/object:Gem::Dependency
|
81
59
|
name: datamapper
|
82
60
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,16 +115,16 @@ dependencies:
|
|
137
115
|
name: sqlite3
|
138
116
|
requirement: !ruby/object:Gem::Requirement
|
139
117
|
requirements:
|
140
|
-
- -
|
118
|
+
- - '='
|
141
119
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
120
|
+
version: 1.5.4
|
143
121
|
type: :development
|
144
122
|
prerelease: false
|
145
123
|
version_requirements: !ruby/object:Gem::Requirement
|
146
124
|
requirements:
|
147
|
-
- -
|
125
|
+
- - '='
|
148
126
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
127
|
+
version: 1.5.4
|
150
128
|
- !ruby/object:Gem::Dependency
|
151
129
|
name: dm-sqlite-adapter
|
152
130
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,7 +140,7 @@ dependencies:
|
|
162
140
|
- !ruby/object:Gem::Version
|
163
141
|
version: '0'
|
164
142
|
- !ruby/object:Gem::Dependency
|
165
|
-
name:
|
143
|
+
name: pry
|
166
144
|
requirement: !ruby/object:Gem::Requirement
|
167
145
|
requirements:
|
168
146
|
- - ">="
|
@@ -176,7 +154,7 @@ dependencies:
|
|
176
154
|
- !ruby/object:Gem::Version
|
177
155
|
version: '0'
|
178
156
|
- !ruby/object:Gem::Dependency
|
179
|
-
name: simplecov
|
157
|
+
name: simplecov
|
180
158
|
requirement: !ruby/object:Gem::Requirement
|
181
159
|
requirements:
|
182
160
|
- - ">="
|
@@ -190,19 +168,19 @@ dependencies:
|
|
190
168
|
- !ruby/object:Gem::Version
|
191
169
|
version: '0'
|
192
170
|
- !ruby/object:Gem::Dependency
|
193
|
-
name:
|
171
|
+
name: simplecov-rcov
|
194
172
|
requirement: !ruby/object:Gem::Requirement
|
195
173
|
requirements:
|
196
|
-
- - "
|
174
|
+
- - ">="
|
197
175
|
- !ruby/object:Gem::Version
|
198
|
-
version: 0
|
176
|
+
version: '0'
|
199
177
|
type: :development
|
200
178
|
prerelease: false
|
201
179
|
version_requirements: !ruby/object:Gem::Requirement
|
202
180
|
requirements:
|
203
|
-
- - "
|
181
|
+
- - ">="
|
204
182
|
- !ruby/object:Gem::Version
|
205
|
-
version: 0
|
183
|
+
version: '0'
|
206
184
|
description: Generates attr_accessors that encrypt and decrypt attributes transparently
|
207
185
|
email:
|
208
186
|
- seah@shuber.io
|
@@ -221,7 +199,6 @@ files:
|
|
221
199
|
- README.md
|
222
200
|
- Rakefile
|
223
201
|
- attr_encrypted.gemspec
|
224
|
-
- certs/saghaulor.pem
|
225
202
|
- checksum/attr_encrypted-3.0.0.gem.sha256
|
226
203
|
- checksum/attr_encrypted-3.0.0.gem.sha512
|
227
204
|
- checksum/attr_encrypted-3.0.1.gem.sha256
|
@@ -230,6 +207,8 @@ files:
|
|
230
207
|
- checksum/attr_encrypted-3.0.2.gem.sha512
|
231
208
|
- checksum/attr_encrypted-3.0.3.gem.sha256
|
232
209
|
- checksum/attr_encrypted-3.0.3.gem.sha512
|
210
|
+
- checksum/attr_encrypted-3.1.0.gem.sha256
|
211
|
+
- checksum/attr_encrypted-3.1.0.gem.sha512
|
233
212
|
- lib/attr_encrypted.rb
|
234
213
|
- lib/attr_encrypted/adapters/active_record.rb
|
235
214
|
- lib/attr_encrypted/adapters/data_mapper.rb
|
@@ -255,35 +234,25 @@ post_install_message: |2+
|
|
255
234
|
|
256
235
|
|
257
236
|
|
258
|
-
WARNING:
|
259
|
-
|
260
|
-
Additionally, there was a bug in Encryptor v2.0.0 that insecurely encrypted data when using an AES-*-GCM algorithm.
|
261
|
-
|
262
|
-
This bug was fixed but introduced breaking changes between v2.x and v3.x.
|
263
|
-
|
264
|
-
Please see the README for more information regarding upgrading to attr_encrypted v3.0.0.
|
237
|
+
WARNING: Using `#encrypted_attributes` is no longer supported. Instead, use `#attr_encrypted_encrypted_attributes` to avoid
|
238
|
+
collision with Active Record 7 native encryption.
|
265
239
|
|
266
240
|
|
267
|
-
rdoc_options:
|
268
|
-
- "--line-numbers"
|
269
|
-
- "--inline-source"
|
270
|
-
- "--main"
|
271
|
-
- README.rdoc
|
241
|
+
rdoc_options: []
|
272
242
|
require_paths:
|
273
243
|
- lib
|
274
244
|
required_ruby_version: !ruby/object:Gem::Requirement
|
275
245
|
requirements:
|
276
246
|
- - ">="
|
277
247
|
- !ruby/object:Gem::Version
|
278
|
-
version: 2.
|
248
|
+
version: 2.6.0
|
279
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
250
|
requirements:
|
281
251
|
- - ">="
|
282
252
|
- !ruby/object:Gem::Version
|
283
253
|
version: '0'
|
284
254
|
requirements: []
|
285
|
-
|
286
|
-
rubygems_version: 2.6.13
|
255
|
+
rubygems_version: 3.0.3.1
|
287
256
|
signing_key:
|
288
257
|
specification_version: 4
|
289
258
|
summary: Encrypt and decrypt attributes
|
checksums.yaml.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
)��`'\������l{�����-��p.�I�K�y��4�˕��`�{�¹�͏�L������uho�dވE��VHzP ����UO�#�t.���o���/��t�јz}���#3l`a�JDKc�����)^�� ���?�<���^E��2& �BoF�qZ��9��������69Z��s.���(h�U���?�{���zp?�P��\3���� m����N�Kj�#`0n�9J�Otݼ�{ޣ��}�� �)
|
data/certs/saghaulor.pem
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDdDCCAlygAwIBAgIBATANBgkqhkiG9w0BAQUFADBAMRIwEAYDVQQDDAlzYWdo
|
3
|
-
YXVsb3IxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
4
|
-
bTAeFw0xODAyMTIwMzMzMThaFw0xOTAyMTIwMzMzMThaMEAxEjAQBgNVBAMMCXNh
|
5
|
-
Z2hhdWxvcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYD
|
6
|
-
Y29tMIIBI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
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Ae�mL������6>�o(p���{��~x�O.]L�|ZgfQ�L44uؤ��:��S!o�@�Ğ���au9s- Xx�6�����M
|