deep_cloneable 2.4.0 → 3.0.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: c9bc79180e45ac09676614be579f12550f6e9e4e123a320bb42ce7675dfe95eb
4
- data.tar.gz: 39db7d4d43ee2dee821d16dce99feb1fcd70b20878d6bb37b9283b51213ed9b3
3
+ metadata.gz: 634f26d61403e05935d1c2cf8b529f15affa2d7b1db9e3eb4d7aa194d2641ac6
4
+ data.tar.gz: '089ad9bf666a3c7f1b1a934f507ac3c141b32b5a6f0d33b1e10ae371554cba0e'
5
5
  SHA512:
6
- metadata.gz: f4908868fbfd325c6953c8c68fbce7ce935349c9eedf206579b3f6433bfa1073f1f2c2c10cff81ce2ccd212c6db921d0be904784062318d98d1fd69d03eb21f4
7
- data.tar.gz: f8fd74ad2f5c95d9cecbd5df6450b9bf551a0aba708096b6cfbbee777d3ba43e6b1f64447c8cac03c1fdacf8867880a7ac8f2f2297fe17471b9881ea88097afb
6
+ metadata.gz: a75508666497109799f6131cf47787342c11c111bb5bd36171a8635e3ddc8204341339a075b2dcc8d3ac5dc8f986215ea0336ca886361515c920245a4ceac0a1
7
+ data.tar.gz: 81622f2d0878386d76e499df0d27e58aaf4bbf042772d88ac8fe1a821f52c5f3bf0efc528f2721302e280ef5b7bd73527b4d1342244190aeb53e37872fd59953
@@ -4,15 +4,14 @@ sudo: false
4
4
  cache: bundler
5
5
 
6
6
  rvm:
7
- - 1.8.7
8
- - 1.9.2
9
7
  - 1.9.3
10
8
  - 2.0.0
11
9
  - 2.1.5
12
10
  - 2.2.2
13
11
  - 2.3.0
14
12
  - 2.4.4
15
- - 2.5.1
13
+ - 2.5.5
14
+ - 2.6.3
16
15
 
17
16
  before_install:
18
17
  - gem update --system 2.7.8
@@ -27,59 +26,46 @@ gemfile:
27
26
  - gemfiles/5.0.gemfile
28
27
  - gemfiles/5.1.gemfile
29
28
  - gemfiles/5.2.gemfile
29
+ - gemfiles/6.0.gemfile
30
30
 
31
31
  matrix:
32
32
  exclude:
33
- - rvm: 1.8.7
34
- gemfile: gemfiles/4.0.gemfile
35
- - rvm: 1.8.7
36
- gemfile: gemfiles/4.1.gemfile
37
- - rvm: 1.8.7
38
- gemfile: gemfiles/4.2.gemfile
39
- - rvm: 1.8.7
40
- gemfile: gemfiles/5.0.gemfile
41
- - rvm: 1.8.7
42
- gemfile: gemfiles/5.1.gemfile
43
- - rvm: 1.8.7
44
- gemfile: gemfiles/5.2.gemfile
45
- - rvm: 1.9.2
46
- gemfile: gemfiles/4.0.gemfile
47
- - rvm: 1.9.2
48
- gemfile: gemfiles/4.1.gemfile
49
- - rvm: 1.9.2
50
- gemfile: gemfiles/4.2.gemfile
51
- - rvm: 1.9.2
52
- gemfile: gemfiles/5.0.gemfile
53
- - rvm: 1.9.2
54
- gemfile: gemfiles/5.1.gemfile
55
- - rvm: 1.9.2
56
- gemfile: gemfiles/5.2.gemfile
57
33
  - rvm: 1.9.3
58
34
  gemfile: gemfiles/5.0.gemfile
59
35
  - rvm: 1.9.3
60
36
  gemfile: gemfiles/5.1.gemfile
61
37
  - rvm: 1.9.3
62
38
  gemfile: gemfiles/5.2.gemfile
39
+ - rvm: 1.9.3
40
+ gemfile: gemfiles/6.0.gemfile
63
41
  - rvm: 2.0.0
64
42
  gemfile: gemfiles/5.0.gemfile
65
43
  - rvm: 2.0.0
