deep_cloneable 3.2.0 → 3.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e7c12bc2e33b41524e73c6802e8c3c80ae3e71856439d3509a8c1c285cc85d8
4
- data.tar.gz: fa795a3daaf2af8fb522ffb038202af6ea3aa02c4eecdc22d931c2458f30e8bd
3
+ metadata.gz: 1f3e467c8c20de2d308cce08edca4b9a62287d3bd12b5ad6bca682bfa8a69021
4
+ data.tar.gz: 97021542287799a710e83dda314777a1efc9a591cffb39e23d9cb2a770f6f1cb
5
5
  SHA512:
6
- metadata.gz: 5c1a9cc10c9cc236ffef3ea9175b290feca66888608a2e2638c7b0b419cdb32fe53a514164bd222ab55b09f2df70e5e3c5570418204269fa0b140ed916f064a7
7
- data.tar.gz: a1fe5158ba55927978b9afae9f8adaef51a45eb6e6e70d93bc0739f4e2128b1142968d22b63116f951b7ca23cf831b5d27ece2f0dfc16a68a018858a8b28ee3f
6
+ metadata.gz: 133f0cba36cfa6245d37f432bebd4b698445785db33c395a3f3d2c55bda605718a3718cef1131d0a9800361c87cbfc1d6187a66357fd74983e4052712d57a45b
7
+ data.tar.gz: 21dadd156be7bb100022d9598cf53c611377bc760e070beed3f52fa707a08564aebd5e4a90c157f8daafc021b55aa5790e3d93527d18a740b77b94fe98e7138d
data/Appraisals CHANGED
@@ -1,46 +1,8 @@
1
1
  # frozen_string_literal: true
2
-
3
- appraise '3.2' do
4
- gem 'activerecord', '~> 3.2.0'
5
- gem 'i18n', '~> 0.6.5'
6
- end
7
-
8
- appraise '4.0' do
9
- gem 'activerecord', '~> 4.0.0'
10
- gem 'i18n', '~> 0.6.5'
11
- end
12
-
13
- appraise '4.1' do
14
- gem 'activerecord', '~> 4.1.0'
15
- gem 'i18n', '~> 0.6.9'
16
- end
17
-
18
- appraise '4.2' do
19
- gem 'activerecord', '~> 4.2.3'
20
- gem 'i18n', '~> 0.7.0'
21
- end
22
-
23
- appraise '5.0' do
24
- gem 'activerecord', '~> 5.0.0'
25
- gem 'i18n', '~> 0.7.0'
26
- end
27
-
28
- appraise '5.1' do
29
- gem 'activerecord', '~> 5.1.0'
30
- gem 'i18n', '~> 0.7.0'
31
- end
32
-
33
- appraise '5.2' do
34
- gem 'activerecord', '~> 5.2.0'
35
- gem 'i18n', '~> 0.7.0'
36
- end
37
-
38
- appraise '6.0' do
39
- gem 'activerecord', '~> 6.0.0'
40
- gem 'sqlite3', '~> 1.4.1'
2
+ appraise '7.1' do
3
+ gem 'activerecord', '~> 7.1.0'
41
4
  end
42
5
 
43
- appraise '7.0' do
44
- gem 'activerecord', '~> 7.0.0'
45
- gem 'sqlite3', '~> 1.4.2'
6
+ appraise '8.0' do
7
+ gem 'activerecord', '~> 8.0.0'
46
8
  end
data/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.2.2] - 2026-02-19
11
+
12
+ ### Changed
13
+
14
+ - Bump uri dependency to 1.0.3 to address CVE-2025-27221
15
+
16
+ ### Removed
17
+
18
+ - Removed EOL ruby versions from test build
19
+ - Removed EOL rails versions from test build
20
+
21
+ ## [3.2.1] - 2024-11-20
22
+
23
+ ### Added
24
+
25
+ - Added Ruby 3.3.5 support
26
+ - Added Rails 8.0 support
27
+
10
28
  ## [3.2.0] - 2021-12-28
11
29
 
12
30
  ### Added
@@ -30,7 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
30
48
  ### Fixed
31
49
 
32
50
  - Ensure the initial options hash is never modified
33
- - When using conditions in combination with array includes, ensure nested includes are not accidentally deleted
51
+ - When using conditions in combination with array includes, ensure nested includes are not accidentally deleted
34
52
 
35
53
  ### Removed
36
54
 
@@ -307,7 +325,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
307
325
 
308
326
  - Convert existing code to a gem
309
327
 
310
- [unreleased]: https://github.com/moiristo/deep_cloneable/compare/v3.2.0...HEAD
328
+ [unreleased]: https://github.com/moiristo/deep_cloneable/compare/v3.2.1...HEAD
329
+ [3.2.1]: https://github.com/moiristo/deep_cloneable/compare/v3.2.0...v3.2.1
311
330
  [3.2.0]: https://github.com/moiristo/deep_cloneable/compare/v3.1.0...v3.2.0
