deep_cloneable 2.3.0 → 3.1.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
- SHA1:
3
- metadata.gz: 2965ed86adcfda63e876533015e4a55e4fb0316f
4
- data.tar.gz: 6d9ef9a44e135ecf9baa769e721e25c62b4f893c
2
+ SHA256:
3
+ metadata.gz: 3ab5e4168e665bb1fb1c355db74edd575e13c3a21b43fb3403bfaf473b52a0cb
4
+ data.tar.gz: 532db121e78af89fd2ab97f4b64d3c26f5760bea51782f8653b76dd3b621bbd5
5
5
  SHA512:
6
- metadata.gz: e11fe1537382bc8fe904aa02f0dd33b205bc926093d383f6ef7a0023509c279e430f04732f5707c62ef077b7de86516f66d935e90055e4fd1b8a1b2f6612bb93
7
- data.tar.gz: c2b879a4b1885214c647c632ace3f8ba895b0c13ac12d34bed2c2bb9ccf776060a1add719a6a1219a9fbe7c4b3a4b30dcb33149466bda4fefec4b2b3f66c2eb0
6
+ metadata.gz: 0373631aaff4684b61dfd22c04bcf7d8c81684252cf7c7320074cc5d8bb79aaba8a594ca84ce6742f6d6fafb4507f101453e6e3e529081cb6e3455b873d5f9ca
7
+ data.tar.gz: 5d288ed325b1579387ac96e087566587f9b47dc84dc0a642549f570e999bd328d6f27cd97d6cff2f9d2f478f05ab651a5ba600c546366e8f14beae909afd5aad
data/Appraisals CHANGED
@@ -1,19 +1,23 @@
1
+ # frozen_string_literal: true
2
+
1
3
  appraise '3.1' do
2
4
  gem 'activerecord', '~> 3.1.0'
3
- gem "addressable", "~> 2.3.8"
5
+ gem 'i18n', '~> 0.6.5'
4
6
  end
5
7
 
6
8
  appraise '3.2' do
7
9
  gem 'activerecord', '~> 3.2.0'
8
- gem "addressable", "~> 2.3.8"
10
+ gem 'i18n', '~> 0.6.5'
9
11
  end
10
12
 
11
13
  appraise '4.0' do
12
14
  gem 'activerecord', '~> 4.0.0'
15
+ gem 'i18n', '~> 0.6.5'
13
16
  end
14
17
 
15
18
  appraise '4.1' do
16
19
  gem 'activerecord', '~> 4.1.0'
20
+ gem 'i18n', '~> 0.6.9'
17
21
  end
18
22
 
19
23
  appraise '4.2' do
@@ -24,4 +28,19 @@ end
24
28
  appraise '5.0' do
25
29
  gem 'activerecord', '~> 5.0.0'
26
30
  gem 'i18n', '~> 0.7.0'
