deep_cloneable 2.2.0 → 2.2.1

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
  SHA1:
3
- metadata.gz: e942e18b8b8a7bbcd53d9bcc0323316216a4605f
4
- data.tar.gz: b3e1250b6d10ff291bcf5b6ca93670a98d2e762c
3
+ metadata.gz: a9abd4bad6bcde01dda80336bef38de04d758fa4
4
+ data.tar.gz: ada447a889c879427c9e8c8c63424f197fd7ec63
5
5
  SHA512:
6
- metadata.gz: 84638e643bd06868cecde89005007160d11f10c35f390f0f7357bfce432409dea6d3a4eba6929786ee2bf6fac0eff7cac257fe7dd9a348c71b50483d4e043213
7
- data.tar.gz: 414302546e5ffe0c85ad47daf5d1d6d275c13736ef6668d406b2ff66be9104d16ee2c2960cebc3a5275dedbd36669b6c400c77f37bdb71f0471d21e44fc0d7e2
6
+ metadata.gz: 345aaef10923a675bfefc8fa7d5d3f5a1f79d7612dda82b83a7a4d3f5e650031f90b091ea0142d80446e0f31af1fe598b8ed48104e3db8344a0c25df4f097e4f
7
+ data.tar.gz: a3bb5b93f93237f6f089f7c1428d5b2440144ee5b26cd6e24340dac81b2afa4b53b3156eca54e675774e6d134863e2e0da7ab7c279ad4b5bb68c95f433b066a6
data/.travis.yml CHANGED
@@ -4,6 +4,8 @@ rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
6
  - 2.1.5
7
+ - 2.2.2
8
+ - 2.3.0
7
9
 
8
10
  gemfile:
9
11
  - gemfiles/3.1.gemfile
@@ -11,6 +13,7 @@ gemfile:
11
13
  - gemfiles/4.0.gemfile
12
14
  - gemfiles/4.1.gemfile
13
15
  - gemfiles/4.2.gemfile
16
+ - gemfiles/5.0.gemfile
14
17
 
15
18
  matrix:
16
19
  exclude:
@@ -20,9 +23,23 @@ matrix:
20
23
  gemfile: gemfiles/4.1.gemfile
21
24
  - rvm: 1.8.7
22
25
  gemfile: gemfiles/4.2.gemfile
26
+ - rvm: 1.8.7
27
+ gemfile: gemfiles/5.0.gemfile
23
28
  - rvm: 1.9.2
24
29
  gemfile: gemfiles/4.0.gemfile
25
30
  - rvm: 1.9.2
26
31
  gemfile: gemfiles/4.1.gemfile
27
32
  - rvm: 1.9.2
28
- gemfile: gemfiles/4.2.gemfile
33
+ gemfile: gemfiles/4.2.gemfile
34
+ - rvm: 1.9.2
35
+ gemfile: gemfiles/5.0.gemfile
36
+ - rvm: 1.9.3
37
+ gemfile: gemfiles/5.0.gemfile
38
+ - rvm: 2.0.0
39
+ gemfile: gemfiles/5.0.gemfile
40
+ - rvm: 2.1.5
41
+ gemfile: gemfiles/5.0.gemfile
42
+ - rvm: 2.2.2
43
+ gemfile: gemfiles/3.1.gemfile
44
+ - rvm: 2.3.0
45
+ gemfile: gemfiles/3.1.gemfile
data/Appraisals CHANGED
@@ -19,4 +19,9 @@ end
19
19
  appraise '4.2' do
20
20
  gem 'activerecord', '~> 4.2.3'
21
21
  gem 'i18n', '~> 0.7.0'
22
+ end
23
+
24
+ appraise '5.0' do
25
+ gem 'activerecord', '~> 5.0.0.rc1'
26
+ gem 'i18n', '~> 0.7.0'
22
27
  end
data/Gemfile CHANGED
@@ -1,9 +1,11 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'activerecord', '>= 3.1.0', '< 5.0.0'
3
+ gem 'activerecord', '>= 3.1.0', '< 5.2.0'
4
4
 
5
5
  gem 'i18n', '~> 0.6.5', :group => :test
6
6
  gem 'highline', '~> 1.6.0', :group => :test
7
+ gem 'rake', '~> 10.4', :group => :test
8
+ gem 'git', '~> 1.2.9', :group => :test
7
9
 
8
10
  gem 'minitest', :group => :test
9
11
  gem 'appraisal', :group => :test
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (4.1.14)
5
- activesupport (= 4.1.14)
4
+ activemodel (4.1.15)
5
+ activesupport (= 4.1.15)
6
6
  builder (~> 3.1)
7
- activerecord (4.1.14)
8
- activemodel (= 4.1.14)
9
- activesupport (= 4.1.14)
7
+ activerecord (4.1.15)
8
+ activemodel (= 4.1.15)
9
+ activesupport (= 4.1.15)
10
10
  arel (~> 5.0.0)
11
- activesupport (4.1.14)
11
+ activesupport (4.1.15)
12
12
  i18n (~> 0.6, >= 0.6.9)
13
13
  json (~> 1.7, >= 1.7.7)
14
14
  minitest (~> 5.1)