66
44
  gemfile: gemfiles/5.1.gemfile
67
45
  - rvm: 2.0.0
68
46
  gemfile: gemfiles/5.2.gemfile
47
+ - rvm: 2.0.0
48
+ gemfile: gemfiles/6.0.gemfile
69
49
  - rvm: 2.1.5
70
50
  gemfile: gemfiles/5.0.gemfile
71
51
  - rvm: 2.1.5
72
52
  gemfile: gemfiles/5.1.gemfile
73
53
  - rvm: 2.1.5
74
54
  gemfile: gemfiles/5.2.gemfile
55
+ - rvm: 2.1.5
56
+ gemfile: gemfiles/6.0.gemfile
75
57
  - rvm: 2.2.2
76
58
  gemfile: gemfiles/3.1.gemfile
77
59
  - rvm: 2.2.2
78
60
  gemfile: gemfiles/4.2.gemfile
61
+ - rvm: 2.2.2
62
+ gemfile: gemfiles/6.0.gemfile
79
63
  - rvm: 2.3.0
80
64
  gemfile: gemfiles/3.1.gemfile
81
65
  - rvm: 2.3.0
82
66
  gemfile: gemfiles/4.2.gemfile
67
+ - rvm: 2.3.0
68
+ gemfile: gemfiles/6.0.gemfile
83
69
  - rvm: 2.4.4
84
70
  gemfile: gemfiles/3.1.gemfile
85
71
  - rvm: 2.4.4
@@ -90,13 +76,25 @@ matrix:
90
76
  gemfile: gemfiles/4.1.gemfile
91
77
  - rvm: 2.4.4
92
78
  gemfile: gemfiles/4.2.gemfile
93
- - rvm: 2.5.1
79
+ - rvm: 2.4.4
80
+ gemfile: gemfiles/6.0.gemfile
81
+ - rvm: 2.5.5
82
+ gemfile: gemfiles/3.1.gemfile
83
+ - rvm: 2.5.5
84
+ gemfile: gemfiles/3.2.gemfile
85
+ - rvm: 2.5.5
86
+ gemfile: gemfiles/4.0.gemfile
87
+ - rvm: 2.5.5
88
+ gemfile: gemfiles/4.1.gemfile
89
+ - rvm: 2.5.5
90
+ gemfile: gemfiles/4.2.gemfile
91
+ - rvm: 2.6.3
94
92
  gemfile: gemfiles/3.1.gemfile
95
- - rvm: 2.5.1
93
+ - rvm: 2.6.3
96
94
  gemfile: gemfiles/3.2.gemfile
97
- - rvm: 2.5.1
95
+ - rvm: 2.6.3
98
96
  gemfile: gemfiles/4.0.gemfile
99
- - rvm: 2.5.1
97
+ - rvm: 2.6.3
100
98
  gemfile: gemfiles/4.1.gemfile
101
- - rvm: 2.5.1
99
+ - rvm: 2.6.3
102
100
  gemfile: gemfiles/4.2.gemfile
data/Appraisals CHANGED
@@ -46,3 +46,7 @@ end
46
46
  appraise '5.2' do
47
47
  gem 'activerecord', '~> 5.2.0'
48
48
  end
49
+
50
+ appraise '6.0' do
51
+ gem 'activerecord', '~> 6.0.0.beta3'
52
+ end
@@ -6,6 +6,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.0.0] - 2019-08-18
10
+ ### Added
11
+ - Support for Ruby 2.6.3
12
+ - Support for Ruby 2.5.5
13
+ - Support for Rails 6.0
14
+ ### Changed
15
+ - When using conditions, return `nil` instead of `false` as return value when a condition fails
16
+ - Refactored gem structure and include in AR using lazy load hooks
17
+ - Skip validations on save by using module `DeepCloneable::SkipValidations` instead of a code patch
18
+ - Namespace of `ActiveRecord::Base::DeepCloneable::AssociationNotFoundException` changed to `DeepCloneable::AssociationNotFoundException`
19
+ - Process optional block after all other processing has been finished
20
+ ### Fixed
21
+ - Add the `validate` option to the list of passed dup options to ensure validations are never run on save
22
+ ### Removed
23
+ - Official support for ruby 1.8.7, as it is not supported by Travis CI anymore
24
+ - Official support for ruby 1.9.2, as it is not supported by Travis CI anymore
25
+
9
26
  ## [2.4.0] - 2019-01-10
