attr_encrypted 4.1.0 → 4.2.0

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: 5a992ab4061d1d05c6de0891accee520006d545d727be49bd80c09ea4d55b44a
4
- data.tar.gz: c6dcfb039445ce7128e0c610d5ca6a4efce02ed195fe754fbc947a99f7b8cef7
3
+ metadata.gz: 9f575e6c6da0da72cae27e9cdf4032e895005775ea44e15f33f2ff461b54e90b
4
+ data.tar.gz: c3a80d92586c59dac539d6bd7136249d53c7e022e6624c9c5c34035f7a6079f9
5
5
  SHA512:
6
- metadata.gz: 62299d9d34f907ef99464ca41c5de51f9b05d440b2210ba377e05ac4fe02978fa58893cdb0ce002cd25216dace37c5f67b8a8c97ef76259066ee6fc57b93fd08
7
- data.tar.gz: f081aaebe945a24d2aff5fea11e671b700b8bf5a6513d36252c96f38e5134448efb9660d0fb6843418d926dcb3821ae1e9c23d2f2551ff2a0b261a678a6bb8f5
6
+ metadata.gz: 6389590ba9c038c2c9ea6fef5dd5766f406b1a9d6fdaf711209d977981bea4476605a5b89b2c37c83d5adfd11d733fef56994f4d0843011b6dbd25290d753d08
7
+ data.tar.gz: 4472de6edcd25f0ac3742d33d54afb8fa3fd6ffb11a8c0ae06982734e699dd49591e464899c641c26fc28b5ef36ad9c12107634e43c59817fe41f7e41cd1f397
@@ -13,27 +13,37 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- active_record:
17
- - '6.0'
18
- - '6.1'
19
- - '7.0'
20
- - '7.1'
21
- ruby:
22
- - '2.7'
23
- - '3.0'
24
- - '3.1'
25
- - '3.2'
26
16
  include:
27
- - active_record: '5.1'
28
- ruby: '2.7'
29
- - active_record: '5.2'
30
- ruby: '2.7'
31
- - active_record: '7.1'
32
- ruby: '3.3'
17
+ - { active_record: '5.1', ruby: '2.7' }
18
+ - { active_record: '5.2', ruby: '2.7' }
19
+ - { active_record: '6.0', ruby: '2.7' }
20
+ - { active_record: '6.0', ruby: '3.0' }
21
+ - { active_record: '6.0', ruby: '3.1' }
22
+ - { active_record: '6.0', ruby: '3.2' }
23
+ - { active_record: '6.1', ruby: '2.7' }
24
+ - { active_record: '6.1', ruby: '3.0' }
25
+ - { active_record: '6.1', ruby: '3.1' }
26
+ - { active_record: '6.1', ruby: '3.2' }
27
+ - { active_record: '7.0', ruby: '2.7' }
28
+ - { active_record: '7.0', ruby: '3.0' }
29
+ - { active_record: '7.0', ruby: '3.1' }
30
+ - { active_record: '7.0', ruby: '3.2' }
31
+ - { active_record: '7.1', ruby: '2.7' }
32
+ - { active_record: '7.1', ruby: '3.0' }
33
+ - { active_record: '7.1', ruby: '3.1' }
34
+ - { active_record: '7.1', ruby: '3.2' }
35
+ - { active_record: '7.1', ruby: '3.3' }
36
+ - { active_record: '7.2', ruby: '3.1' }
37
+ - { active_record: '7.2', ruby: '3.2' }
38
+ - { active_record: '7.2', ruby: '3.3' }
39
+ - { active_record: '7.2', ruby: '3.4' }
40
+ - { active_record: '8.0', ruby: '3.2' }
41
+ - { active_record: '8.0', ruby: '3.3' }
42
+ - { active_record: '8.0', ruby: '3.4' }
33
43
  env:
34
44
  ACTIVERECORD: ${{ matrix.active_record }}
35
45
  steps:
36
- - uses: actions/checkout@v3
46
+ - uses: actions/checkout@v4
37
47
  - name: Set up Ruby
38
48
  uses: ruby/setup-ruby@v1
39
49
  with:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # attr_encrypted
2
2
 
3
+ ## 4.2.0
4
+
5
+ * Changed: Set minimum Ruby version as 2.7.
6
+ * Added: Rails 7.2 and 8.0 support.
7
+ * Fixed: Further removal of `datamapper` support.
8
+
9
+ ## 4.1.1
10
+
11
+ * Fixed: Fix SystemStackError when extending the reload method with Module#prepend.
12
+
3
13
  ## 4.1.0
4
14
 
5
15
  * Changed: Dropped support for `datamapper` which has not had a release since October 2011. This is in an attempt to make
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem "concurrent-ruby", "< 1.3.5"
@@ -24,14 +24,14 @@ Gem::Specification.new do |s|
24
24
  s.files = `git ls-files`.split("\n")
25
25
  s.test_files = `git ls-files -- test/*`.split("\n")
26
26
 
27
- s.required_ruby_version = '>= 2.6.0'
27
+ s.required_ruby_version = '>= 2.7.0'
28
28
 
29
29
  s.add_dependency('encryptor', ['~> 3.0.0'])
30
30
  # support for testing with specific active record version