@@ -26,17 +26,16 @@ GEM
26
26
  faraday (0.9.2)
27
27
  multipart-post (>= 1.2, < 3)
28
28
  git (1.2.9.1)
29
- github_api (0.13.1)
29
+ github_api (0.14.0)
30
30
  addressable (~> 2.4.0)
31
31
  descendants_tracker (~> 0.0.4)
32
32
  faraday (~> 0.8, < 0.10)
33
33
  hashie (>= 3.4)
34
- multi_json (>= 1.7.5, < 2.0)
35
34
  oauth2
36
- hashie (3.4.3)
35
+ hashie (3.4.4)
37
36
  highline (1.6.21)
38
37
  i18n (0.6.11)
39
- jeweler (2.0.1)
38
+ jeweler (2.1.1)
40
39
  builder
41
40
  bundler (>= 1.0)
42
41
  git (>= 1.2.5)
@@ -45,23 +44,25 @@ GEM
45
44
  nokogiri (>= 1.5.10)
46
45
  rake
47
46
  rdoc
47
+ semver
48
48
  json (1.8.3)
49
- jwt (1.5.2)
50
- minitest (5.8.3)
51
- multi_json (1.11.2)
49
+ jwt (1.5.1)
50
+ minitest (5.9.0)
51
+ multi_json (1.12.1)
52
52
  multi_xml (0.5.5)
53
53
  multipart-post (2.0.0)
54
54
  nokogiri (1.5.11)
55
- oauth2 (1.0.0)
55
+ oauth2 (1.1.0)
56
56
  faraday (>= 0.8, < 0.10)
57
- jwt (~> 1.0)
57
+ jwt (~> 1.0, < 1.5.2)
58
58
  multi_json (~> 1.3)
59
59
  multi_xml (~> 0.5)
60
- rack (~> 1.2)
60
+ rack (>= 1.2, < 3)
61
61
  rack (1.6.4)
62
- rake (10.4.2)
63
- rdoc (4.2.1)
62
+ rake (10.5.0)
63
+ rdoc (4.2.2)
64
64
  json (~> 1.4)
65
+ semver (1.0.1)
65
66
  sqlite3 (1.3.11)
66
67
  thor (0.19.1)
67
68
  thread_safe (0.3.5)
@@ -72,15 +73,17 @@ PLATFORMS
72
73
  ruby
73
74
 
74
75
  DEPENDENCIES
75
- activerecord (>= 3.1.0, < 5.0.0)
76
+ activerecord (>= 3.1.0, < 5.2.0)
76
77
  appraisal
78
+ git (~> 1.2.9)
77
79
  highline (~> 1.6.0)
78
80
  i18n (~> 0.6.5)
79
81
  jeweler
80
82
  minitest
81
83
  nokogiri (~> 1.5.0)
84
+ rake (~> 10.4)
82
85
  rdoc (>= 2.4.2)
83
86
  sqlite3
84
87
 
85
88
  BUNDLED WITH
86
- 1.10.6
89
+ 1.11.2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2.1
@@ -2,18 +2,18 @@
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.2.0 ruby lib
5
+ # stub: deep_cloneable 2.2.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
- s.name = "deep_cloneable"
9
- s.version = "2.2.0"
8
+ s.name = "deep_cloneable".freeze
9
+ s.version = "2.2.1"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Reinier de Lange"]
14
- s.date = "2016-01-11"
15
- s.description = "Extends the functionality of ActiveRecord::Base#dup to perform a deep clone that includes user specified associations. "
16
- s.email = "r.j.delange@nedforce.nl"
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 = "2016-05-27"
15
+ s.description = "Extends the functionality of ActiveRecord::Base#dup to perform a deep clone that includes user specified associations. ".freeze
16
+ s.email = "r.j.delange@nedforce.nl".freeze
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
19
  "readme.md"
@@ -38,6 +38,8 @@ Gem::Specification.new do |s|
38
38
  "gemfiles/4.1.gemfile.lock",
39
39
  "gemfiles/4.2.gemfile",
40
40
  "gemfiles/4.2.gemfile.lock",
41
+ "gemfiles/5.0.gemfile",
42
+ "gemfiles/5.0.gemfile.lock",
41
43
  "init.rb",
42
44
  "lib/deep_cloneable.rb",
43
45
  "readme.md",
@@ -47,21 +49,21 @@ Gem::Specification.new do |s|
47
49
  "test/test_deep_cloneable.rb",
48
50
  "test/test_helper.rb"
49
51
  ]
50
- s.homepage = "http://github.com/moiristo/deep_cloneable"
51
- s.licenses = ["MIT"]
52
- s.rubygems_version = "2.4.8"
53
- s.summary = "This gem gives every ActiveRecord::Base object the possibility to do a deep clone."
52
+ s.homepage = "http://github.com/moiristo/deep_cloneable".freeze
53
+ s.licenses = ["MIT".freeze]
54
+ s.rubygems_version = "2.6.4".freeze
55
+ s.summary = "This gem gives every ActiveRecord::Base object the possibility to do a deep clone.".freeze
54
56
 
55
57
  if s.respond_to? :specification_version then
56
58
  s.specification_version = 4
57
59
 
