attr_encrypted 3.0.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +14 -23
- data/CHANGELOG.md +52 -17
- data/README.md +27 -9
- data/Rakefile +3 -0
- data/attr_encrypted.gemspec +6 -13
- data/checksum/attr_encrypted-3.0.3.gem.sha256 +1 -0
- data/checksum/attr_encrypted-3.0.3.gem.sha512 +1 -0
- 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 +36 -21
- 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 +160 -129
- data/test/active_record_test.rb +64 -65
- data/test/attr_encrypted_test.rb +113 -16
- data/test/compatibility_test.rb +3 -1
- data/test/data_mapper_test.rb +2 -0
- data/test/legacy_active_record_test.rb +3 -1
- data/test/legacy_attr_encrypted_test.rb +8 -6
- data/test/legacy_compatibility_test.rb +3 -1
- 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 +11 -5
- metadata +21 -50
- checksums.yaml.gz.sig +0 -0
- data/certs/saghaulor.pem +0 -21
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
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
|
|
|
@@ -23,11 +25,12 @@ class User
|
|
|
23
25
|
attr_encrypted :with_encoding, :key => SECRET_KEY, :encode => true
|
|
24
26
|
attr_encrypted :with_custom_encoding, :key => SECRET_KEY, :encode => 'm'
|
|
25
27
|
attr_encrypted :with_marshaling, :key => SECRET_KEY, :marshal => true
|
|
26
|
-
attr_encrypted :with_true_if, :key => SECRET_KEY, :if => true
|
|
27
|
-
attr_encrypted :with_false_if, :key => SECRET_KEY, :if => false
|
|
28
|
-
attr_encrypted :with_true_unless, :key => SECRET_KEY, :unless => true
|
|
29
|
-
attr_encrypted :with_false_unless, :key => SECRET_KEY, :unless => false
|
|
28
|
+
attr_encrypted :with_true_if, :key => SECRET_KEY, :if => true, mode: :per_attribute_iv_and_salt
|
|
29
|
+
attr_encrypted :with_false_if, :key => SECRET_KEY, :if => false, mode: :per_attribute_iv_and_salt
|
|
30
|
+
attr_encrypted :with_true_unless, :key => SECRET_KEY, :unless => true, mode: :per_attribute_iv_and_salt
|
|
31
|
+
attr_encrypted :with_false_unless, :key => SECRET_KEY, :unless => false, mode: :per_attribute_iv_and_salt
|
|
30
32
|
attr_encrypted :with_if_changed, :key => SECRET_KEY, :if => :should_encrypt
|
|
33
|
+
attr_encrypted :with_allow_empty_value, key: SECRET_KEY, allow_empty_value: true, marshal: true
|
|
31
34
|
|
|
32
35
|
attr_encryptor :aliased, :key => SECRET_KEY
|
|
33
36
|
|
|
@@ -40,6 +43,7 @@ class User
|
|
|
40
43
|
self.should_encrypt = true
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
private
|
|
43
47
|
def secret_key
|
|
44
48
|
SECRET_KEY
|
|
45
49
|
end
|
|
@@ -79,11 +83,11 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
79
83
|
end
|
|
80
84
|
|
|
81
85
|
def test_should_store_email_in_encrypted_attributes
|
|
82
|
-
assert User.
|
|
86
|
+
assert User.attr_encrypted_encrypted_attributes.include?(:email)
|
|
83
87
|
end
|
|
84
88
|
|
|
85
89
|
def test_should_not_store_salt_in_encrypted_attributes
|
|
86
|
-
refute User.
|
|
90
|
+
refute User.attr_encrypted_encrypted_attributes.include?(:salt)
|
|
87
91
|
end
|
|
88
92
|
|
|
89
93
|
def test_attr_encrypted_should_return_true_for_email
|
|
@@ -91,7 +95,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
91
95
|
end
|
|
92
96
|
|
|
93
97
|
def test_attr_encrypted_should_not_use_the_same_attribute_name_for_two_attributes_in_the_same_line
|
|
94
|
-
refute_equal User.
|
|
98
|
+
refute_equal User.attr_encrypted_encrypted_attributes[:email][:attribute], User.attr_encrypted_encrypted_attributes[:without_encoding][:attribute]
|
|
95
99
|
end
|
|
96
100
|
|
|
97
101
|
def test_attr_encrypted_should_return_false_for_salt
|
|
@@ -114,7 +118,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
114
118
|
assert_nil User.encrypt_email(nil, iv: @iv)
|
|
115
119
|
end
|
|
116
120
|
|
|
117
|
-
def
|
|
121
|
+
def test_should_not_encrypt_empty_string_by_default
|
|
118
122
|
assert_equal '', User.encrypt_email('', iv: @iv)
|
|
119
123
|
end
|
|
120
124
|
|
|
@@ -150,9 +154,14 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
150
154
|
def test_should_decrypt_email_when_reading
|
|
151
155
|
@user = User.new
|
|
152
156
|
assert_nil @user.email
|
|
153
|
-
|
|
154
|
-
|
|
157
|
+
options = @user.attr_encrypted_encrypted_attributes[:email]
|
|
158
|
+
iv = @user.send(:generate_iv, options[:algorithm])
|
|
159
|
+
encoded_iv = [iv].pack(options[:encode_iv])
|
|
160
|
+
salt = SecureRandom.random_bytes
|
|
161
|
+
encoded_salt = @user.send(:prefix_and_encode_salt, salt, options[:encode_salt])
|
|
155
162
|
@user.encrypted_email = User.encrypt_email('test@example.com', iv: iv, salt: salt)
|
|
163
|
+
@user.encrypted_email_iv = encoded_iv
|
|
164
|
+
@user.encrypted_email_salt = encoded_salt
|
|
156
165
|
assert_equal 'test@example.com', @user.email
|
|
157
166
|
end
|
|
158
167
|
|
|
@@ -214,7 +223,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
214
223
|
end
|
|
215
224
|
|
|
216
225
|
def test_should_inherit_encrypted_attributes
|
|
217
|
-
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
|
|
218
227
|
end
|
|
219
228
|
|
|
220
229
|
def test_should_inherit_attr_encrypted_options
|
|
@@ -224,7 +233,7 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
224
233
|
|
|
225
234
|
def test_should_not_inherit_unrelated_attributes
|
|
226
235
|
assert SomeOtherClass.attr_encrypted_options.empty?
|
|
227
|
-
assert SomeOtherClass.
|
|
236
|
+
assert SomeOtherClass.attr_encrypted_encrypted_attributes.empty?
|
|
228
237
|
end
|
|
229
238
|
|
|
230
239
|
def test_should_evaluate_a_symbol_option
|
|
@@ -282,8 +291,20 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
282
291
|
assert_equal 'testing', @user.encrypted_with_true_unless
|
|
283
292
|
end
|
|
284
293
|
|
|
294
|
+
def test_should_encrypt_empty_with_truthy_allow_empty_value_option
|
|
295
|
+
@user = User.new
|
|
296
|
+
assert_nil @user.encrypted_with_allow_empty_value
|
|
297
|
+
@user.with_allow_empty_value = ''
|
|
298
|
+
refute_nil @user.encrypted_with_allow_empty_value
|
|
299
|
+
assert_equal '', @user.with_allow_empty_value
|
|
300
|
+
@user = User.new
|
|
301
|
+
@user.with_allow_empty_value = nil
|
|
302
|
+
refute_nil @user.encrypted_with_allow_empty_value
|
|
303
|
+
assert_nil @user.with_allow_empty_value
|
|
304
|
+
end
|
|
305
|
+
|
|
285
306
|
def test_should_work_with_aliased_attr_encryptor
|
|
286
|
-
assert User.
|
|
307
|
+
assert User.attr_encrypted_encrypted_attributes.include?(:aliased)
|
|
287
308
|
end
|
|
288
309
|
|
|
289
310
|
def test_should_always_reset_options
|
|
@@ -360,12 +381,12 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
360
381
|
@user2 = User.new
|
|
361
382
|
@user2.email = 'test@example.com'
|
|
362
383
|
|
|
363
|
-
assert_equal 'test@example.com', @user1.
|
|
384
|
+
assert_equal 'test@example.com', @user1.attr_encrypted_decrypt(:email, @user1.encrypted_email)
|
|
364
385
|
end
|
|
365
386
|
|
|
366
387
|
def test_should_specify_the_default_algorithm
|
|
367
|
-
assert YetAnotherClass.
|
|
368
|
-
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'
|
|
369
390
|
end
|
|
370
391
|
|
|
371
392
|
def test_should_not_encode_iv_when_encode_iv_is_false
|
|
@@ -390,4 +411,80 @@ class AttrEncryptedTest < Minitest::Test
|
|
|
390
411
|
user.email = 'revised_value@test.com'
|
|
391
412
|
refute_equal original_iv, user.encrypted_email_iv
|
|
392
413
|
end
|
|
414
|
+
|
|
415
|
+
def test_should_not_generate_iv_for_attribute_when_if_option_is_false
|
|
416
|
+
user = User.new
|
|
417
|
+
user.with_false_if = 'derp'
|
|
418
|
+
assert_nil user.encrypted_with_false_if_iv
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
def test_should_generate_iv_for_attribute_when_if_option_is_true
|
|
422
|
+
user = User.new
|
|
423
|
+
user.with_true_if = 'derp'
|
|
424
|
+
refute_nil user.encrypted_with_true_if_iv
|
|
425
|
+
|
|
426
|
+
user.with_true_if = Object.new
|
|
427
|
+
refute_nil user.encrypted_with_true_if_iv
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
def test_should_not_generate_salt_for_attribute_when_if_option_is_false
|
|
431
|
+
user = User.new
|
|
432
|
+
user.with_false_if = 'derp'
|
|
433
|
+
assert_nil user.encrypted_with_false_if_salt
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
def test_should_generate_salt_for_attribute_when_if_option_is_true
|
|
437
|
+
user = User.new
|
|
438
|
+
user.with_true_if = 'derp'
|
|
439
|
+
refute_nil user.encrypted_with_true_if_salt
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
def test_should_generate_iv_for_attribute_when_unless_option_is_false
|
|
443
|
+
user = User.new
|
|
444
|
+
user.with_false_unless = 'derp'
|
|
445
|
+
refute_nil user.encrypted_with_false_unless_iv
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
def test_should_not_generate_iv_for_attribute_when_unless_option_is_true
|
|
449
|
+
user = User.new
|
|
450
|
+
user.with_true_unless = 'derp'
|
|
451
|
+
assert_nil user.encrypted_with_true_unless_iv
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
def test_should_generate_salt_for_attribute_when_unless_option_is_false
|
|
455
|
+
user = User.new
|
|
456
|
+
user.with_false_unless = 'derp'
|
|
457
|
+
refute_nil user.encrypted_with_false_unless_salt
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
def test_should_not_generate_salt_for_attribute_when_unless_option_is_true
|
|
461
|
+
user = User.new
|
|
462
|
+
user.with_true_unless = 'derp'
|
|
463
|
+
assert_nil user.encrypted_with_true_unless_salt
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
def test_should_not_by_default_generate_iv_when_attribute_is_empty
|
|
467
|
+
user = User.new
|
|
468
|
+
user.with_true_if = nil
|
|
469
|
+
assert_nil user.encrypted_with_true_if_iv
|
|
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
|
|
393
490
|
end
|
data/test/compatibility_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
|
|
|
@@ -41,7 +43,7 @@ class CompatibilityTest < Minitest::Test
|
|
|
41
43
|
end
|
|
42
44
|
|
|
43
45
|
def setup
|
|
44
|
-
|
|
46
|
+
drop_all_tables
|
|
45
47
|
create_tables
|
|
46
48
|
end
|
|
47
49
|
|
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
|
|
|
@@ -50,7 +52,7 @@ end
|
|
|
50
52
|
class LegacyActiveRecordTest < Minitest::Test
|
|
51
53
|
|
|
52
54
|
def setup
|
|
53
|
-
|
|
55
|
+
drop_all_tables
|
|
54
56
|
create_people_table
|
|
55
57
|
end
|
|
56
58
|
|
|
@@ -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
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# -*- encoding: utf-8 -*-
|
|
2
4
|
require_relative 'test_helper'
|
|
3
5
|
|
|
@@ -41,7 +43,7 @@ class LegacyCompatibilityTest < Minitest::Test
|
|
|
41
43
|
end
|
|
42
44
|
|
|
43
45
|
def setup
|
|
44
|
-
|
|
46
|
+
drop_all_tables
|
|
45
47
|
create_tables
|
|
46
48
|
end
|
|
47
49
|
|
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
|
|
@@ -27,6 +26,7 @@ require 'active_record'
|
|
|
27
26
|
require 'data_mapper'
|
|
28
27
|
require 'digest/sha2'
|
|
29
28
|
require 'sequel'
|
|
29
|
+
ActiveSupport::Deprecation.behavior = :raise
|
|
30
30
|
|
|
31
31
|
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
32
32
|
$:.unshift(File.dirname(__FILE__))
|
|
@@ -49,3 +49,9 @@ SECRET_KEY = SecureRandom.random_bytes(32)
|
|
|
49
49
|
def base64_encoding_regex
|
|
50
50
|
/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$/
|
|
51
51
|
end
|
|
52
|
+
|
|
53
|
+
def drop_all_tables
|
|
54
|
+
connection = ActiveRecord::Base.connection
|
|
55
|
+
tables = (ActiveRecord::VERSION::MAJOR >= 5 ? connection.data_sources : connection.tables)
|
|
56
|
+
tables.each { |table| ActiveRecord::Base.connection.drop_table(table) }
|
|
57
|
+
end
|
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
|
-
MIIDdDCCAlygAwIBAgIBATANBgkqhkiG9w0BAQUFADBAMRIwEAYDVQQDDAlzYWdo
|
|
17
|
-
YXVsb3IxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
|
18
|
-
bTAeFw0xNjAxMTEyMjQyMDFaFw0xNzAxMTAyMjQyMDFaMEAxEjAQBgNVBAMMCXNh
|
|
19
|
-
Z2hhdWxvcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYD
|
|
20
|
-
Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx0xdQYk2GwCpQ1n/
|
|
21
|
-
n2mPVYHLYqU5TAn/82t5kbqBUWjbcj8tHAi41tJ19+fT/hH0dog8JHvho1zmOr71
|
|
22
|
-
ZIqreJQo60TqP6oE9a5HncUpjqbRp7tOmHo9E+mOW1yT4NiXqFf1YINExQKy2XND
|
|
23
|
-
WPQ+T50ZNUsGMfHFWB4NAymejRWXlOEY3bvKW0UHFeNmouP5he51TjoP8uCc9536
|
|
24
|
-
4AIWVP/zzzjwrFtC7av7nRw4Y+gX2bQjrkK2k2JS0ejiGzKBIEMJejcI2B+t79zT
|
|
25
|
-
kUQq9SFwp2BrKSIy+4kh4CiF20RT/Hfc1MbvTxSIl/bbIxCYEOhmtHExHi0CoCWs
|
|
26
|
-
YCGCXQIDAQABo3kwdzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU
|
|
27
|
-
SCpVzSBvYbO6B3oT3n3RCZmurG8wHgYDVR0RBBcwFYETc2FnaGF1bG9yQGdtYWls
|
|
28
|
-
LmNvbTAeBgNVHRIEFzAVgRNzYWdoYXVsb3JAZ21haWwuY29tMA0GCSqGSIb3DQEB
|
|
29
|
-
BQUAA4IBAQAeiGdC3e0WiZpm0cF/b7JC6hJYXC9Yv9VsRAWD9ROsLjFKwOhmonnc
|
|
30
|
-
+l/QrmoTjMakYXBCai/Ca3L+k5eRrKilgyITILsmmFxK8sqPJXUw2Jmwk/dAky6x
|
|
31
|
-
hHKVZAofT1OrOOPJ2USoZyhR/VI8epLaD5wUmkVDNqtZWviW+dtRa55aPYjRw5Pj
|
|
32
|
-
wuj9nybhZr+BbEbmZE//2nbfkM4hCuMtxxxilPrJ22aYNmeWU0wsPpDyhPYxOUgU
|
|
33
|
-
ZjeLmnSDiwL6doiP5IiwALH/dcHU67ck3NGf6XyqNwQrrmtPY0mv1WVVL4Uh+vYE
|
|
34
|
-
kHoFzE2no0BfBg78Re8fY69P5yES5ncC
|
|
35
|
-
-----END CERTIFICATE-----
|
|
36
|
-
date: 2016-07-22 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
|
|
@@ -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,7 +168,7 @@ 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
|
- - ">="
|
|
@@ -221,13 +199,16 @@ 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
|
|
228
205
|
- checksum/attr_encrypted-3.0.1.gem.sha512
|
|
229
206
|
- checksum/attr_encrypted-3.0.2.gem.sha256
|
|
230
207
|
- checksum/attr_encrypted-3.0.2.gem.sha512
|
|
208
|
+
- checksum/attr_encrypted-3.0.3.gem.sha256
|
|
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
|
|
231
212
|
- lib/attr_encrypted.rb
|
|
232
213
|
- lib/attr_encrypted/adapters/active_record.rb
|
|
233
214
|
- lib/attr_encrypted/adapters/data_mapper.rb
|
|
@@ -246,41 +227,32 @@ files:
|
|
|
246
227
|
- test/sequel_test.rb
|
|
247
228
|
- test/test_helper.rb
|
|
248
229
|
homepage: http://github.com/attr-encrypted/attr_encrypted
|
|
249
|
-
licenses:
|
|
230
|
+
licenses:
|
|
231
|
+
- MIT
|
|
250
232
|
metadata: {}
|
|
251
233
|
post_install_message: |2+
|
|
252
234
|
|
|
253
235
|
|
|
254
236
|
|
|
255
|
-
WARNING:
|
|
256
|
-
|
|
257
|
-
Additionally, there was a bug in Encryptor v2.0.0 that insecurely encrypted data when using an AES-*-GCM algorithm.
|
|
258
|
-
|
|
259
|
-
This bug was fixed but introduced breaking changes between v2.x and v3.x.
|
|
260
|
-
|
|
261
|
-
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.
|
|
262
239
|
|
|
263
240
|
|
|
264
|
-
rdoc_options:
|
|
265
|
-
- "--line-numbers"
|
|
266
|
-
- "--inline-source"
|
|
267
|
-
- "--main"
|
|
268
|
-
- README.rdoc
|
|
241
|
+
rdoc_options: []
|
|
269
242
|
require_paths:
|
|
270
243
|
- lib
|
|
271
244
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
272
245
|
requirements:
|
|
273
246
|
- - ">="
|
|
274
247
|
- !ruby/object:Gem::Version
|
|
275
|
-
version: 2.
|
|
248
|
+
version: 2.6.0
|
|
276
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
250
|
requirements:
|
|
278
251
|
- - ">="
|
|
279
252
|
- !ruby/object:Gem::Version
|
|
280
253
|
version: '0'
|
|
281
254
|
requirements: []
|
|
282
|
-
|
|
283
|
-
rubygems_version: 2.4.5.1
|
|
255
|
+
rubygems_version: 3.0.3.1
|
|
284
256
|
signing_key:
|
|
285
257
|
specification_version: 4
|
|
286
258
|
summary: Encrypt and decrypt attributes
|
|
@@ -297,4 +269,3 @@ test_files:
|
|
|
297
269
|
- test/run.sh
|
|
298
270
|
- test/sequel_test.rb
|
|
299
271
|
- test/test_helper.rb
|
|
300
|
-
has_rdoc: false
|
checksums.yaml.gz.sig
DELETED
|
Binary file
|
data/certs/saghaulor.pem
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
|
2
|
-
MIIDdDCCAlygAwIBAgIBATANBgkqhkiG9w0BAQUFADBAMRIwEAYDVQQDDAlzYWdo
|
|
3
|
-
YXVsb3IxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
|
4
|
-
bTAeFw0xNjAxMTEyMjQyMDFaFw0xNzAxMTAyMjQyMDFaMEAxEjAQBgNVBAMMCXNh
|
|
5
|
-
Z2hhdWxvcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYD
|
|
6
|
-
Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx0xdQYk2GwCpQ1n/
|
|
7
|
-
n2mPVYHLYqU5TAn/82t5kbqBUWjbcj8tHAi41tJ19+fT/hH0dog8JHvho1zmOr71
|
|
8
|
-
ZIqreJQo60TqP6oE9a5HncUpjqbRp7tOmHo9E+mOW1yT4NiXqFf1YINExQKy2XND
|
|
9
|
-
WPQ+T50ZNUsGMfHFWB4NAymejRWXlOEY3bvKW0UHFeNmouP5he51TjoP8uCc9536
|
|
10
|
-
4AIWVP/zzzjwrFtC7av7nRw4Y+gX2bQjrkK2k2JS0ejiGzKBIEMJejcI2B+t79zT
|
|
11
|
-
kUQq9SFwp2BrKSIy+4kh4CiF20RT/Hfc1MbvTxSIl/bbIxCYEOhmtHExHi0CoCWs
|
|
12
|
-
YCGCXQIDAQABo3kwdzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU
|
|
13
|
-
SCpVzSBvYbO6B3oT3n3RCZmurG8wHgYDVR0RBBcwFYETc2FnaGF1bG9yQGdtYWls
|
|
14
|
-
LmNvbTAeBgNVHRIEFzAVgRNzYWdoYXVsb3JAZ21haWwuY29tMA0GCSqGSIb3DQEB
|
|
15
|
-
BQUAA4IBAQAeiGdC3e0WiZpm0cF/b7JC6hJYXC9Yv9VsRAWD9ROsLjFKwOhmonnc
|
|
16
|
-
+l/QrmoTjMakYXBCai/Ca3L+k5eRrKilgyITILsmmFxK8sqPJXUw2Jmwk/dAky6x
|
|
17
|
-
hHKVZAofT1OrOOPJ2USoZyhR/VI8epLaD5wUmkVDNqtZWviW+dtRa55aPYjRw5Pj
|
|
18
|
-
wuj9nybhZr+BbEbmZE//2nbfkM4hCuMtxxxilPrJ22aYNmeWU0wsPpDyhPYxOUgU
|
|
19
|
-
ZjeLmnSDiwL6doiP5IiwALH/dcHU67ck3NGf6XyqNwQrrmtPY0mv1WVVL4Uh+vYE
|
|
20
|
-
kHoFzE2no0BfBg78Re8fY69P5yES5ncC
|
|
21
|
-
-----END CERTIFICATE-----
|
data.tar.gz.sig
DELETED
|
Binary file
|
metadata.gz.sig
DELETED
|
Binary file
|