27
- end
31
+ end
32
+
33
+ appraise '5.1' do
34
+ gem 'activerecord', '~> 5.1.0'
35
+ gem 'i18n', '~> 0.7.0'
36
+ end
37
+
38
+ appraise '5.2' do
39
+ gem 'activerecord', '~> 5.2.0'
40
+ gem 'i18n', '~> 0.7.0'
41
+ end
42
+
43
+ appraise '6.0' do
44
+ gem 'activerecord', '~> 6.0.0'
45
+ gem 'sqlite3', '~> 1.4.1'
46
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,328 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [3.1.0] - 2021-02-17
11
+
12
+ ### Added
13
+
14
+ - Added a `preprocessor` option
15
+ - Added a `postprocessor` option
16
+
17
+ ### Fixed
18
+
19
+ - Ensure the initial options hash is never modified
20
+ - When using conditions in combination with array includes, ensure nested includes are not accidentally deleted
21
+
22
+ ### Removed
23
+
24
+ - Removed jeweler as a gem dependency
25
+
26
+ ## [3.0.0] - 2019-08-18
27
+
28
+ ### Added
29
+
30
+ - Support for Ruby 2.6.3
31
+ - Support for Ruby 2.5.5
32
+ - Support for Rails 6.0
33
+
34
+ ### Changed
35
+
36
+ - When using conditions, return `nil` instead of `false` as return value when a condition fails
37
+ - Refactored gem structure and include in AR using lazy load hooks
38
+ - Skip validations on save by using module `DeepCloneable::SkipValidations` instead of a code patch
39
+ - Namespace of `ActiveRecord::Base::DeepCloneable::AssociationNotFoundException` changed to `DeepCloneable::AssociationNotFoundException`
40
+ - Process optional block after all other processing has been finished
41
+
42
+ ### Fixed
43
+
44
+ - Add the `validate` option to the list of passed dup options to ensure validations are never run on save
45
+
46
+ ### Removed
47
+
48
+ - Official support for ruby 1.8.7, as it is not supported by Travis CI anymore
49
+ - Official support for ruby 1.9.2, as it is not supported by Travis CI anymore
50
+
51
+ ## [2.4.0] - 2019-01-10
52
+
53
+ ### Added
54
+
55
+ - Support `has_one` and `has_one - through`
56
+
57
+ ### Changed
58
+
59
+ - Lint code via Rubocop
60
+ - Refactor code to improve readability
61
+ - Use HTTPS in the gemspec website URL
62
+
63
+ ## [2.3.2] - 2018-04-11
64
+
65
+ ### Added
66
+
67
+ - Support for Ruby 2.4 and 2.5
68
+ - Support for Rails 5.1 and 5.2
69
+ - CHANGELOG.md
70
+
71
+ ## [2.3.1] - 2017-10-03
72
+
73
+ ### Added
74
+
75
+ - Documentation on when the optional block is invoked, which is before attributes are excluded
76
+
77
+ ### Fixed
78
+
79
+ - Conditional includes for nested associations
80
+
81
+ ## [2.3.0] - 2017-06-14
82
+
83
+ ### Added
84
+
85
+ - Support for skipping missing associations
86
+
87
+ ### Fixed
88
+
89
+ - Multikey hashes in include arrays
90
+
91
+ ## [2.2.2] - 2016-10-10
92
+
93
+ ### Added
94
+
95
+ - Documentation on cloning associated Carrierwave files
96
+
97
+ ### Changed
98
+
99
+ - Use `inverse_of` when defined for finding the reverse association
100
+ - Cache bundler in Travis
101
+ - Use index operator for setting column defaults
102
+ - Explicitly require activerecord to resolve a sidekiq issue
103
+ - Bump rails 5.0 appraisal
104
+
105
+ ## [2.2.1] - 2016-05-27
106
+
107
+ ### Fixed
108
+
109
+ - Properly set column defaults for attributes
110
+ - Rails 5.0 compatibility
111
+
112
+ ## [2.2.0] - 2016-01-11
113
+
114
+ ### Added
115
+
116
+ - Support for conditional cloning when using array inclusions
117
+
118
+ ### Changed
119
+
120
+ - Bump rails 4.2 appraisal to 4.2.3
121
+
122
+ ## [2.1.0] - 2015-03-10
123
+
124
+ ### Added
125
+
126
+ - Support for conditional cloning
127
+
128
+ ### Changed
129
+
130
+ - Check the dictionary before cloning has_many through or habtm associations
131
+ - Refactor methods to refer to `dup` instead of `clone`
132
+
133
+ ## [2.0.2] - 2014-12-17
134
+
135
+ ### Fixed
136
+
137
+ - Broken activerecord dependency in gemspec
138
+
139
+ ## [2.0.1] - 2014-12-17
140
+
141
+ ### Fixed
142
+
143
+ - Rails 4.2.0.rc3 compatibility
144
+
145
+ ## [2.0.0] - 2014-06-26
146
+
147
+ ### Removed
148
+
149
+ - Override of `dup`
150
+ - References to `dup`
151
+
152
+ ### Fixed
153
+
154
+ - Open-ended dependency warning
155
+
156
+ ## [1.7.0] - 2014-06-25
157
+
158
+ ### Deprecated
159
+
160
+ - Deprecated `dup` in favor of `deep_clone`
161
+
162
+ ## [1.6.1] - 2014-04-16
163
+
164
+ ### Changed
165
+
166
+ - Switched test suite to minitest
167
+ - Update travis.yml with rails 4.1
168
+
169
+ ### Fixed
170
+
171
+ - Rails 4.1 compatibility
172
+
173
+ ## [1.6.0] - 2013-11-02
174
+
175
+ ### Added
176
+
177
+ - `:only` option for whitelisting attributes
178
+ - MIT license
179
+
180
+ ## [1.5.5] - 2013-08-28
181
+
182
+ ### Fixed
183
+
184
+ - Fix activerecord gem dependency
185
+
186
+ ## [1.5.4] - 2013-08-12
187
+
188
+ ### Removed
189
+
190
+ - Rails 3.0 support, as it was broken anyway
191
+
192
+ ### Changed
193
+
194
+ - Update travis.yml with rails 4.0
195
+
196
+ ### Fixed
197
+
198
+ - Appraisals should load the correct major version of rails
199
+ - Exclude unsupported builds in Travis
200
+
201
+ ## [1.5.3] - 2013-06-18
202
+
203
+ ### Fixed
204
+
205
+ - Fix `initialize_dup` error
206
+
207
+ ## [1.5.2] - 2013-06-10
208
+
209
+ ### Fixed
210
+
211
+ - Properly support has_many through associations
212
+ - Fix reverse association lookup for self-referential models
213
+ - Travis.ci status image
214
+
215
+ ## [1.5.1] - 2013-03-06
216
+
217
+ ### Fixed
218
+
219
+ - Ruby 2.0 compatibility
220
+
221
+ ## [1.5.0] - 2013-02-27
222
+
223
+ ### Added
224
+
225
+ - `:validate` option to disable validations when saving a cloned object
226
+
227
+ ### Fixed
228
+
229
+ - Depend on activerecord instead of rails
230
+
231
+ ## [1.4.1] - 2012-07-23
232
+
233
+ ### Fixed
234
+
235
+ - Don't save HABTM associations on clone
236
+
237
+ ## [1.4.0] - 2012-04-02
238
+
239
+ ### Added
240
+
241
+ - Possibility to add a optional block
242
+
243
+ ### Fixed
244
+
245
+ - Ruby 1.8.7 compatibility for rails 3.1
246
+
247
+ ## [1.3.1] - 2012-01-26
248
+
249
+ ### Fixed
250
+
251
+ - Rails 3.2 compatibility
252
+
253
+ ## [1.2.4] - 2011-06-15
254
+
255
+ ### Changed
256
+
257
+ - Raise an exception when the reverse association is missing
258
+
259
+ ### Fixed
260
+
261
+ - Reset column value when cloning associations
262
+
263
+ ## [1.2.3] - 2011-02-27
264
+
265
+ ### Changed
266
+
267
+ - Find and set the reverse association when cloning associations
268
+
269
+ ## [1.2.2] - 2011-02-21
270
+
271
+ ### Fixed
272
+
273
+ - Use association reflection for fetching the primary key name
274
+
275
+ ## [1.2.1] - 2011-02-07
276
+
277
+ ### Fixed
278
+
279
+ - Cloning for polymorphic associations
280
+
281
+ ## [1.2.0] - 2010-10-20
282
+
283
+ ### Added
284
+
285
+ - `:except` option for excluding attributes
286
+
287
+ ### Fixed
288
+
289
+ - Set foreign keys properly
290
+
291
+ ## 1.0.0 - 2010-10-18
292
+
293
+ ### Fixed
294
+
295
+ - Convert existing code to a gem
296
+
297
+ [unreleased]: https://github.com/moiristo/deep_cloneable/compare/v3.1.0...HEAD
298
+ [3.1.0]: https://github.com/moiristo/deep_cloneable/compare/v3.0.0...v3.1.0
299
+ [3.0.0]: https://github.com/moiristo/deep_cloneable/compare/v2.4.0...v3.0.0
300
+ [2.4.0]: https://github.com/moiristo/deep_cloneable/compare/v2.3.2...v2.4.0
301
+ [2.3.2]: https://github.com/moiristo/deep_cloneable/compare/v2.3.1...v2.3.2
302
+ [2.3.1]: https://github.com/moiristo/deep_cloneable/compare/v2.3.0...v2.3.1
303
+ [2.3.0]: https://github.com/moiristo/deep_cloneable/compare/v2.2.2...v2.3.0
304
+ [2.2.2]: https://github.com/moiristo/deep_cloneable/compare/v2.2.1...v2.2.2
305
+ [2.2.1]: https://github.com/moiristo/deep_cloneable/compare/v2.2.0...v2.2.1
306
+ [2.2.0]: https://github.com/moiristo/deep_cloneable/compare/v2.1.0...v2.2.0
307
+ [2.1.0]: https://github.com/moiristo/deep_cloneable/compare/v2.0.2...v2.1.0
308
+ [2.0.2]: https://github.com/moiristo/deep_cloneable/compare/v2.0.1...v2.0.2
309
+ [2.0.1]: https://github.com/moiristo/deep_cloneable/compare/v2.0.0...v2.0.1
310
+ [2.0.0]: https://github.com/moiristo/deep_cloneable/compare/v1.7.0...v2.0.0
311
+ [1.7.0]: https://github.com/moiristo/deep_cloneable/compare/v1.6.1...v1.7.0
312
+ [1.6.1]: https://github.com/moiristo/deep_cloneable/compare/v1.6.0...v1.6.1
313
+ [1.6.0]: https://github.com/moiristo/deep_cloneable/compare/v1.5.5...v1.6.0
314
+ [1.5.5]: https://github.com/moiristo/deep_cloneable/compare/v1.5.4...v1.5.5
315
+ [1.5.4]: https://github.com/moiristo/deep_cloneable/compare/v1.5.3...v1.5.4
316
+ [1.5.3]: https://github.com/moiristo/deep_cloneable/compare/v1.5.2...v1.5.3
317
+ [1.5.2]: https://github.com/moiristo/deep_cloneable/compare/v1.5.1...v1.5.2
318
+ [1.5.1]: https://github.com/moiristo/deep_cloneable/compare/v1.5.0...v1.5.1
319
+ [1.5.0]: https://github.com/moiristo/deep_cloneable/compare/v1.4.1...v1.5.0
320
+ [1.4.1]: https://github.com/moiristo/deep_cloneable/compare/v1.4.0...v1.4.1
321
+ [1.4.0]: https://github.com/moiristo/deep_cloneable/compare/v1.3.1...v1.4.0
322
+ [1.3.1]: https://github.com/moiristo/deep_cloneable/compare/v1.2.4...v1.3.1
323
+ [1.2.4]: https://github.com/moiristo/deep_cloneable/compare/v1.2.3...v1.2.4
324
+ [1.2.3]: https://github.com/moiristo/deep_cloneable/compare/v1.2.2...v1.2.3
325
+ [1.2.2]: https://github.com/moiristo/deep_cloneable/compare/v1.2.1...v1.2.2
326
+ [1.2.1]: https://github.com/moiristo/deep_cloneable/compare/v1.2.0...v1.2.1
327
+ [1.2.0]: https://github.com/moiristo/deep_cloneable/compare/v1.1.0...v1.2.0
328
+ [1.1.0]: https://github.com/moiristo/deep_cloneable/compare/v1.0.0...v1.1.0
data/Gemfile CHANGED
@@ -1,20 +1,11 @@
1
- source 'http://rubygems.org'
1
+ # frozen_string_literal: true
2
2
 