58
60
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
59
- s.add_runtime_dependency(%q<activerecord>, ["< 5.0.0", ">= 3.1.0"])
61
+ s.add_runtime_dependency(%q<activerecord>.freeze, ["< 5.2.0", ">= 3.1.0"])
60
62
  else
61
- s.add_dependency(%q<activerecord>, ["< 5.0.0", ">= 3.1.0"])
63
+ s.add_dependency(%q<activerecord>.freeze, ["< 5.2.0", ">= 3.1.0"])
62
64
  end
63
65
  else
64
- s.add_dependency(%q<activerecord>, ["< 5.0.0", ">= 3.1.0"])
66
+ s.add_dependency(%q<activerecord>.freeze, ["< 5.2.0", ">= 3.1.0"])
65
67
  end
66
68
  end
67
69
 
data/gemfiles/3.1.gemfile CHANGED
@@ -5,6 +5,8 @@ source "http://rubygems.org"
5
5
  gem "activerecord", "~> 3.1.0"
6
6
  gem "i18n", "~> 0.6.5", :group => :test
7
7
  gem "highline", "~> 1.6.0", :group => :test
8
+ gem "rake", "~> 10.4", :group => :test
9
+ gem "git", "~> 1.2.9", :group => :test
8
10
  gem "minitest", :group => :test
9
11
  gem "appraisal", :group => :test
10
12
  gem "sqlite3", :group => :test
@@ -29,10 +29,10 @@ GEM
29
29
  multi_json (~> 1.4)
30
30
  nokogiri (~> 1.5.2)
31
31
  oauth2
32
- hashie (3.4.3)
32
+ hashie (3.4.4)
33
33
  highline (1.6.21)
34
34
  i18n (0.6.11)
35
- jeweler (2.0.1)
35
+ jeweler (2.1.1)
36
36
  builder
37
37
  bundler (>= 1.0)
38
38
  git (>= 1.2.5)
@@ -41,26 +41,28 @@ GEM
41
41
  nokogiri (>= 1.5.10)
42
42
  rake
43
43
  rdoc
44
+ semver
44
45
  json (1.8.3)
45
- jwt (1.5.2)
46
- minitest (5.8.3)
47
- multi_json (1.11.2)
46
+ jwt (1.5.1)
47
+ minitest (5.9.0)
48
+ multi_json (1.12.1)
48
49
  multi_xml (0.5.5)
49
50
  multipart-post (1.2.0)
50
51
  nokogiri (1.5.11)
51
- oauth2 (1.0.0)
52
+ oauth2 (1.1.0)
52
53
  faraday (>= 0.8, < 0.10)
53
- jwt (~> 1.0)
54
+ jwt (~> 1.0, < 1.5.2)
54
55
  multi_json (~> 1.3)
55
56
  multi_xml (~> 0.5)
56
- rack (~> 1.2)
57
+ rack (>= 1.2, < 3)
57
58
  rack (1.6.4)
58
- rake (10.4.2)
59
- rdoc (4.2.1)
59
+ rake (10.5.0)
60
+ rdoc (4.2.2)
60
61
  json (~> 1.4)
62
+ semver (1.0.1)
61
63
  sqlite3 (1.3.11)
62
64
  thor (0.19.1)
63
- tzinfo (0.3.46)
65
+ tzinfo (0.3.48)
64
66
 
65
67
  PLATFORMS
66
68
  ruby
@@ -69,13 +71,15 @@ DEPENDENCIES
69
71
  activerecord (~> 3.1.0)
70
72
  addressable (~> 2.3.8)
71
73
  appraisal
74
+ git (~> 1.2.9)
72
75
  highline (~> 1.6.0)
73
76
  i18n (~> 0.6.5)
74
77
  jeweler
75
78
  minitest
76
79
  nokogiri (~> 1.5.0)
80
+ rake (~> 10.4)
77
81
  rdoc (>= 2.4.2)
78
82
  sqlite3
79
83
 
80
84
  BUNDLED WITH
81
- 1.10.6
85
+ 1.11.2
data/gemfiles/3.2.gemfile CHANGED
@@ -5,6 +5,8 @@ source "http://rubygems.org"
5
5
  gem "activerecord", "~> 3.2.0"
6
6
  gem "i18n", "~> 0.6.5", :group => :test
7
7
  gem "highline", "~> 1.6.0", :group => :test
8
+ gem "rake", "~> 10.4", :group => :test
9
+ gem "git", "~> 1.2.9", :group => :test
8
10
  gem "minitest", :group => :test
9
11
  gem "appraisal", :group => :test
10
12
  gem "sqlite3", :group => :test
@@ -1,15 +1,15 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (3.2.22)
5
- activesupport (= 3.2.22)
4
+ activemodel (3.2.22.1)
5
+ activesupport (= 3.2.22.1)
6
6
  builder (~> 3.0.0)
7
- activerecord (3.2.22)
8
- activemodel (= 3.2.22)
9
- activesupport (= 3.2.22)
7
+ activerecord (3.2.22.1)
8
+ activemodel (= 3.2.22.1)
9
+ activesupport (= 3.2.22.1)
10
10
  arel (~> 3.0.2)
11
11
  tzinfo (~> 0.3.29)