10
27
  ### Added
11
28
  - Support `has_one` and `has_one - through`
@@ -166,7 +183,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
166
183
  ### Fixed
167
184
  - Convert existing code to a gem
168
185
 
169
- [Unreleased]: https://github.com/moiristo/deep_cloneable/compare/v2.4.0...HEAD
186
+ [Unreleased]: https://github.com/moiristo/deep_cloneable/compare/v3.0.0...HEAD
187
+ [3.0.0]: https://github.com/moiristo/deep_cloneable/compare/v2.4.0...v3.0.0
170
188
  [2.4.0]: https://github.com/moiristo/deep_cloneable/compare/v2.3.2...v2.4.0
171
189
  [2.3.2]: https://github.com/moiristo/deep_cloneable/compare/v2.3.1...v2.3.2
172
190
  [2.3.1]: https://github.com/moiristo/deep_cloneable/compare/v2.3.0...v2.3.1
data/Gemfile CHANGED
@@ -1,7 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'activerecord', '>= 3.1.0', '< 6'
4
-
3
+ gem 'activerecord', '>= 3.1.0', '< 7'
5
4
  gem 'git', '~> 1.2.9', :group => :test
6
5
  gem 'highline', '~> 1.6.0', :group => :test
7
6
  gem 'rack', '~> 1.6', :group => :test
@@ -75,7 +75,7 @@ PLATFORMS
75
75
  ruby
76
76
 
77
77
  DEPENDENCIES
78
- activerecord (>= 3.1.0, < 6)
78
+ activerecord (>= 3.1.0, < 7)
79
79
  appraisal
80
80
  git (~> 1.2.9)
81
81
  highline (~> 1.6.0)
@@ -88,4 +88,4 @@ DEPENDENCIES
88
88
  sqlite3
89
89
 
90
90
  BUNDLED WITH
91
- 1.16.1
91
+ 1.17.3
data/Rakefile CHANGED
@@ -5,18 +5,18 @@ require 'appraisal'
5
5
  begin
6
6
  require 'jeweler'
7
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"
8
+ gem.name = 'deep_cloneable'
9
+ gem.summary = %(This gem gives every ActiveRecord::Base object the possibility to do a deep clone.)
10
+ gem.description = %(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
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
+ puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
20
20
  end
21
21
 
22
22
  require 'rake/testtask'
@@ -30,7 +30,7 @@ task :default => :test
30
30
 
31
31
  require 'rdoc/task'
32
32
  Rake::RDocTask.new do |rdoc|
33
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
33
+ version = File.exist?('VERSION') ? File.read('VERSION') : ''
34
34
 
35
35
  rdoc.rdoc_dir = 'rdoc'
36
36
  rdoc.title = "deep_cloneable #{version}"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.0
1
+ 3.0.0
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: deep_cloneable 2.4.0 ruby lib
5
+ # stub: deep_cloneable 3.0.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "deep_cloneable".freeze
9
- s.version = "2.4.0"
9
+ s.version = "3.0.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Reinier de Lange".freeze]
14
- s.date = "2019-01-10"
14
+ s.date = "2019-08-18"
15
15
  s.description = "Extends the functionality of ActiveRecord::Base#dup to perform a deep clone that includes user specified associations. ".freeze
16
16
  s.email = "rjdelange@icloud.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -45,8 +45,13 @@ Gem::Specification.new do |s|
45
45
  "gemfiles/5.1.gemfile.lock",
46
46
  "gemfiles/5.2.gemfile",
47
47
  "gemfiles/5.2.gemfile.lock",
48
+ "gemfiles/6.0.gemfile",
49
+ "gemfiles/6.0.gemfile.lock",
48
50
  "init.rb",
49
51
  "lib/deep_cloneable.rb",
52
+ "lib/deep_cloneable/association_not_found_exception.rb",
53
+ "lib/deep_cloneable/deep_clone.rb",
54
+ "lib/deep_cloneable/skip_validations.rb",
50
55
  "readme.md",