3
- gem 'activerecord', '>= 3.1.0', '< 5.2.0'
3
+ source 'http://rubygems.org'
4
4
 
5
- gem 'i18n', '~> 0.6.5', :group => :test
6
- gem 'highline', '~> 1.6.0', :group => :test
7
- gem 'rake', '~> 10.4', :group => :test
8
- gem 'rack', '~> 1.6', :group => :test
9
- gem 'git', '~> 1.2.9', :group => :test
5
+ gem 'activerecord', '>= 3.1.0', '< 7'
6
+ gem 'bundler', '~> 1.17.3', :group => :test
7
+ gem 'rake', '~> 12.3', :group => :test
10
8
 
11
- gem 'minitest', :group => :test
12
9
  gem 'appraisal', :group => :test
13
- gem 'sqlite3', :group => :test
14
- gem 'rdoc', '>= 2.4.2', :group => :test
15
-
16
- gem 'nokogiri', '~> 1.5.0', :group => :test
17
-
18
- group :test do
19
- gem 'jeweler'
20
- end
10
+ gem 'minitest', :group => :test
11
+ gem 'sqlite3', '~> 1.3.13', :group => :test
data/Gemfile.lock CHANGED
@@ -1,94 +1,43 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (4.1.15)
5
- activesupport (= 4.1.15)
6
- builder (~> 3.1)
7
- activerecord (4.1.15)
8
- activemodel (= 4.1.15)
9
- activesupport (= 4.1.15)
10
- arel (~> 5.0.0)
11
- activesupport (4.1.15)
12
- i18n (~> 0.6, >= 0.6.9)
13
- json (~> 1.7, >= 1.7.7)
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)
14
13
  minitest (~> 5.1)