12
- activesupport (3.2.22)
12
+ activesupport (3.2.22.1)
13
13
  i18n (~> 0.6, >= 0.6.4)
14
14
  multi_json (~> 1.0)
15
15
  addressable (2.3.8)
@@ -29,10 +29,10 @@ GEM
29
29
  multi_json (~> 1.4)
30
30
  nokogiri (~> 1.5.2)
31
31
  oauth2
32
- hashie (3.4.3)
32
+ hashie (3.4.4)
33
33
  highline (1.6.21)
34
34
  i18n (0.6.11)
35
- jeweler (2.0.1)
35
+ jeweler (2.1.1)
36
36
  builder
37
37
  bundler (>= 1.0)
38
38
  git (>= 1.2.5)
@@ -41,26 +41,28 @@ GEM
41
41
  nokogiri (>= 1.5.10)
42
42
  rake
43
43
  rdoc
44
+ semver
44
45
  json (1.8.3)
45
- jwt (1.5.2)
46
- minitest (5.8.3)
47
- multi_json (1.11.2)
46
+ jwt (1.5.1)
47
+ minitest (5.9.0)
48
+ multi_json (1.12.1)
48
49
  multi_xml (0.5.5)
49
50
  multipart-post (1.2.0)
50
51
  nokogiri (1.5.11)
51
- oauth2 (1.0.0)
52
+ oauth2 (1.1.0)
52
53
  faraday (>= 0.8, < 0.10)
53
- jwt (~> 1.0)
54
+ jwt (~> 1.0, < 1.5.2)
54
55
  multi_json (~> 1.3)
55
56
  multi_xml (~> 0.5)
56
- rack (~> 1.2)
57
+ rack (>= 1.2, < 3)
57
58
  rack (1.6.4)
58
- rake (10.4.2)
59
- rdoc (4.2.1)
59
+ rake (10.5.0)
60
+ rdoc (4.2.2)
60
61
  json (~> 1.4)
62
+ semver (1.0.1)
61
63
  sqlite3 (1.3.11)
62
64
  thor (0.19.1)
63
- tzinfo (0.3.46)
65
+ tzinfo (0.3.48)
64
66
 
65
67
  PLATFORMS
66
68
  ruby
@@ -69,13 +71,15 @@ DEPENDENCIES
69
71
  activerecord (~> 3.2.0)
70
72
  addressable (~> 2.3.8)
71
73
  appraisal
74
+ git (~> 1.2.9)
72
75
  highline (~> 1.6.0)
73
76
  i18n (~> 0.6.5)
74
77
  jeweler
75
78
  minitest
76
79
  nokogiri (~> 1.5.0)
80
+ rake (~> 10.4)
77
81
  rdoc (>= 2.4.2)
78
82
  sqlite3
79
83
 
80
84
  BUNDLED WITH
81
- 1.10.6
85
+ 1.11.2
data/gemfiles/4.0.gemfile CHANGED
@@ -5,6 +5,8 @@ source "http://rubygems.org"
5
5
  gem "activerecord", "~> 4.0.0"
6
6
  gem "i18n", "~> 0.6.5", :group => :test
7
7
  gem "highline", "~> 1.6.0", :group => :test
8
+ gem "rake", "~> 10.4", :group => :test
9
+ gem "git", "~> 1.2.9", :group => :test
8
10
  gem "minitest", :group => :test
9
11
  gem "appraisal", :group => :test
10
12
  gem "sqlite3", :group => :test
@@ -28,17 +28,16 @@ GEM
28
28
  faraday (0.9.2)
29
29
  multipart-post (>= 1.2, < 3)
30
30
  git (1.2.9.1)
31
- github_api (0.13.1)
31
+ github_api (0.14.0)
32
32
  addressable (~> 2.4.0)
33
33
  descendants_tracker (~> 0.0.4)
34
34
  faraday (~> 0.8, < 0.10)
35
35
  hashie (>= 3.4)
36
- multi_json (>= 1.7.5, < 2.0)
37
36
  oauth2
38
- hashie (3.4.3)
37
+ hashie (3.4.4)
39
38
  highline (1.6.21)
40
39
  i18n (0.6.11)
41
- jeweler (2.0.1)
40
+ jeweler (2.1.1)
42
41
  builder
43
42
  bundler (>= 1.0)
44
43
  git (>= 1.2.5)
@@ -47,27 +46,29 @@ GEM
47
46
  nokogiri (>= 1.5.10)
48
47
  rake
49
48
  rdoc
49
+ semver
50
50
  json (1.8.3)
51
- jwt (1.5.2)
51
+ jwt (1.5.1)
52
52
  minitest (4.7.5)
53
- multi_json (1.11.2)
53
+ multi_json (1.12.1)
54
54
  multi_xml (0.5.5)
55
55
  multipart-post (2.0.0)
56
56
  nokogiri (1.5.11)
57
- oauth2 (1.0.0)
57
+ oauth2 (1.1.0)
58
58
  faraday (>= 0.8, < 0.10)
59
- jwt (~> 1.0)
59
+ jwt (~> 1.0, < 1.5.2)
60
60
  multi_json (~> 1.3)