31
31
  activerecord_version = if ENV.key?('ACTIVERECORD')
32
32
  "~> #{ENV['ACTIVERECORD']}.0"
33
33
  else
34
- '>= 2.0.0'
34
+ '>= 6.0.0'
35
35
  end
36
36
  s.add_development_dependency('activerecord', activerecord_version)
37
37
  s.add_development_dependency('actionpack', activerecord_version)
@@ -42,9 +42,12 @@ Gem::Specification.new do |s|
42
42
  s.add_development_dependency('activerecord-jdbcsqlite3-adapter')
43
43
  s.add_development_dependency('jdbc-sqlite3', '< 3.8.7') # 3.8.7 is nice and broke
44
44
  else
45
- s.add_development_dependency('sqlite3', '= 1.5.4')
45
+ if ENV['ACTIVERECORD'] && Gem::Version.new(ENV['ACTIVERECORD']) >= Gem::Version.new('8.0')
46
+ s.add_development_dependency('sqlite3', '> 2.1.0')
47
+ else
48
+ s.add_development_dependency('sqlite3', '= 1.5.4')
49
+ end
46
50
  end
47
- s.add_development_dependency('dm-sqlite-adapter')
48
51
  s.add_development_dependency('pry')
49
52
  s.add_development_dependency('simplecov')
50
53
  s.add_development_dependency('simplecov-rcov')
@@ -6,19 +6,18 @@ if defined?(ActiveRecord::Base)
6
6
  module ActiveRecord
7
7
  RAILS_VERSION = Gem::Version.new(::ActiveRecord::VERSION::STRING).freeze
8
8
 
9
- def self.extended(base) # :nodoc:
10
- base.class_eval do
11
-
12
- # https://github.com/attr-encrypted/attr_encrypted/issues/68
13
- alias_method :reload_without_attr_encrypted, :reload
14
- def reload(*args, &block)
15
- result = reload_without_attr_encrypted(*args, &block)
16
- self.class.attr_encrypted_encrypted_attributes.keys.each do |attribute_name|
17
- instance_variable_set("@#{attribute_name}", nil)
18
- end
19
- result
9
+ module Reload
10
+ def reload(...)
11
+ result = super
12
+ self.class.attr_encrypted_encrypted_attributes.keys.each do |attribute_name|
13
+ instance_variable_set("@#{attribute_name}", nil)
20
14
  end
15
+ result
16
+ end
17
+ end
21
18
 
19
+ def self.extended(base) # :nodoc:
20
+ base.class_eval do
22
21
  attr_encrypted_options[:encode] = true
23
22
 
24
23
  class << self
@@ -148,5 +147,6 @@ if defined?(ActiveRecord::Base)
148
147
  ActiveSupport.on_load(:active_record) do
149
148
  extend AttrEncrypted
150
149
  extend AttrEncrypted::Adapters::ActiveRecord
150
+ prepend AttrEncrypted::Adapters::ActiveRecord::Reload
151
151
  end
152
152
  end
@@ -4,7 +4,7 @@ module AttrEncrypted
4
4
  # Contains information about this gem's version
5
5
  module Version
6
6
  MAJOR = 4
7
- MINOR = 1
7
+ MINOR = 2
8
8
  PATCH = 0
9
9
 
10
10
  # Returns a version string by joining <tt>MAJOR</tt>, <tt>MINOR</tt>, and <tt>PATCH</tt> with <tt>'.'</tt>
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.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Huber
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2024-05-30 00:00:00.000000000 Z
16
+ date: 2025-01-23 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: encryptor
@@ -35,28 +35,28 @@ dependencies:
35
35
  requirements:
36
36
  - - ">="
37
37
  - !ruby/object:Gem::Version
38
- version: 2.0.0
38
+ version: 6.0.0
39
39
  type: :development
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 2.0.0
45
+ version: 6.0.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: actionpack
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 2.0.0
52
+ version: 6.0.0
53
53
  type: :development
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 2.0.0
59
+ version: 6.0.0
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: rake
62
62
  requirement: !ruby/object:Gem::Requirement
@@ -113,20 +113,6 @@ dependencies:
113
113
  - - '='
114
114
  - !ruby/object:Gem::Version
115
115
  version: 1.5.4
116
- - !ruby/object:Gem::Dependency
117
- name: dm-sqlite-adapter
118
- requirement: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: '0'
123
- type: :development
124
- prerelease: false
125
- version_requirements: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- version: '0'
130
116
  - !ruby/object:Gem::Dependency
131
117
  name: pry
132
118
  requirement: !ruby/object:Gem::Requirement
@@ -232,14 +218,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
218
  requirements:
233
219
  - - ">="
234
220
  - !ruby/object:Gem::Version
235
- version: 2.6.0
221
+ version: 2.7.0
236
222
  required_rubygems_version: !ruby/object:Gem::Requirement
237
223
  requirements:
238
224
  - - ">="
239
225
  - !ruby/object:Gem::Version
240
226
  version: '0'
241
227
  requirements: []
242
- rubygems_version: 3.4.10
228
+ rubygems_version: 3.5.22
243
229
  signing_key:
244
230
  specification_version: 4
245
231
  summary: Encrypt and decrypt attributes