15
- thread_safe (~> 0.1)
16
14
  tzinfo (~> 1.1)
17
- addressable (2.4.0)
18
- appraisal (2.1.0)
15
+ appraisal (2.2.0)
19
16
  bundler
20
17
  rake
21
18
  thor (>= 0.14.0)
22
- arel (5.0.1.20140414130214)
23
- builder (3.2.2)
24
- descendants_tracker (0.0.4)
25
- thread_safe (~> 0.3, >= 0.3.1)
26
- faraday (0.9.2)
27
- multipart-post (>= 1.2, < 3)
28
- git (1.2.9.1)
29
- github_api (0.16.0)
30
- addressable (~> 2.4.0)
31
- descendants_tracker (~> 0.0.4)
32
- faraday (~> 0.8, < 0.10)
33
- hashie (>= 3.4)
34
- mime-types (>= 1.16, < 3.0)
35
- oauth2 (~> 1.0)
36
- hashie (3.5.5)
37
- highline (1.6.21)
38
- i18n (0.6.11)
39
- jeweler (2.3.6)
40
- builder
41
- bundler (>= 1)
42
- git (>= 1.2.5)
43
- github_api (~> 0.16.0)
44
- highline (>= 1.6.15)
45
- nokogiri (>= 1.5.10)
46
- psych (~> 2.2)
47
- rake
48
- rdoc
49
- semver2
50
- json (1.8.3)
51
- jwt (1.5.6)
52
- mime-types (2.99.3)
53
- minitest (5.9.0)
54
- multi_json (1.12.1)
55
- multi_xml (0.6.0)
56
- multipart-post (2.0.0)
57
- nokogiri (1.5.11)
58
- oauth2 (1.4.0)
59
- faraday (>= 0.8, < 0.13)
60
- jwt (~> 1.0)
61
- multi_json (~> 1.3)
62
- multi_xml (~> 0.5)
63
- rack (>= 1.2, < 3)
64
- psych (2.2.4)
65
- rack (1.6.4)
66
- rake (10.5.0)
67
- rdoc (4.2.2)
68
- json (~> 1.4)
69
- semver2 (3.4.2)
70
- sqlite3 (1.3.11)
71
- thor (0.19.1)
72
- thread_safe (0.3.5)
73
- tzinfo (1.2.2)
19
+ arel (9.0.0)
20
+ concurrent-ruby (1.0.5)
21
+ i18n (1.0.0)
22
+ concurrent-ruby (~> 1.0)
23
+ minitest (5.11.3)
24
+ rake (12.3.3)
25
+ sqlite3 (1.3.13)
26
+ thor (0.20.0)
27
+ thread_safe (0.3.6)
28
+ tzinfo (1.2.5)
74
29
  thread_safe (~> 0.1)
75
30
 
76
31
  PLATFORMS
77
32
  ruby
78
33
 
79
34
  DEPENDENCIES
80
- activerecord (>= 3.1.0, < 5.2.0)
35
+ activerecord (>= 3.1.0, < 7)
81
36
  appraisal
82
- git (~> 1.2.9)
83
- highline (~> 1.6.0)
84
- i18n (~> 0.6.5)
85
- jeweler
37
+ bundler (~> 1.17.3)
86
38
  minitest
87
- nokogiri (~> 1.5.0)
88
- rack (~> 1.6)
89
- rake (~> 10.4)
90
- rdoc (>= 2.4.2)
91
- sqlite3
39
+ rake (~> 12.3)
40
+ sqlite3 (~> 1.3.13)
92
41
 
93
42
  BUNDLED WITH
94
- 1.14.6
43
+ 1.17.3