61
61
  multi_xml (~> 0.5)
62
- rack (~> 1.2)
62
+ rack (>= 1.2, < 3)
63
63
  rack (1.6.4)
64
- rake (10.4.2)
65
- rdoc (4.2.1)
64
+ rake (10.5.0)
65
+ rdoc (4.2.2)
66
66
  json (~> 1.4)
67
+ semver (1.0.1)
67
68
  sqlite3 (1.3.11)
68
69
  thor (0.19.1)
69
70
  thread_safe (0.3.5)
70
- tzinfo (0.3.46)
71
+ tzinfo (0.3.48)
71
72
 
72
73
  PLATFORMS
73
74
  ruby
@@ -75,13 +76,15 @@ PLATFORMS
75
76
  DEPENDENCIES
76
77
  activerecord (~> 4.0.0)
77
78
  appraisal
79
+ git (~> 1.2.9)
78
80
  highline (~> 1.6.0)
79
81
  i18n (~> 0.6.5)
80
82
  jeweler
81
83
  minitest
82
84
  nokogiri (~> 1.5.0)
85
+ rake (~> 10.4)
83
86
  rdoc (>= 2.4.2)
84
87
  sqlite3
85
88
 
86
89
  BUNDLED WITH
87
- 1.10.6
90
+ 1.11.2
data/gemfiles/4.1.gemfile CHANGED
@@ -5,6 +5,8 @@ source "http://rubygems.org"
5
5
  gem "activerecord", "~> 4.1.0"
6
6
  gem "i18n", "~> 0.6.5", :group => :test
7
7
  gem "highline", "~> 1.6.0", :group => :test
8
+ gem "rake", "~> 10.4", :group => :test
9
+ gem "git", "~> 1.2.9", :group => :test
8
10
  gem "minitest", :group => :test
9
11
  gem "appraisal", :group => :test
10
12
  gem "sqlite3", :group => :test
@@ -1,14 +1,14 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (4.1.14)
5
- activesupport (= 4.1.14)
4
+ activemodel (4.1.15)
5
+ activesupport (= 4.1.15)
6
6
  builder (~> 3.1)
7
- activerecord (4.1.14)
8
- activemodel (= 4.1.14)
9
- activesupport (= 4.1.14)
7
+ activerecord (4.1.15)
8
+ activemodel (= 4.1.15)
9
+ activesupport (= 4.1.15)
10
10
  arel (~> 5.0.0)
11
- activesupport (4.1.14)
11
+ activesupport (4.1.15)
12
12
  i18n (~> 0.6, >= 0.6.9)
13
13
  json (~> 1.7, >= 1.7.7)
14
14
  minitest (~> 5.1)
@@ -26,17 +26,16 @@ GEM
26
26
  faraday (0.9.2)
27
27
  multipart-post (>= 1.2, < 3)
28
28
  git (1.2.9.1)
29
- github_api (0.13.1)
29
+ github_api (0.14.0)
30
30
  addressable (~> 2.4.0)
31
31
  descendants_tracker (~> 0.0.4)
32
32
  faraday (~> 0.8, < 0.10)
33
33
  hashie (>= 3.4)
34
- multi_json (>= 1.7.5, < 2.0)
35
34
  oauth2
36
- hashie (3.4.3)
35
+ hashie (3.4.4)
37
36
  highline (1.6.21)
38
37
  i18n (0.6.11)
39
- jeweler (2.0.1)
38
+ jeweler (2.1.1)
40
39
  builder
41
40
  bundler (>= 1.0)
42
41
  git (>= 1.2.5)
@@ -45,23 +44,25 @@ GEM
45
44
  nokogiri (>= 1.5.10)
46
45
  rake
47
46
  rdoc
47
+ semver
48
48
  json (1.8.3)
49
- jwt (1.5.2)
50
- minitest (5.8.3)
51
- multi_json (1.11.2)
49
+ jwt (1.5.1)
50
+ minitest (5.9.0)
51
+ multi_json (1.12.1)
52
52
  multi_xml (0.5.5)
53
53
  multipart-post (2.0.0)
54
54
  nokogiri (1.5.11)
55
- oauth2 (1.0.0)
55
+ oauth2 (1.1.0)
56
56
  faraday (>= 0.8, < 0.10)
57
- jwt (~> 1.0)
57
+ jwt (~> 1.0, < 1.5.2)
58
58
  multi_json (~> 1.3)
59
59
  multi_xml (~> 0.5)
60
- rack (~> 1.2)
60
+ rack (>= 1.2, < 3)
61
61
  rack (1.6.4)
62
- rake (10.4.2)
63
- rdoc (4.2.1)
62
+ rake (10.5.0)
63
+ rdoc (4.2.2)
64
64
  json (~> 1.4)
65
+ semver (1.0.1)
65
66
  sqlite3 (1.3.11)
66
67
  thor (0.19.1)
67
68
  thread_safe (0.3.5)
@@ -74,13 +75,15 @@ PLATFORMS
74
75
  DEPENDENCIES
75
76
  activerecord (~> 4.1.0)
76
77
  appraisal
78
+ git (~> 1.2.9)
77
79
  highline (~> 1.6.0)
78
80
  i18n (~> 0.6.5)