51
56
  "test/database.yml",
52
57
  "test/models.rb",
@@ -56,19 +61,19 @@ Gem::Specification.new do |s|
56
61
  ]
57
62
  s.homepage = "http://github.com/moiristo/deep_cloneable".freeze
58
63
  s.licenses = ["MIT".freeze]
59
- s.rubygems_version = "2.7.6".freeze
64
+ s.rubygems_version = "3.0.2".freeze
60
65
  s.summary = "This gem gives every ActiveRecord::Base object the possibility to do a deep clone.".freeze
61
66
 
62
67
  if s.respond_to? :specification_version then
63
68
  s.specification_version = 4
64
69
 
65
70
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
66
- s.add_runtime_dependency(%q<activerecord>.freeze, ["< 6", ">= 3.1.0"])
71
+ s.add_runtime_dependency(%q<activerecord>.freeze, [">= 3.1.0", "< 7"])
67
72
  else
68
- s.add_dependency(%q<activerecord>.freeze, ["< 6", ">= 3.1.0"])
73
+ s.add_dependency(%q<activerecord>.freeze, [">= 3.1.0", "< 7"])
69
74
  end
70
75
  else
71
- s.add_dependency(%q<activerecord>.freeze, ["< 6", ">= 3.1.0"])
76
+ s.add_dependency(%q<activerecord>.freeze, [">= 3.1.0", "< 7"])
72
77
  end
73
78
  end
74
79
 
@@ -1,20 +1,17 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source 'http://rubygems.org'
4
4
 
5
- gem "activerecord", "~> 3.1.0"
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
10
- gem "minitest", :group => :test
11
- gem "appraisal", :group => :test
12
- gem "sqlite3", :group => :test
13
- gem "rdoc", "< 5", :group => :test
14
- gem "nokogiri", "~> 1.5.0", :group => :test
15
- gem "addressable", "~> 2.3.8"
16
- gem "i18n", "~> 0.6.5"
17
-
18
- group :test do
19
- gem "jeweler"
20
- end
5
+ gem 'activerecord', '~> 3.1.0'
6
+ gem 'addressable', '~> 2.3.8'
7
+ gem 'appraisal', :group => :test
8
+ gem 'git', '~> 1.2.9', :group => :test
9
+ gem 'highline', '~> 1.6.0', :group => :test
10
+ gem 'i18n', '~> 0.6.5'
11
+ gem 'jeweler', :group => :test
12
+ gem 'minitest', :group => :test
13
+ gem 'nokogiri', '~> 1.5.0', :group => :test
14
+ gem 'rack', '~> 1.6', :group => :test
15
+ gem 'rake', '~> 10.4', :group => :test
16
+ gem 'rdoc', '< 5', :group => :test
17
+ gem 'sqlite3', :group => :test
@@ -1,17 +1,17 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source 'http://rubygems.org'
4
4
 
5
- gem "activerecord", "~> 3.2.0"
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
10
- gem "minitest", :group => :test
11
- gem "appraisal", :group => :test
12
- gem "sqlite3", :group => :test
13
- gem "rdoc", "< 5", :group => :test
14
- gem "nokogiri", "~> 1.5.0", :group => :test
15
- gem "jeweler", :group => :test
16
- gem "addressable", "~> 2.3.8"
17
- gem "i18n", "~> 0.6.5"
5
+ gem 'activerecord', '~> 3.2.0'
6
+ gem 'addressable', '~> 2.3.8'
7
+ gem 'appraisal', :group => :test
8
+ gem 'git', '~> 1.2.9', :group => :test
9
+ gem 'highline', '~> 1.6.0', :group => :test
10
+ gem 'i18n', '~> 0.6.5'
11
+ gem 'jeweler', :group => :test
12
+ gem 'minitest', :group => :test
13
+ gem 'nokogiri', '~> 1.5.0', :group => :test
14
+ gem 'rack', '~> 1.6', :group => :test
15
+ gem 'rake', '~> 10.4', :group => :test
16
+ gem 'rdoc', '< 5', :group => :test
17
+ gem 'sqlite3', :group => :test
@@ -1,17 +1,17 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source 'http://rubygems.org'
4
4
 