312
331
  [3.1.0]: https://github.com/moiristo/deep_cloneable/compare/v3.0.0...v3.1.0
313
332
  [3.0.0]: https://github.com/moiristo/deep_cloneable/compare/v2.4.0...v3.0.0
data/Gemfile CHANGED
@@ -2,10 +2,9 @@
2
2
 
3
3
  source 'http://rubygems.org'
4
4
 
5
- gem 'activerecord', '>= 3.1.0', '< 8'
6
- gem 'bundler', '~> 1.17.3', :group => :test
7
- gem 'rake', '~> 12.3', :group => :test
8
-
5
+ gem 'activerecord', '>= 3.1.0', '< 9'
6
+ gem 'bundler', :group => :test
9
7
  gem 'appraisal', :group => :test
10
8
  gem 'minitest', :group => :test
11
- gem 'sqlite3', '~> 1.3.13', :group => :test
9
+ gem 'sqlite3', :group => :test
10
+ gem 'logger', :group => :test
data/Gemfile.lock CHANGED
@@ -1,43 +1,60 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (5.2.0)
5
- activesupport (= 5.2.0)
6
- activerecord (5.2.0)
7
- activemodel (= 5.2.0)
8
- activesupport (= 5.2.0)
9
- arel (>= 9.0)
10
- activesupport (5.2.0)
11
- concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 0.7, < 2)
13
- minitest (~> 5.1)
14
- tzinfo (~> 1.1)
15
- appraisal (2.2.0)
4
+ activemodel (8.0.2)
5
+ activesupport (= 8.0.2)
6
+ activerecord (8.0.2)
7
+ activemodel (= 8.0.2)
8
+ activesupport (= 8.0.2)
9
+ timeout (>= 0.4.0)
10
+ activesupport (8.0.2)
11
+ base64
12
+ benchmark (>= 0.3)
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.3.1)
15
+ connection_pool (>= 2.2.5)
16
+ drb
17
+ i18n (>= 1.6, < 2)
18
+ logger (>= 1.4.2)
19
+ minitest (>= 5.1)
20
+ securerandom (>= 0.3)
21
+ tzinfo (~> 2.0, >= 2.0.5)
22
+ uri (>= 0.13.1)
23
+ appraisal (2.5.0)
16
24
  bundler
17
25
  rake
18
26
  thor (>= 0.14.0)
19
- arel (9.0.0)
20
- concurrent-ruby (1.0.5)
21
- i18n (1.0.0)
27
+ base64 (0.3.0)
28
+ benchmark (0.4.1)
29
+ bigdecimal (3.2.2)
30
+ concurrent-ruby (1.3.5)
31
+ connection_pool (2.5.3)
32
+ drb (2.2.3)
33
+ i18n (1.14.7)
22
34
  concurrent-ruby (~> 1.0)
23
- minitest (5.11.3)
24
- rake (12.3.3)
25
- sqlite3 (1.3.13)
26
- thor (0.20.3)
27
- thread_safe (0.3.6)
28
- tzinfo (1.2.5)
29
- thread_safe (~> 0.1)
35
+ logger (1.7.0)
36
+ mini_portile2 (2.8.8)
37
+ minitest (5.25.5)
38
+ rake (13.3.0)
39
+ securerandom (0.4.1)
40
+ sqlite3 (2.2.0)
41
+ mini_portile2 (~> 2.8.0)
42
+ thor (1.3.2)
43
+ timeout (0.4.3)
44
+ tzinfo (2.0.6)
45
+ concurrent-ruby (~> 1.0)
46
+ uri (1.0.3)
30
47
 
31
48
  PLATFORMS
32
49
  ruby
33
50
 
34
51
  DEPENDENCIES
35
- activerecord (>= 3.1.0, < 8)
52
+ activerecord (>= 3.1.0, < 9)
36
53
  appraisal
37
- bundler (~> 1.17.3)
54
+ bundler
55
+ logger
38
56
  minitest
39
- rake (~> 12.3)
40
- sqlite3 (~> 1.3.13)
57
+ sqlite3
41
58
 
42
59
  BUNDLED WITH
43
- 1.17.3
60
+ 2.5.20
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2021 Reinier de Lange
1
+ Copyright (c) 2026 Reinier de Lange
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.name = 'deep_cloneable'
8
8
  s.version = DeepCloneable::VERSION
9
9
  s.authors = ['Reinier de Lange']