79
81
  jeweler
80
82
  minitest
81
83
  nokogiri (~> 1.5.0)
84
+ rake (~> 10.4)
82
85
  rdoc (>= 2.4.2)
83
86
  sqlite3
84
87
 
85
88
  BUNDLED WITH
86
- 1.10.6
89
+ 1.11.2
data/gemfiles/4.2.gemfile CHANGED
@@ -5,6 +5,8 @@ source "http://rubygems.org"
5
5
  gem "activerecord", "~> 4.2.3"
6
6
  gem "i18n", "~> 0.7.0"
7
7
  gem "highline", "~> 1.6.0", :group => :test
8
+ gem "rake", "~> 10.4", :group => :test
9
+ gem "git", "~> 1.2.9", :group => :test
8
10
  gem "minitest", :group => :test
9
11
  gem "appraisal", :group => :test
10
12
  gem "sqlite3", :group => :test
@@ -1,14 +1,14 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (4.2.4)
5
- activesupport (= 4.2.4)
4
+ activemodel (4.2.6)
5
+ activesupport (= 4.2.6)
6
6
  builder (~> 3.1)
7
- activerecord (4.2.4)
8
- activemodel (= 4.2.4)
9
- activesupport (= 4.2.4)
7
+ activerecord (4.2.6)
8
+ activemodel (= 4.2.6)
9
+ activesupport (= 4.2.6)
10
10
  arel (~> 6.0)
11
- activesupport (4.2.4)
11
+ activesupport (4.2.6)
12
12
  i18n (~> 0.7)
13
13
  json (~> 1.7, >= 1.7.7)
14
14
  minitest (~> 5.1)
@@ -26,17 +26,16 @@ GEM
26
26
  faraday (0.9.2)
27
27
  multipart-post (>= 1.2, < 3)
28
28
  git (1.2.9.1)
29
- github_api (0.13.1)
29
+ github_api (0.14.0)
30
30
  addressable (~> 2.4.0)
31
31
  descendants_tracker (~> 0.0.4)
32
32
  faraday (~> 0.8, < 0.10)
33
33
  hashie (>= 3.4)
34
- multi_json (>= 1.7.5, < 2.0)
35
34
  oauth2
36
- hashie (3.4.3)
35
+ hashie (3.4.4)
37
36
  highline (1.6.21)
38
37
  i18n (0.7.0)
39
- jeweler (2.0.1)
38
+ jeweler (2.1.1)
40
39
  builder
41
40
  bundler (>= 1.0)
42
41
  git (>= 1.2.5)
@@ -45,23 +44,25 @@ GEM
45
44
  nokogiri (>= 1.5.10)
46
45
  rake
47
46
  rdoc
47
+ semver
48
48
  json (1.8.3)
49
- jwt (1.5.2)
50
- minitest (5.8.3)
51
- multi_json (1.11.2)
49
+ jwt (1.5.1)
50
+ minitest (5.9.0)
51
+ multi_json (1.12.1)
52
52
  multi_xml (0.5.5)
53
53
  multipart-post (2.0.0)
54
54
  nokogiri (1.5.11)
55
- oauth2 (1.0.0)
55
+ oauth2 (1.1.0)
56
56
  faraday (>= 0.8, < 0.10)
57
- jwt (~> 1.0)
57
+ jwt (~> 1.0, < 1.5.2)
58
58
  multi_json (~> 1.3)
59
59
  multi_xml (~> 0.5)
60
- rack (~> 1.2)
60
+ rack (>= 1.2, < 3)
61
61
  rack (1.6.4)
62
- rake (10.4.2)
63
- rdoc (4.2.1)
62
+ rake (10.5.0)
63
+ rdoc (4.2.2)
64
64
  json (~> 1.4)
65
+ semver (1.0.1)
65
66
  sqlite3 (1.3.11)
66
67
  thor (0.19.1)
67
68
  thread_safe (0.3.5)
@@ -74,13 +75,15 @@ PLATFORMS
74
75
  DEPENDENCIES
75
76
  activerecord (~> 4.2.3)
76
77
  appraisal
78
+ git (~> 1.2.9)
77
79
  highline (~> 1.6.0)
78
80
  i18n (~> 0.7.0)
79
81
  jeweler
80
82
  minitest
81
83
  nokogiri (~> 1.5.0)
84
+ rake (~> 10.4)
82
85
  rdoc (>= 2.4.2)
83
86
  sqlite3
84
87
 
85
88
  BUNDLED WITH
