deep_cloneable 2.3.2 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +12 -14
- data/CHANGELOG.md +157 -1
- data/Gemfile +7 -11
- data/Gemfile.lock +7 -55
- data/LICENSE +1 -1
- data/Rakefile +5 -19
- data/deep_cloneable.gemspec +18 -70
- data/init.rb +3 -1
- data/lib/deep_cloneable/association_not_found_exception.rb +6 -0
- data/lib/deep_cloneable/deep_clone.rb +207 -0
- data/lib/deep_cloneable/skip_validations.rb +10 -0
- data/lib/deep_cloneable/version.rb +3 -0
- data/lib/deep_cloneable.rb +12 -195
- data/readme.md +113 -18
- metadata +15 -36
- data/.document +0 -5
- data/.travis.yml +0 -102
- data/VERSION +0 -1
- data/gemfiles/3.1.gemfile +0 -20
- data/gemfiles/3.1.gemfile.lock +0 -86
- data/gemfiles/3.2.gemfile +0 -17
- data/gemfiles/3.2.gemfile.lock +0 -86
- data/gemfiles/4.0.gemfile +0 -17
- data/gemfiles/4.0.gemfile.lock +0 -93
- data/gemfiles/4.1.gemfile +0 -17
- data/gemfiles/4.1.gemfile.lock +0 -93
- data/gemfiles/4.2.gemfile +0 -17
- data/gemfiles/4.2.gemfile.lock +0 -91
- data/gemfiles/5.0.gemfile +0 -16
- data/gemfiles/5.0.gemfile.lock +0 -91
- data/gemfiles/5.1.gemfile +0 -16
- data/gemfiles/5.1.gemfile.lock +0 -91
- data/gemfiles/5.2.gemfile +0 -15
- data/gemfiles/5.2.gemfile.lock +0 -91
- data/test/database.yml +0 -6
- data/test/models.rb +0 -142
- data/test/schema.rb +0 -146
- data/test/test_deep_cloneable.rb +0 -476
- data/test/test_helper.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e7c12bc2e33b41524e73c6802e8c3c80ae3e71856439d3509a8c1c285cc85d8
|
4
|
+
data.tar.gz: fa795a3daaf2af8fb522ffb038202af6ea3aa02c4eecdc22d931c2458f30e8bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c1a9cc10c9cc236ffef3ea9175b290feca66888608a2e2638c7b0b419cdb32fe53a514164bd222ab55b09f2df70e5e3c5570418204269fa0b140ed916f064a7
|
7
|
+
data.tar.gz: a1fe5158ba55927978b9afae9f8adaef51a45eb6e6e70d93bc0739f4e2128b1142968d22b63116f951b7ca23cf831b5d27ece2f0dfc16a68a018858a8b28ee3f
|
data/Appraisals
CHANGED
@@ -1,36 +1,23 @@
|
|
1
|
-
|
2
|
-
gem 'activerecord', '~> 3.1.0'
|
3
|
-
gem 'addressable', '~> 2.3.8'
|
4
|
-
gem 'i18n', '~> 0.6.5'
|
5
|
-
gem 'rdoc', '< 5', :group => :test
|
6
|
-
end
|
1
|
+
# frozen_string_literal: true
|
7
2
|
|
8
3
|
appraise '3.2' do
|
9
4
|
gem 'activerecord', '~> 3.2.0'
|
10
|
-
gem 'addressable', '~> 2.3.8'
|
11
5
|
gem 'i18n', '~> 0.6.5'
|
12
|
-
gem 'rdoc', '< 5', :group => :test
|
13
6
|
end
|
14
7
|
|
15
8
|
appraise '4.0' do
|
16
9
|
gem 'activerecord', '~> 4.0.0'
|
17
10
|
gem 'i18n', '~> 0.6.5'
|
18
|
-
gem 'psych', '< 3', :group => :test
|
19
|
-
gem 'jeweler', '~> 2.1.1', :group => :test
|
20
11
|
end
|
21
12
|
|
22
13
|
appraise '4.1' do
|
23
14
|
gem 'activerecord', '~> 4.1.0'
|
24
15
|
gem 'i18n', '~> 0.6.9'
|
25
|
-
gem 'psych', '< 3', :group => :test
|
26
|
-
gem 'jeweler', '~> 2.1.1', :group => :test
|
27
16
|
end
|
28
17
|
|
29
18
|
appraise '4.2' do
|
30
19
|
gem 'activerecord', '~> 4.2.3'
|
31
20
|
gem 'i18n', '~> 0.7.0'
|
32
|
-
gem 'psych', '< 3', :group => :test
|
33
|
-
gem 'jeweler', '~> 2.1.1', :group => :test
|
34
21
|
end
|
35
22
|
|
36
23
|
appraise '5.0' do
|
@@ -45,4 +32,15 @@ end
|
|
45
32
|
|
46
33
|
appraise '5.2' do
|
47
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'
|
41
|
+
end
|
42
|
+
|
43
|
+
appraise '7.0' do
|
44
|
+
gem 'activerecord', '~> 7.0.0'
|
45
|
+
gem 'sqlite3', '~> 1.4.2'
|
48
46
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,31 +1,114 @@
|
|
1
1
|
# Changelog
|
2
|
+
|
2
3
|
All notable changes to this project will be documented in this file.
|
3
4
|
|
4
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
7
|
|
7
8
|
## [Unreleased]
|
9
|
+
|
10
|
+
## [3.2.0] - 2021-12-28
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Added GitHub Actions integration & badge
|
15
|
+
- Added Ruby 2.7.5 support
|
16
|
+
- Added Rails 7.0 support
|
17
|
+
|
18
|
+
### Removed
|
19
|
+
|
20
|
+
- Removed Travis-ci integration
|
21
|
+
- Remove EOL rubies from CI (ruby 1.9-2.2)
|
22
|
+
|
23
|
+
## [3.1.0] - 2021-02-17
|
24
|
+
|
8
25
|
### Added
|
26
|
+
|
27
|
+
- Added a `preprocessor` option
|
28
|
+
- Added a `postprocessor` option
|
29
|
+
|
30
|
+
### Fixed
|
31
|
+
|
32
|
+
- Ensure the initial options hash is never modified
|
33
|
+
- When using conditions in combination with array includes, ensure nested includes are not accidentally deleted
|
34
|
+
|
35
|
+
### Removed
|
36
|
+
|
37
|
+
- Removed jeweler as a gem dependency
|
38
|
+
|
39
|
+
## [3.0.0] - 2019-08-18
|
40
|
+
|
41
|
+
### Added
|
42
|
+
|
43
|
+
- Support for Ruby 2.6.3
|
44
|
+
- Support for Ruby 2.5.5
|
45
|
+
- Support for Rails 6.0
|
46
|
+
|
47
|
+
### Changed
|
48
|
+
|
49
|
+
- When using conditions, return `nil` instead of `false` as return value when a condition fails
|
50
|
+
- Refactored gem structure and include in AR using lazy load hooks
|
51
|
+
- Skip validations on save by using module `DeepCloneable::SkipValidations` instead of a code patch
|
52
|
+
- Namespace of `ActiveRecord::Base::DeepCloneable::AssociationNotFoundException` changed to `DeepCloneable::AssociationNotFoundException`
|
53
|
+
- Process optional block after all other processing has been finished
|
54
|
+
|
55
|
+
### Fixed
|
56
|
+
|
57
|
+
- Add the `validate` option to the list of passed dup options to ensure validations are never run on save
|
58
|
+
|
59
|
+
### Removed
|
60
|
+
|
61
|
+
- Official support for ruby 1.8.7, as it is not supported by Travis CI anymore
|
62
|
+
- Official support for ruby 1.9.2, as it is not supported by Travis CI anymore
|
63
|
+
|
64
|
+
## [2.4.0] - 2019-01-10
|
65
|
+
|
66
|
+
### Added
|
67
|
+
|
68
|
+
- Support `has_one` and `has_one - through`
|
69
|
+
|
70
|
+
### Changed
|
71
|
+
|
72
|
+
- Lint code via Rubocop
|
73
|
+
- Refactor code to improve readability
|
74
|
+
- Use HTTPS in the gemspec website URL
|
75
|
+
|
76
|
+
## [2.3.2] - 2018-04-11
|
77
|
+
|
78
|
+
### Added
|
79
|
+
|
9
80
|
- Support for Ruby 2.4 and 2.5
|
10
81
|
- Support for Rails 5.1 and 5.2
|
11
82
|
- CHANGELOG.md
|
12
83
|
|
13
84
|
## [2.3.1] - 2017-10-03
|
85
|
+
|
14
86
|
### Added
|
87
|
+
|
15
88
|
- Documentation on when the optional block is invoked, which is before attributes are excluded
|
89
|
+
|
16
90
|
### Fixed
|
91
|
+
|
17
92
|
- Conditional includes for nested associations
|
18
93
|
|
19
94
|
## [2.3.0] - 2017-06-14
|
95
|
+
|
20
96
|
### Added
|
97
|
+
|
21
98
|
- Support for skipping missing associations
|
99
|
+
|
22
100
|
### Fixed
|
101
|
+
|
23
102
|
- Multikey hashes in include arrays
|
24
103
|
|
25
104
|
## [2.2.2] - 2016-10-10
|
105
|
+
|
26
106
|
### Added
|
107
|
+
|
27
108
|
- Documentation on cloning associated Carrierwave files
|
109
|
+
|
28
110
|
### Changed
|
111
|
+
|
29
112
|
- Use `inverse_of` when defined for finding the reverse association
|
30
113
|
- Cache bundler in Travis
|
31
114
|
- Use index operator for setting column defaults
|
@@ -33,130 +116,203 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
33
116
|
- Bump rails 5.0 appraisal
|
34
117
|
|
35
118
|
## [2.2.1] - 2016-05-27
|
119
|
+
|
36
120
|
### Fixed
|
121
|
+
|
37
122
|
- Properly set column defaults for attributes
|
38
123
|
- Rails 5.0 compatibility
|
39
124
|
|
40
125
|
## [2.2.0] - 2016-01-11
|
126
|
+
|
41
127
|
### Added
|
128
|
+
|
42
129
|
- Support for conditional cloning when using array inclusions
|
130
|
+
|
43
131
|
### Changed
|
132
|
+
|
44
133
|
- Bump rails 4.2 appraisal to 4.2.3
|
45
134
|
|
46
135
|
## [2.1.0] - 2015-03-10
|
136
|
+
|
47
137
|
### Added
|
138
|
+
|
48
139
|
- Support for conditional cloning
|
140
|
+
|
49
141
|
### Changed
|
142
|
+
|
50
143
|
- Check the dictionary before cloning has_many through or habtm associations
|
51
144
|
- Refactor methods to refer to `dup` instead of `clone`
|
52
145
|
|
53
146
|
## [2.0.2] - 2014-12-17
|
147
|
+
|
54
148
|
### Fixed
|
149
|
+
|
55
150
|
- Broken activerecord dependency in gemspec
|
56
151
|
|
57
152
|
## [2.0.1] - 2014-12-17
|
153
|
+
|
58
154
|
### Fixed
|
155
|
+
|
59
156
|
- Rails 4.2.0.rc3 compatibility
|
60
157
|
|
61
158
|
## [2.0.0] - 2014-06-26
|
159
|
+
|
62
160
|
### Removed
|
161
|
+
|
63
162
|
- Override of `dup`
|
64
163
|
- References to `dup`
|
164
|
+
|
65
165
|
### Fixed
|
166
|
+
|
66
167
|
- Open-ended dependency warning
|
67
168
|
|
68
169
|
## [1.7.0] - 2014-06-25
|
170
|
+
|
69
171
|
### Deprecated
|
172
|
+
|
70
173
|
- Deprecated `dup` in favor of `deep_clone`
|
71
174
|
|
72
175
|
## [1.6.1] - 2014-04-16
|
176
|
+
|
73
177
|
### Changed
|
178
|
+
|
74
179
|
- Switched test suite to minitest
|
75
180
|
- Update travis.yml with rails 4.1
|
181
|
+
|
76
182
|
### Fixed
|
183
|
+
|
77
184
|
- Rails 4.1 compatibility
|
78
185
|
|
79
186
|
## [1.6.0] - 2013-11-02
|
187
|
+
|
80
188
|
### Added
|
189
|
+
|
81
190
|
- `:only` option for whitelisting attributes
|
82
191
|
- MIT license
|
83
192
|
|
84
193
|
## [1.5.5] - 2013-08-28
|
194
|
+
|
85
195
|
### Fixed
|
196
|
+
|
86
197
|
- Fix activerecord gem dependency
|
87
198
|
|
88
199
|
## [1.5.4] - 2013-08-12
|
200
|
+
|
89
201
|
### Removed
|
202
|
+
|
90
203
|
- Rails 3.0 support, as it was broken anyway
|
204
|
+
|
91
205
|
### Changed
|
206
|
+
|
92
207
|
- Update travis.yml with rails 4.0
|
208
|
+
|
93
209
|
### Fixed
|
210
|
+
|
94
211
|
- Appraisals should load the correct major version of rails
|
95
212
|
- Exclude unsupported builds in Travis
|
96
213
|
|
97
214
|
## [1.5.3] - 2013-06-18
|
215
|
+
|
98
216
|
### Fixed
|
217
|
+
|
99
218
|
- Fix `initialize_dup` error
|
100
219
|
|
101
220
|
## [1.5.2] - 2013-06-10
|
221
|
+
|
102
222
|
### Fixed
|
223
|
+
|
103
224
|
- Properly support has_many through associations
|
104
225
|
- Fix reverse association lookup for self-referential models
|
105
226
|
- Travis.ci status image
|
106
227
|
|
107
228
|
## [1.5.1] - 2013-03-06
|
229
|
+
|
108
230
|
### Fixed
|
231
|
+
|
109
232
|
- Ruby 2.0 compatibility
|
110
233
|
|
111
234
|
## [1.5.0] - 2013-02-27
|
235
|
+
|
112
236
|
### Added
|
237
|
+
|
113
238
|
- `:validate` option to disable validations when saving a cloned object
|
239
|
+
|
114
240
|
### Fixed
|
241
|
+
|
115
242
|
- Depend on activerecord instead of rails
|
116
243
|
|
117
244
|
## [1.4.1] - 2012-07-23
|
245
|
+
|
118
246
|
### Fixed
|
247
|
+
|
119
248
|
- Don't save HABTM associations on clone
|
120
249
|
|
121
250
|
## [1.4.0] - 2012-04-02
|
251
|
+
|
122
252
|
### Added
|
253
|
+
|
123
254
|
- Possibility to add a optional block
|
255
|
+
|
124
256
|
### Fixed
|
257
|
+
|
125
258
|
- Ruby 1.8.7 compatibility for rails 3.1
|
126
259
|
|
127
260
|
## [1.3.1] - 2012-01-26
|
261
|
+
|
128
262
|
### Fixed
|
263
|
+
|
129
264
|
- Rails 3.2 compatibility
|
130
265
|
|
131
266
|
## [1.2.4] - 2011-06-15
|
267
|
+
|
132
268
|
### Changed
|
269
|
+
|
133
270
|
- Raise an exception when the reverse association is missing
|
271
|
+
|
134
272
|
### Fixed
|
273
|
+
|
135
274
|
- Reset column value when cloning associations
|
136
275
|
|
137
276
|
## [1.2.3] - 2011-02-27
|
277
|
+
|
138
278
|
### Changed
|
279
|
+
|
139
280
|
- Find and set the reverse association when cloning associations
|
140
281
|
|
141
282
|
## [1.2.2] - 2011-02-21
|
283
|
+
|
142
284
|
### Fixed
|
285
|
+
|
143
286
|
- Use association reflection for fetching the primary key name
|
144
287
|
|
145
288
|
## [1.2.1] - 2011-02-07
|
289
|
+
|
146
290
|
### Fixed
|
291
|
+
|
147
292
|
- Cloning for polymorphic associations
|
148
293
|
|
149
294
|
## [1.2.0] - 2010-10-20
|
295
|
+
|
150
296
|
### Added
|
297
|
+
|
151
298
|
- `:except` option for excluding attributes
|
299
|
+
|
152
300
|
### Fixed
|
301
|
+
|
153
302
|
- Set foreign keys properly
|
154
303
|
|
155
304
|
## 1.0.0 - 2010-10-18
|
305
|
+
|
156
306
|
### Fixed
|
307
|
+
|
157
308
|
- Convert existing code to a gem
|
158
309
|
|
159
|
-
[
|
310
|
+
[unreleased]: https://github.com/moiristo/deep_cloneable/compare/v3.2.0...HEAD
|
311
|
+
[3.2.0]: https://github.com/moiristo/deep_cloneable/compare/v3.1.0...v3.2.0
|
312
|
+
[3.1.0]: https://github.com/moiristo/deep_cloneable/compare/v3.0.0...v3.1.0
|
313
|
+
[3.0.0]: https://github.com/moiristo/deep_cloneable/compare/v2.4.0...v3.0.0
|
314
|
+
[2.4.0]: https://github.com/moiristo/deep_cloneable/compare/v2.3.2...v2.4.0
|
315
|
+
[2.3.2]: https://github.com/moiristo/deep_cloneable/compare/v2.3.1...v2.3.2
|
160
316
|
[2.3.1]: https://github.com/moiristo/deep_cloneable/compare/v2.3.0...v2.3.1
|
161
317
|
[2.3.0]: https://github.com/moiristo/deep_cloneable/compare/v2.2.2...v2.3.0
|
162
318
|
[2.2.2]: https://github.com/moiristo/deep_cloneable/compare/v2.2.1...v2.2.2
|
data/Gemfile
CHANGED
@@ -1,15 +1,11 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'http://rubygems.org'
|
4
4
|
|
5
|
-
gem '
|
6
|
-
gem '
|
7
|
-
gem '
|
8
|
-
gem 'git', '~> 1.2.9', :group => :test
|
5
|
+
gem 'activerecord', '>= 3.1.0', '< 8'
|
6
|
+
gem 'bundler', '~> 1.17.3', :group => :test
|
7
|
+
gem 'rake', '~> 12.3', :group => :test
|
9
8
|
|
10
|
-
gem 'minitest', :group => :test
|
11
9
|
gem 'appraisal', :group => :test
|
12
|
-
gem '
|
13
|
-
gem '
|
14
|
-
gem 'nokogiri', '~> 1.5.0', :group => :test
|
15
|
-
gem 'jeweler', :group => :test
|
10
|
+
gem 'minitest', :group => :test
|
11
|
+
gem 'sqlite3', '~> 1.3.13', :group => :test
|
data/Gemfile.lock
CHANGED
@@ -12,61 +12,18 @@ GEM
|
|
12
12
|
i18n (>= 0.7, < 2)
|
13
13
|
minitest (~> 5.1)
|
14
14
|
tzinfo (~> 1.1)
|
15
|
-
addressable (2.4.0)
|
16
15
|
appraisal (2.2.0)
|
17
16
|
bundler
|
18
17
|
rake
|
19
18
|
thor (>= 0.14.0)
|
20
19
|
arel (9.0.0)
|
21
|
-
builder (3.2.3)
|
22
20
|
concurrent-ruby (1.0.5)
|
23
|
-
descendants_tracker (0.0.4)
|
24
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
25
|
-
faraday (0.9.2)
|
26
|
-
multipart-post (>= 1.2, < 3)
|
27
|
-
git (1.2.9.1)
|
28
|
-
github_api (0.16.0)
|
29
|
-
addressable (~> 2.4.0)
|
30
|
-
descendants_tracker (~> 0.0.4)
|
31
|
-
faraday (~> 0.8, < 0.10)
|
32
|
-
hashie (>= 3.4)
|
33
|
-
mime-types (>= 1.16, < 3.0)
|
34
|
-
oauth2 (~> 1.0)
|
35
|
-
hashie (3.5.7)
|
36
|
-
highline (1.6.21)
|
37
21
|
i18n (1.0.0)
|
38
22
|
concurrent-ruby (~> 1.0)
|
39
|
-
jeweler (2.3.9)
|
40
|
-
builder
|
41
|
-
bundler
|
42
|
-
git (>= 1.2.5)
|
43
|
-
github_api (~> 0.16.0)
|
44
|
-
highline (>= 1.6.15)
|
45
|
-
nokogiri (>= 1.5.10)
|
46
|
-
psych
|
47
|
-
rake
|
48
|
-
rdoc
|
49
|
-
semver2
|
50
|
-
jwt (1.5.6)
|
51
|
-
mime-types (2.99.3)
|
52
23
|
minitest (5.11.3)
|
53
|
-
|
54
|
-
multi_xml (0.6.0)
|
55
|
-
multipart-post (2.0.0)
|
56
|
-
nokogiri (1.5.11)
|
57
|
-
oauth2 (1.4.0)
|
58
|
-
faraday (>= 0.8, < 0.13)
|
59
|
-
jwt (~> 1.0)
|
60
|
-
multi_json (~> 1.3)
|
61
|
-
multi_xml (~> 0.5)
|
62
|
-
rack (>= 1.2, < 3)
|
63
|
-
psych (3.0.2)
|
64
|
-
rack (1.6.9)
|
65
|
-
rake (10.5.0)
|
66
|
-
rdoc (5.1.0)
|
67
|
-
semver2 (3.4.2)
|
24
|
+
rake (12.3.3)
|
68
25
|
sqlite3 (1.3.13)
|
69
|
-
thor (0.20.
|
26
|
+
thor (0.20.3)
|
70
27
|
thread_safe (0.3.6)
|
71
28
|
tzinfo (1.2.5)
|
72
29
|
thread_safe (~> 0.1)
|
@@ -75,17 +32,12 @@ PLATFORMS
|
|
75
32
|
ruby
|
76
33
|
|
77
34
|
DEPENDENCIES
|
78
|
-
activerecord (>= 3.1.0, <
|
35
|
+
activerecord (>= 3.1.0, < 8)
|
79
36
|
appraisal
|
80
|
-
|
81
|
-
highline (~> 1.6.0)
|
82
|
-
jeweler
|
37
|
+
bundler (~> 1.17.3)
|
83
38
|
minitest
|
84
|
-
|
85
|
-
|
86
|
-
rake (~> 10.4)
|
87
|
-
rdoc (>= 2.4.2, < 6)
|
88
|
-
sqlite3
|
39
|
+
rake (~> 12.3)
|
40
|
+
sqlite3 (~> 1.3.13)
|
89
41
|
|
90
42
|
BUNDLED WITH
|
91
|
-
1.
|
43
|
+
1.17.3
|
data/LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -1,25 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'bundler/setup'
|
5
|
+
require 'bundler/gem_tasks'
|
3
6
|
require 'appraisal'
|
4
|
-
|
5
|
-
begin
|
6
|
-
require 'jeweler'
|
7
|
-
Jeweler::Tasks.new do |gem|
|
8
|
-
gem.name = "deep_cloneable"
|
9
|
-
gem.summary = %Q{This gem gives every ActiveRecord::Base object the possibility to do a deep clone.}
|
10
|
-
gem.description = %Q{Extends the functionality of ActiveRecord::Base#dup to perform a deep clone that includes user specified associations. }
|
11
|
-
gem.email = "rjdelange@icloud.com"
|
12
|
-
gem.homepage = "http://github.com/moiristo/deep_cloneable"
|
13
|
-
gem.authors = ["Reinier de Lange"]
|
14
|
-
gem.license = "MIT"
|
15
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
-
end
|
17
|
-
Jeweler::GemcutterTasks.new
|
18
|
-
rescue LoadError
|
19
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
|
-
end
|
21
|
-
|
22
7
|
require 'rake/testtask'
|
8
|
+
|
23
9
|
Rake::TestTask.new(:test) do |test|
|
24
10
|
test.libs << 'lib' << 'test'
|
25
11
|
test.pattern = 'test/**/test_*.rb'
|
@@ -30,7 +16,7 @@ task :default => :test
|
|
30
16
|
|
31
17
|
require 'rdoc/task'
|
32
18
|
Rake::RDocTask.new do |rdoc|
|
33
|
-
version = File.exist?('VERSION') ? File.read('VERSION') :
|
19
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ''
|
34
20
|
|
35
21
|
rdoc.rdoc_dir = 'rdoc'
|
36
22
|
rdoc.title = "deep_cloneable #{version}"
|
data/deep_cloneable.gemspec
CHANGED
@@ -1,73 +1,21 @@
|
|
1
|
-
#
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: deep_cloneable 2.3.2 ruby lib
|
1
|
+
# frozen_string_literal: true
|
6
2
|
|
7
|
-
|
8
|
-
|
9
|
-
s.version = "2.3.2"
|
10
|
-
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
-
s.require_paths = ["lib".freeze]
|
13
|
-
s.authors = ["Reinier de Lange".freeze]
|
14
|
-
s.date = "2018-04-11"
|
15
|
-
s.description = "Extends the functionality of ActiveRecord::Base#dup to perform a deep clone that includes user specified associations. ".freeze
|
16
|
-
s.email = "rjdelange@icloud.com".freeze
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"LICENSE"
|
19
|
-
]
|
20
|
-
s.files = [
|
21
|
-
".document",
|
22
|
-
".travis.yml",
|
23
|
-
"Appraisals",
|
24
|
-
"CHANGELOG.md",
|
25
|
-
"Gemfile",
|
26
|
-
"Gemfile.lock",
|
27
|
-
"LICENSE",
|
28
|
-
"Rakefile",
|
29
|
-
"VERSION",
|
30
|
-
"deep_cloneable.gemspec",
|
31
|
-
"gemfiles/3.1.gemfile",
|
32
|
-
"gemfiles/3.1.gemfile.lock",
|
33
|
-
"gemfiles/3.2.gemfile",
|
34
|
-
"gemfiles/3.2.gemfile.lock",
|
35
|
-
"gemfiles/4.0.gemfile",
|
36
|
-
"gemfiles/4.0.gemfile.lock",
|
37
|
-
"gemfiles/4.1.gemfile",
|
38
|
-
"gemfiles/4.1.gemfile.lock",
|
39
|
-
"gemfiles/4.2.gemfile",
|
40
|
-
"gemfiles/4.2.gemfile.lock",
|
41
|
-
"gemfiles/5.0.gemfile",
|
42
|
-
"gemfiles/5.0.gemfile.lock",
|
43
|
-
"gemfiles/5.1.gemfile",
|
44
|
-
"gemfiles/5.1.gemfile.lock",
|
45
|
-
"gemfiles/5.2.gemfile",
|
46
|
-
"gemfiles/5.2.gemfile.lock",
|
47
|
-
"init.rb",
|
48
|
-
"lib/deep_cloneable.rb",
|
49
|
-
"readme.md",
|
50
|
-
"test/database.yml",
|
51
|
-
"test/models.rb",
|
52
|
-
"test/schema.rb",
|
53
|
-
"test/test_deep_cloneable.rb",
|
54
|
-
"test/test_helper.rb"
|
55
|
-
]
|
56
|
-
s.homepage = "http://github.com/moiristo/deep_cloneable".freeze
|
57
|
-
s.licenses = ["MIT".freeze]
|
58
|
-
s.rubygems_version = "2.7.6".freeze
|
59
|
-
s.summary = "This gem gives every ActiveRecord::Base object the possibility to do a deep clone.".freeze
|
60
|
-
|
61
|
-
if s.respond_to? :specification_version then
|
62
|
-
s.specification_version = 4
|
3
|
+
$:.unshift File.expand_path('../lib', __FILE__)
|
4
|
+
require 'deep_cloneable/version'
|
63
5
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = 'deep_cloneable'
|
8
|
+
s.version = DeepCloneable::VERSION
|
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. '
|
11
|
+
s.summary = 'This gem gives every ActiveRecord::Base object the possibility to do a deep clone.'
|
12
|
+
s.email = 'rjdelange@icloud.com'
|
13
|
+
s.extra_rdoc_files = ['LICENSE']
|
14
|
+
s.files = Dir.glob('{bin/*,lib/**/*,[A-Z]*}')
|
15
|
+
s.homepage = 'https://github.com/moiristo/deep_cloneable'
|
16
|
+
s.licenses = ['MIT']
|
17
|
+
s.platform = Gem::Platform::RUBY
|
18
|
+
s.required_ruby_version = '>= 1.9.3'
|
19
|
+
s.require_paths = ['lib']
|
20
|
+
s.add_runtime_dependency('activerecord', ['>= 3.1.0', '< 8'])
|
72
21
|
end
|
73
|
-
|
data/init.rb
CHANGED