10
- s.description = 'Extends the functionality of ActiveRecord::Base#dup to perform a deep clone that includes user specified associations. '
10
+ s.description = 'Extends the functionality of ActiveRecord::Base#dup to perform a deep clone that includes user specified associations.'
11
11
  s.summary = 'This gem gives every ActiveRecord::Base object the possibility to do a deep clone.'
12
12
  s.email = 'rjdelange@icloud.com'
13
13
  s.extra_rdoc_files = ['LICENSE']
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
17
17
  s.platform = Gem::Platform::RUBY
18
18
  s.required_ruby_version = '>= 1.9.3'
19
19
  s.require_paths = ['lib']
20
- s.add_runtime_dependency('activerecord', ['>= 3.1.0', '< 8'])
20
+ s.add_runtime_dependency('activerecord', ['>= 3.1.0', '< 9'])
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module DeepCloneable
2
- VERSION = '3.2.0'
2
+ VERSION = '3.2.2'
3
3
  end
data/readme.md CHANGED
@@ -6,17 +6,15 @@ This gem gives every ActiveRecord::Base object the possibility to do a deep clon
6
6
 
7
7
  ## Requirements
8
8
 
9
- - Ruby 2.3.0, 2.4.4, 2.5.5, 2.6.3, 2.7.5 (tested)
10
- - TruffleRuby 21.3.0
11
- - Activerecord 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 7.0 (tested)
12
- - Rails 2.x/3.0 users, please check out the 'rails2.x-3.0' branch
9
+ - Ruby >= 2 (3.3.5, 3.4.4 tested)
10
+ - Activerecord >= 3.1.0 (7.1, 8.0 tested)
13
11
 
14
12
  ## Installation
15
13
 
16
14
  - Add deep_cloneable to your Gemfile:
17
15
 
18
16
  ```ruby
19
- gem 'deep_cloneable', '~> 3.2.0'
17
+ gem 'deep_cloneable', '~> 3.2.2'
20
18
  ```
21
19
 
22
20
  ## Upgrade details
@@ -151,6 +149,23 @@ pirate.deep_clone include: :parrot do |original, kopy|
151
149
  end
152
150
  ```
153
151
 
152
+ #### Shrine
153
+
154
+ Shrine is similar to Carrierwave, but you have to clear the `image_data` hash attribute from the copy, otherwise Shrine will think there's an old attachment to clean up and will delete the original image.
155
+
156
+ ```ruby
157
+ pirate.deep_clone include: [:photos, :parrot] do |original, kopy|
158
+ if kopy.is_a?(Photo)
159
+ kopy.image_data = nil
160
+ kopy.image = original.image
161
+ end
162
+ end
163
+ ```
164
+
165
+ Note you're not assigning `image_data` directly, otherwise this would result in both records sharing the same asset in your storage.
166
+
167
+ Directly assigning `kopy.image` to `original.image` ensures you use your usual uploading mechanism, such as background jobs.
168
+
154
169
  #### ActiveStorage
155
170
 
156
171
  For ActiveStorage, you have two options: you can either make a full copy, or share data blobs between two records.
@@ -240,4 +255,4 @@ pirate.deep_clone include: [:parrot, :rum], skip_missing_associations: true
240
255
 
241
256
  ### Copyright
242
257
 
243
- Copyright &copy; 2021 Reinier de Lange. See LICENSE for details.
258
+ Copyright &copy; 2026 Reinier de Lange. See LICENSE for details.
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_cloneable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reinier de Lange
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-12-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activerecord
@@ -19,7 +18,7 @@ dependencies:
19
18
  version: 3.1.0
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
- version: '8'
21
+ version: '9'
23
22
  type: :runtime
24
23
  prerelease: false
25
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,9 +28,9 @@ dependencies:
29
28
  version: 3.1.0
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
- version: '8'
33
- description: 'Extends the functionality of ActiveRecord::Base#dup to perform a deep
34
- clone that includes user specified associations. '
31
+ version: '9'
32
+ description: Extends the functionality of ActiveRecord::Base#dup to perform a deep
33
+ clone that includes user specified associations.
35
34
  email: rjdelange@icloud.com
36
35
  executables: []
37
36
  extensions: []
@@ -56,7 +55,6 @@ homepage: https://github.com/moiristo/deep_cloneable
56
55
  licenses:
57
56
  - MIT
58
57
  metadata: {}
59
- post_install_message:
60
58
  rdoc_options: []
61
59
  require_paths:
62
60
  - lib
@@ -71,8 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
69
  - !ruby/object:Gem::Version
72
70
  version: '0'
73
71
  requirements: []
74
- rubygems_version: 3.1.6
75
- signing_key:
72
+ rubygems_version: 4.0.6
76
73
  specification_version: 4
77
74
  summary: This gem gives every ActiveRecord::Base object the possibility to do a deep
78
75
  clone.