86
- 1.10.6
89
+ 1.11.2
@@ -0,0 +1,18 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.0.0.rc1"
6
+ gem "i18n", "~> 0.7.0"
7
+ gem "highline", "~> 1.6.0", :group => :test
8
+ gem "rake", "~> 10.4", :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", :group => :test
14
+ gem "nokogiri", "~> 1.5.0", :group => :test
15
+
16
+ group :test do
17
+ gem "jeweler"
18
+ end
@@ -0,0 +1,88 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activemodel (5.0.0.rc1)
5
+ activesupport (= 5.0.0.rc1)
6
+ activerecord (5.0.0.rc1)
7
+ activemodel (= 5.0.0.rc1)
8
+ activesupport (= 5.0.0.rc1)
9
+ arel (~> 7.0)
10
+ activesupport (5.0.0.rc1)
11
+ concurrent-ruby (~> 1.0, >= 1.0.2)
12
+ i18n (~> 0.7)
13
+ minitest (~> 5.1)
14
+ tzinfo (~> 1.1)
15
+ addressable (2.4.0)
16
+ appraisal (2.1.0)
17
+ bundler
18
+ rake
19
+ thor (>= 0.14.0)
20
+ arel (7.0.0)
21
+ builder (3.2.2)
22
+ concurrent-ruby (1.0.2)
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.14.0)
29
+ addressable (~> 2.4.0)
30
+ descendants_tracker (~> 0.0.4)
31
+ faraday (~> 0.8, < 0.10)
32
+ hashie (>= 3.4)
33
+ oauth2
34
+ hashie (3.4.4)
35
+ highline (1.6.21)
36
+ i18n (0.7.0)
37
+ jeweler (2.1.1)
38
+ builder
39
+ bundler (>= 1.0)
40
+ git (>= 1.2.5)
41
+ github_api
42
+ highline (>= 1.6.15)
43
+ nokogiri (>= 1.5.10)
44
+ rake
45
+ rdoc
46
+ semver
47
+ json (1.8.3)
48
+ jwt (1.5.1)
49
+ minitest (5.9.0)
50
+ multi_json (1.12.1)
51
+ multi_xml (0.5.5)
52
+ multipart-post (2.0.0)
53
+ nokogiri (1.5.11)
54
+ oauth2 (1.1.0)
55
+ faraday (>= 0.8, < 0.10)
56
+ jwt (~> 1.0, < 1.5.2)
57
+ multi_json (~> 1.3)
58
+ multi_xml (~> 0.5)
59
+ rack (>= 1.2, < 3)
60
+ rack (1.6.4)
61
+ rake (10.5.0)
62
+ rdoc (4.2.2)
63
+ json (~> 1.4)
64
+ semver (1.0.1)
65
+ sqlite3 (1.3.11)
66
+ thor (0.19.1)
67
+ thread_safe (0.3.5)
68
+ tzinfo (1.2.2)
69
+ thread_safe (~> 0.1)
70
+
71
+ PLATFORMS
72
+ ruby
73
+
74
+ DEPENDENCIES
75
+ activerecord (~> 5.0.0.rc1)
76
+ appraisal
77
+ git (~> 1.2.9)
78
+ highline (~> 1.6.0)
79
+ i18n (~> 0.7.0)
80
+ jeweler
81
+ minitest
82
+ nokogiri (~> 1.5.0)
83
+ rake (~> 10.4)
84
+ rdoc (>= 2.4.2)
85
+ sqlite3
86
+
87
+ BUNDLED WITH
88
+ 1.11.2
@@ -20,7 +20,7 @@ class ActiveRecord::Base
20
20
  if options[:except]
21
21
  exceptions = options[:except].nil? ? [] : [options[:except]].flatten
22
22
  exceptions.each do |attribute|
23
- kopy.send(:write_attribute, attribute, self.class.column_defaults.dup[attribute.to_s]) unless attribute.kind_of?(Hash)
23
+ dup_default_attribute_value_to(kopy, attribute, self) unless attribute.kind_of?(Hash)
24
24
  end
25
25
  deep_exceptions = exceptions.select{|e| e.kind_of?(Hash) }.inject({}){|m,h| m.merge(h) }
26
26
  end
@@ -31,7 +31,7 @@ class ActiveRecord::Base
31
31
  object_attrs = kopy.attributes.keys.collect{ |s| s.to_sym }
32
32
  exceptions = object_attrs - onlinesses
33
33
  exceptions.each do |attribute|
34
- kopy.send(:write_attribute, attribute, self.class.column_defaults.dup[attribute.to_s]) unless attribute.kind_of?(Hash)
34
+ dup_default_attribute_value_to(kopy, attribute, self) unless attribute.kind_of?(Hash)
35
35
  end
36
36
  deep_onlinesses = onlinesses.select{|e| e.kind_of?(Hash) }.inject({}){|m,h| m.merge(h) }
37
37
  end
@@ -97,6 +97,10 @@ class ActiveRecord::Base
97
97
 
98
98
  private
99
99
 
100
+ def dup_default_attribute_value_to(kopy, attribute, origin)
101
+ kopy.send(:raw_write_attribute, attribute, origin.class.column_defaults.dup[attribute.to_s])
102
+ end
103
+
100
104
  def dup_belongs_to_association options, &block
101
105
  object = self.send(options[:association])
102
106
  object = nil if options[:conditions].any? && evaluate_conditions(object, options[:conditions])
data/readme.md CHANGED
@@ -6,8 +6,8 @@ This gem gives every ActiveRecord::Base object the possibility to do a deep clon
6
6
 
7
7
  ## Requirements
8
8
 
9
- * Ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.5 (tested)
10
- * Activerecord 3.1, 3.2, 4.0, 4.1, 4.2 (tested)
9
+ * Ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.5, 2.2.2, 2.3.0 (tested)
10
+ * Activerecord 3.1, 3.2, 4.0, 4.1, 4.2, 5.0.0-rc1 (tested)
11
11
  * Rails 2.x/3.0 users, please check out the 'rails2.x-3.0' branch