5
- gem "activerecord", "~> 4.0.0"
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
10
- gem "minitest", :group => :test
11
- gem "appraisal", :group => :test
12
- gem "sqlite3", :group => :test
13
- gem "rdoc", ">= 2.4.2", "< 6", :group => :test
14
- gem "nokogiri", "~> 1.5.0", :group => :test
15
- gem "jeweler", "~> 2.1.1", :group => :test
16
- gem "i18n", "~> 0.6.5"
17
- gem "psych", "< 3", :group => :test
5
+ gem 'activerecord', '~> 4.0.0'
6
+ gem 'appraisal', :group => :test
7
+ gem 'git', '~> 1.2.9', :group => :test
8
+ gem 'highline', '~> 1.6.0', :group => :test
9
+ gem 'i18n', '~> 0.6.5'
10
+ gem 'jeweler', '~> 2.1.1', :group => :test
11
+ gem 'minitest', :group => :test
12
+ gem 'nokogiri', '~> 1.5.0', :group => :test
13
+ gem 'psych', '< 3', :group => :test
14
+ gem 'rack', '~> 1.6', :group => :test
15
+ gem 'rake', '~> 10.4', :group => :test
16
+ gem 'rdoc', '>= 2.4.2', '< 6', :group => :test
17
+ gem 'sqlite3', :group => :test
@@ -1,17 +1,17 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source 'http://rubygems.org'
4
4
 
5
- gem "activerecord", "~> 4.1.0"
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
10
- gem "minitest", :group => :test
11
- gem "appraisal", :group => :test
12
- gem "sqlite3", :group => :test
13
- gem "rdoc", ">= 2.4.2", "< 6", :group => :test
14
- gem "nokogiri", "~> 1.5.0", :group => :test
15
- gem "jeweler", "~> 2.1.1", :group => :test
16
- gem "i18n", "~> 0.6.9"
17
- gem "psych", "< 3", :group => :test
5
+ gem 'activerecord', '~> 4.1.0'
6
+ gem 'appraisal', :group => :test
7
+ gem 'git', '~> 1.2.9', :group => :test
8
+ gem 'highline', '~> 1.6.0', :group => :test
9
+ gem 'i18n', '~> 0.6.9'
10
+ gem 'jeweler', '~> 2.1.1', :group => :test
11
+ gem 'minitest', :group => :test
12
+ gem 'nokogiri', '~> 1.5.0', :group => :test
13
+ gem 'psych', '< 3', :group => :test
14
+ gem 'rack', '~> 1.6', :group => :test
15
+ gem 'rake', '~> 10.4', :group => :test
16
+ gem 'rdoc', '>= 2.4.2', '< 6', :group => :test
17
+ gem 'sqlite3', :group => :test
@@ -1,17 +1,17 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source 'http://rubygems.org'
4
4
 
5
- gem "activerecord", "~> 4.2.3"
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
10
- gem "minitest", :group => :test
11
- gem "appraisal", :group => :test
12
- gem "sqlite3", :group => :test
13
- gem "rdoc", ">= 2.4.2", "< 6", :group => :test
14
- gem "nokogiri", "~> 1.5.0", :group => :test
15
- gem "jeweler", "~> 2.1.1", :group => :test
16
- gem "i18n", "~> 0.7.0"
17
- gem "psych", "< 3", :group => :test
5
+ gem 'activerecord', '~> 4.2.3'
6
+ gem 'appraisal', :group => :test
7
+ gem 'git', '~> 1.2.9', :group => :test
8
+ gem 'highline', '~> 1.6.0', :group => :test
9
+ gem 'i18n', '~> 0.7.0'
10
+ gem 'jeweler', '~> 2.1.1', :group => :test
11
+ gem 'minitest', :group => :test
12
+ gem 'nokogiri', '~> 1.5.0', :group => :test
13
+ gem 'psych', '< 3', :group => :test
14
+ gem 'rack', '~> 1.6', :group => :test
15
+ gem 'rake', '~> 10.4', :group => :test
16
+ gem 'rdoc', '>= 2.4.2', '< 6', :group => :test
17
+ gem 'sqlite3', :group => :test