12
12
 
13
13
  ## Installation
@@ -15,7 +15,7 @@ This gem gives every ActiveRecord::Base object the possibility to do a deep clon
15
15
  * Add deep_cloneable to your Gemfile:
16
16
 
17
17
  ```ruby
18
- gem 'deep_cloneable', '~> 2.2.0'
18
+ gem 'deep_cloneable', '~> 2.2.1'
19
19
  ```
20
20
 
21
21
  ## Upgrading from v1
data/test/database.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  sqlite:
2
- adapter: sqlite
2
+ adapter: sqlite
3
+ database: ":memory:"
4
+ sqlite3:
5
+ adapter: sqlite3
3
6
  database: ":memory:"
4
- sqlite3:
5
- adapter: sqlite3
6
- database: ":memory:"
data/test/models.rb CHANGED
@@ -36,6 +36,8 @@ class Pirate < ActiveRecord::Base
36
36
  has_many :gold_pieces, :through => :treasures
37
37
  has_one :parrot
38
38
 
39
+ serialize :piastres
40
+
39
41
  attr_accessor :cloned_from_id
40
42
  end
41
43
 
data/test/schema.rb CHANGED
@@ -5,6 +5,7 @@ ActiveRecord::Schema.define(:version => 1) do
5
5
  t.column :age, :string
6
6
  t.column :ship_id, :integer
7
7
  t.column :ship_type, :string
8
+ t.column :piastres, :text, :default => [].to_yaml
8
9
  end
9
10
 
10
11
  create_table :parrots, :force => true do |t|
@@ -32,6 +32,7 @@ class TestDeepCloneable < MiniTest::Unit::TestCase
32
32
  def test_single_deep_clone_onliness
33
33
  deep_clone = @jack.deep_clone(:only => :name)
34
34
  assert deep_clone.new_record?
35
+ assert deep_clone.piastres, []
35
36
  assert deep_clone.save
36
37
  assert_equal @jack.name, deep_clone.name
37
38
  assert_equal 'no nickname', deep_clone.nick_name
@@ -43,6 +44,7 @@ class TestDeepCloneable < MiniTest::Unit::TestCase
43
44
  def test_multiple_deep_clone_onliness
44
45
  deep_clone = @jack.deep_clone(:only => [:name, :nick_name])
45
46
  assert deep_clone.new_record?
47
+ assert deep_clone.piastres, []
46
48
  assert deep_clone.save
47
49
  assert_equal @jack.name, deep_clone.name
48
50
  assert_equal @jack.nick_name, deep_clone.nick_name
@@ -136,6 +138,7 @@ class TestDeepCloneable < MiniTest::Unit::TestCase
136
138
  def test_should_pass_nested_onlinesses
137
139
  deep_clone = @jack.deep_clone(:include => :parrot, :only => [:name, { :parrot => [:name] }])
138
140
  assert deep_clone.new_record?
141
+ assert deep_clone.piastres, []
139
142
  assert deep_clone.save
140
143
  refute_equal deep_clone.parrot, @jack.parrot
141
144
  assert_equal deep_clone.parrot.name, @jack.parrot.name
data/test/test_helper.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'yaml'
3
+ require 'sqlite3'
3
4
 
4
5
  gem 'minitest'
5
6
  require 'minitest/autorun'
@@ -19,18 +20,7 @@ def load_schema
19
20
  end
20
21
 
21
22
  db_adapter = ENV['DB']
22
- # no db passed, try one of these fine config-free DBs before bombing.
23
- db_adapter ||= begin
24
- require 'rubygems'
25
- require 'sqlite'
26
- 'sqlite'
27
- rescue MissingSourceFile
28
- begin
29
- require 'sqlite3'
30
- 'sqlite3'
31
- rescue MissingSourceFile
32
- end
33
- end
23
+ db_adapter ||= 'sqlite3'
34
24
 
35
25
  if db_adapter.nil?
36
26
  raise "No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_cloneable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reinier de Lange
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-11 00:00:00.000000000 Z
11
+ date: 2016-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - "<"
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0
19
+ version: 5.2.0
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.1.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - "<"
28
28
  - !ruby/object:Gem::Version
29
- version: 5.0.0
29
+ version: 5.2.0
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 3.1.0
@@ -58,6 +58,8 @@ files:
58
58
  - gemfiles/4.1.gemfile.lock
59
59
  - gemfiles/4.2.gemfile
60
60
  - gemfiles/4.2.gemfile.lock
61
+ - gemfiles/5.0.gemfile
62
+ - gemfiles/5.0.gemfile.lock
61
63
  - init.rb
62
64
  - lib/deep_cloneable.rb
63
65
  - readme.md
@@ -86,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
88
  version: '0'
87
89
  requirements: []
88
90
  rubyforge_project:
89
- rubygems_version: 2.4.8
91
+ rubygems_version: 2.6.4
90
92
  signing_key:
91
93
  specification_version: 4
92
94
  summary: This gem gives every ActiveRecord::Base object the possibility to do a deep